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
179dda15
Commit
179dda15
authored
May 19, 2021
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 百度工商套餐
parent
6e2d7343
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
5 deletions
+44
-5
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
+27
-1
ic-deliver/app/base/db/models/delivery/delivery_bill.js
+6
-3
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
+11
-1
No files found.
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
View file @
179dda15
...
...
@@ -64,6 +64,9 @@ class DeliverybillDao extends Dao {
/*根据交付单编号获取订单详情*/
async
findInfoByDeliverCode
(
qobj
)
{
var
qcwhere
=
{
"delivery_code"
:
qobj
.
deliverNumber
};
if
(
qobj
.
productCode
)
{
qcwhere
.
product_code
=
qobj
.
productCode
}
return
await
this
.
findOne
(
qcwhere
);
}
...
...
@@ -133,6 +136,9 @@ class DeliverybillDao extends Dao {
master_source_number
:
qobj
.
master_source_number
}
}
if
(
qobj
.
productCode
)
{
whereobj
.
product_code
=
qobj
.
productCode
;
}
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
...
...
@@ -154,6 +160,25 @@ class DeliverybillDao extends Dao {
/*插入交付单信息*/
async
insertInfo
(
qobj
)
{
//到时候看交付单信息后再确定
const
obj
=
this
.
buildContent
(
qobj
);
return
await
this
.
create
(
obj
);
}
// 套餐批量插入
async
insertInfoPackage
(
qobj
,
businessTypes
=
[])
{
let
packages
=
[];
const
obj
=
this
.
buildContent
(
qobj
);
for
(
let
val
of
businessTypes
)
{
packages
.
push
({
...
obj
,
product_code
:
val
,
is_package
:
true
});
}
await
this
.
bulkCreate
(
packages
);
return
"SUCCESS"
}
buildContent
(
qobj
)
{
var
obj
=
{
"delivery_code"
:
qobj
.
deliverNumber
,
"delivery_status"
:
qobj
.
deliverStatus
,
...
...
@@ -226,9 +251,10 @@ class DeliverybillDao extends Dao {
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
statusReason
;
}
return
await
this
.
create
(
obj
)
;
return
obj
;
}
}
module
.
exports
=
DeliverybillDao
;
ic-deliver/app/base/db/models/delivery/delivery_bill.js
View file @
179dda15
...
...
@@ -66,14 +66,14 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
master_source_number
:{
//主订单号
master_source_number
:
{
//主订单号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
settle_status
:
{
// 服务单流转状态
allowNull
:
true
,
type
:
DataTypes
.
STRING
,
defaultValue
:
'waittosettle'
defaultValue
:
'waittosettle'
},
selling_price
:
{
//售价
allowNull
:
true
,
...
...
@@ -123,7 +123,10 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
is_package
:
{
//是否是套餐
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
},
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
...
...
ic-deliver/app/base/service/impl/bizchance/deliverybillSve.js
View file @
179dda15
...
...
@@ -238,7 +238,17 @@ class DeliverybillService extends ServiceBase {
}
async
insertInfo
(
qobj
)
{
//*插入交付单信息*/从队列取数据的时候用
return
await
this
.
dao
.
insertInfo
(
qobj
);
switch
(
qobj
.
businessType
)
{
case
"QYJYTC1"
:
//工商执照办理、银行开户、税务报到
return
await
this
.
dao
.
insertInfoPackage
(
qobj
,
[
"companyCase"
,
"openBankAccountCase"
,
"taxCase"
]);
case
"QYJYTC2"
:
//工商执照办理、银行开户、税务报到、注册地址服务(一年期)、代理记账(一年期
return
await
this
.
dao
.
insertInfoPackage
(
qobj
,
[
"companyCase"
,
"openBankAccountCase"
,
"taxCase"
,
"regAddrCase1"
,
"agentCase1"
]);
default
:
// 非套餐类产品
return
await
this
.
dao
.
insertInfo
(
qobj
);
}
}
async
insertInfoall
(
pobj
)
{
//*插入交付单信息,大事务*/从队列取数据的时候用
...
...
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