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
7abd3bce
Commit
7abd3bce
authored
Jul 13, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
a674b557
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
28 deletions
+54
-28
brg-user-center/app/base/api/api.base.js
+3
-4
brg-user-center/app/base/db/impl/order/orderInfoDao.js
+12
-6
brg-user-center/app/base/service/impl/need/needInfoSve.js
+2
-2
brg-user-center/app/base/service/impl/order/applyInfoSve.js
+3
-3
brg-user-center/app/base/service/impl/order/orderInfoSve.js
+7
-11
brg-user-center/app/base/service/impl/order/qualificationCertificateSve.js
+2
-2
brg-user-center/app/config/environment.js
+4
-0
brg-user-center/app/config/platform.js
+0
-0
brg-user-center/app/config/routes/api.js
+21
-0
brg-user-center/app/front/entry/public/apidoc/customer/order.md
+0
-0
No files found.
brg-user-center/app/base/api/api.base.js
View file @
7abd3bce
...
...
@@ -16,23 +16,22 @@ class APIBase {
"GetOrderDetail"
:
"getOrderDetail"
,
"GetApplyListByUserAndType"
:
"getApplyListByUserAndType"
,
"GetApplyAndSolutionInfo"
:
"getApplyAndSolutionInfo"
,
"
Get
PriceDetail"
:
"selPrice2TX"
,
"
Describe
PriceDetail"
:
"selPrice2TX"
,
// "GetOverviewInfoByUser": "getOverviewInfoByUser",
"SubmitGoodsInfo"
:
"submitGoodsinfo"
,
"
Submit
Need"
:
"needSubmit"
,
"
Create
Need"
:
"needSubmit"
,
"GetNeedList"
:
"needList"
,
"GetNeedDetail"
:
"needDetail"
,
"GetOrderListByStatus"
:
"getOrderListByStatus"
,
"GetQualificationCertificateListByUserAndType"
:
"getQualificationCertificateListByUserAndType"
,
"GetQualificationCertificateDetail"
:
"getQualificationCertificateDetail"
,
"
Refuse
Solution"
:
"refusalSolution"
,
"
Modify
Solution"
:
"refusalSolution"
,
"SendVerificationCode"
:
"sendVerificationCode"
,
"CheckBusinessNameList"
:
"checkBusinessNameList"
,
"DescribeOverviewInfoByUser"
:
"getOverviewInfoByUser"
,
"DescribeOrderList"
:
"getOrderList"
,
"DescribeQualificationCertificateOrderList"
:
"getQcOrderList"
,
"DescribeQcOrderList"
:
"getQcOrderList"
,
"DescribeOrderDetail"
:
"getOrderDetail"
,
"DescribeApplyListByUserAndType"
:
"getApplyListByUserAndType"
,
"DescribeApplyAndSolutionInfo"
:
"getApplyAndSolutionInfo"
,
...
...
brg-user-center/app/base/db/impl/order/orderInfoDao.js
View file @
7abd3bce
...
...
@@ -6,8 +6,11 @@ class OrderInfoDao extends Dao{
}
//获取订单列表
async
getOrderList
(
ab
){
var
pagesize
=
ab
.
Pagesize
?
Number
(
ab
.
Pagesize
)
:
10
;
var
currentpage
=
ab
.
Currentpage
?
Number
(
ab
.
Currentpage
)
:
1
;
var
pagesize
=
ab
.
PageSize
?
Number
(
ab
.
PageSize
)
:
10
;
var
currentpage
=
ab
.
CurrentPage
?
Number
(
ab
.
CurrentPage
)
:
1
;
if
(
ab
.
PageNumber
){
currentpage
=
Number
(
ab
.
PageNumber
);
}
var
offset
=
pagesize
*
(
currentpage
-
1
);
var
sortType
=
"desc"
;
...
...
@@ -64,13 +67,16 @@ class OrderInfoDao extends Dao{
var
list
=
await
this
.
customQuery
(
sql
,
params
);
var
result
=
system
.
getResultSuccess
(
list
);
var
tmpResultCount
=
await
this
.
customQuery
(
sqlcount
,
params
);
result
.
data
Count
=
tmpResultCount
&&
tmpResultCount
.
length
>
0
?
tmpResultCount
[
0
].
dataCount
:
0
;
result
.
total
Count
=
tmpResultCount
&&
tmpResultCount
.
length
>
0
?
tmpResultCount
[
0
].
dataCount
:
0
;
return
result
;
}
//获取资质订单列表
async
getQcOrderList
(
ab
){
var
pagesize
=
ab
.
Pagesize
?
Number
(
ab
.
Pagesize
)
:
10
;
var
currentpage
=
ab
.
Currentpage
?
Number
(
ab
.
Currentpage
)
:
1
;
var
pagesize
=
ab
.
PageSize
?
Number
(
ab
.
PageSize
)
:
10
;
var
currentpage
=
ab
.
CurrentPage
?
Number
(
ab
.
CurrentPage
)
:
1
;
if
(
ab
.
PageNumber
){
currentpage
=
Number
(
ab
.
PageNumber
);
}
var
offset
=
pagesize
*
(
currentpage
-
1
);
var
sortType
=
"desc"
;
...
...
@@ -117,7 +123,7 @@ class OrderInfoDao extends Dao{
var
list
=
await
this
.
customQuery
(
sql
,
params
);
var
result
=
system
.
getResultSuccess
(
list
);
var
tmpResultCount
=
await
this
.
customQuery
(
sqlcount
,
params
);
result
.
data
Count
=
tmpResultCount
&&
tmpResultCount
.
length
>
0
?
tmpResultCount
[
0
].
dataCount
:
0
;
result
.
total
Count
=
tmpResultCount
&&
tmpResultCount
.
length
>
0
?
tmpResultCount
[
0
].
dataCount
:
0
;
return
result
;
}
//获取产品详情
...
...
brg-user-center/app/base/service/impl/need/needInfoSve.js
View file @
7abd3bce
...
...
@@ -168,7 +168,7 @@ class NeedInfoService extends ServiceBase {
},
orderInfo
:
sort
,
pageInfo
:
{
pageNo
:
Number
(
searchObj
.
PageN
o
)
||
1
,
pageNo
:
Number
(
searchObj
.
PageN
umber
)
||
1
,
pageSize
:
Number
(
searchObj
.
PageSize
)
||
10
}
}
...
...
@@ -179,7 +179,7 @@ class NeedInfoService extends ServiceBase {
sobj
.
search
.
status
=
searchObj
.
Status
;
}
var
r
=
await
this
.
dao
.
findAndCountAll
(
sobj
);
return
system
.
getResultSuccess
(
r
);
return
system
.
getResultSuccess
(
{
TotalCount
:
r
.
count
,
DataSet
:
r
.
rows
}
);
}
async
needDetail
(
searchObj
)
{
...
...
brg-user-center/app/base/service/impl/order/applyInfoSve.js
View file @
7abd3bce
...
...
@@ -26,7 +26,7 @@ class ApplyInfoService extends ServiceBase {
return
system
.
getResultFail
(
-
103
,
"申请主体类型不能为空"
);
}
var
limit
=
ab
.
PageSize
?
Number
(
ab
.
PageSize
)
:
10
;
var
offset
=
ab
.
CurrentPage
?
(
Number
(
ab
.
CurrentPage
)
-
1
)
*
limit
:
0
var
offset
=
ab
.
PageNumber
?
(
Number
(
ab
.
PageNumber
)
-
1
)
*
limit
:
0
var
countObj
=
{
apply_type
:
ab
.
ApplyType
,
user_id
:
ab
.
UserId
};
var
whereObj
=
{
apply_type
:
ab
.
ApplyType
,
user_id
:
ab
.
UserId
};
if
(
ab
.
ApplyName
)
{
...
...
@@ -56,7 +56,7 @@ class ApplyInfoService extends ServiceBase {
order
:
[[
"created_at"
,
'desc'
]]
});
var
result
=
system
.
getResultSuccess
(
list
);
result
.
data
Count
=
count
;
result
.
total
Count
=
count
;
return
result
;
}
...
...
@@ -113,7 +113,7 @@ class ApplyInfoService extends ServiceBase {
if
(
!
ab
.
ProductTypeOne
)
{
//产品大类
return
system
.
getResultFail
(
-
103
,
"产品大类编码不能为空"
);
}
var
productTypeOne
=
"
/"
+
ab
.
ProductTypeOne
+
"/
"
var
productTypeOne
=
"
%/"
+
ab
.
ProductTypeOne
+
"/%
"
// { [this.db.Op.like]: productTypeOne }
var
companyCount
=
await
this
.
dao
.
findCount
({
where
:
{
apply_type
:
1
,
user_id
:
ab
.
UserId
}
});
//公司数量
var
selfEmployedPersonCount
=
await
this
.
dao
.
findCount
({
where
:
{
apply_type
:
2
,
user_id
:
ab
.
UserId
}
});
//个体户数量
...
...
brg-user-center/app/base/service/impl/order/orderInfoSve.js
View file @
7abd3bce
...
...
@@ -608,17 +608,13 @@ class OrderInfoService extends ServiceBase {
}
}
// if (pobj.actionBody.PathCode == "/ic/dljz/") {
// if (!pobj.actionBody.subjectType) {
// return system.getResultFail(-101, "subjectType is empty");
// }
// if (!pobj.actionBody.taxpayerType) {
// return system.getResultFail(-101, "taxpayerType is empty");
// }
// if()
// priceName = pobj.actionBody.subjectType + pobj.actionBody.taxpayerType;
// }
//代理记账
if
(
pobj
.
actionBody
.
PathCode
==
"/ic/dljz/"
)
{
if
(
!
pobj
.
actionBody
.
priceName
)
{
return
system
.
getResultFail
(
-
101
,
"priceName is empty"
);
}
priceName
=
pobj
.
actionBody
.
priceName
;
}
var
p
=
'%'
+
priceName
+
'%'
;
var
sqlobj
=
{
pathCode
:
pobj
.
actionBody
.
PathCode
,
...
...
brg-user-center/app/base/service/impl/order/qualificationCertificateSve.js
View file @
7abd3bce
...
...
@@ -25,7 +25,7 @@ class QualificationCertificateService extends ServiceBase {
return
system
.
getResultFail
(
-
103
,
"证照类型不能为空"
);
}
var
limit
=
ab
.
PageSize
?
Number
(
ab
.
PageSize
)
:
10
;
var
offset
=
ab
.
CurrentPage
?
(
Number
(
ab
.
CurrentPage
)
-
1
)
*
limit
:
0
var
offset
=
ab
.
PageNumber
?
(
Number
(
ab
.
PageNumber
)
-
1
)
*
limit
:
0
var
countObj
=
{
license_type
:
ab
.
LicenseType
,
user_id
:
ab
.
UserId
};
var
whereObj
=
{
license_type
:
ab
.
LicenseType
,
user_id
:
ab
.
UserId
};
if
(
ab
.
CompanyName
)
{
...
...
@@ -61,7 +61,7 @@ class QualificationCertificateService extends ServiceBase {
order
:
[[
"expiration_date"
,
sortType
]]
});
var
result
=
system
.
getResultSuccess
(
list
);
result
.
data
Count
=
count
;
result
.
total
Count
=
count
;
return
result
;
}
...
...
brg-user-center/app/config/environment.js
View file @
7abd3bce
...
...
@@ -18,6 +18,10 @@ module.exports = function (app) {
app
.
set
(
'view engine'
,
'ejs'
);
app
.
use
(
methodOverride
());
app
.
use
(
cookierParser
());
// —bodyParser.json()–解析JSON格式
// —bodyParser.raw()–解析二进制格式
// —bodyParser.text()–解析文本格式 bodyParser.urlencoded({extended:false})
// —bodyParser.urlencoded()–解析文本格式
app
.
use
(
bodyParser
.
json
({
limit
:
'50mb'
}));
app
.
use
(
bodyParser
.
urlencoded
({
limit
:
'50mb'
,
extended
:
true
}));
routes
(
app
);
//初始化路由
...
...
brg-user-center/app/config/platform.js
View file @
7abd3bce
This diff is collapsed.
Click to expand it.
brg-user-center/app/config/routes/api.js
View file @
7abd3bce
var
url
=
require
(
"url"
);
var
system
=
require
(
"../../base/system"
);
var
bodyParser
=
require
(
'body-parser'
);
const
{
JSON
}
=
require
(
"sequelize"
);
const
utilsAuthSve
=
system
.
getObject
(
"service.utilsSve.utilsAuthSve"
);
module
.
exports
=
function
(
app
)
{
//-----------------------新的模式---------api---------开始
app
.
all
(
"/overview/*"
,
async
function
(
req
,
res
,
next
)
{
var
result
=
system
.
getResult
(
null
,
"req method must is post"
);
if
(
req
.
method
!=
"POST"
)
{
res
.
end
(
JSON
.
stringify
(
result
));
return
;
}
console
.
log
(
req
.
body
,
"....body......"
);
// var param = bodyParser.urlencoded({ extended: false })
// if (["getAppTokenByHosts", "getAppTokenByAppKey"].indexOf(req.body.actionType) >= 0) {
// req.body.actionBody.appHosts = req.host;
// next();
// return;
// }
// if (req.path.indexOf("/taskapi/") >= 0) {
// next();
// return;
// }
next
();
});
app
.
all
(
"/api/*"
,
async
function
(
req
,
res
,
next
)
{
var
result
=
system
.
getResult
(
null
,
"req method must is post"
);
...
...
brg-user-center/app/front/entry/public/apidoc/customer/order.md
View file @
7abd3bce
This diff is collapsed.
Click to expand it.
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