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
471f0989
Commit
471f0989
authored
Aug 21, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tx-fi-tax' of gitlab.gongsibao.com:jiangyong/zhichan into tx-fi-tax
parents
92332523
dd61f5ef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
232 additions
and
65 deletions
+232
-65
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+0
-0
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
+42
-14
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
+45
-47
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
+9
-4
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
+136
-0
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
471f0989
This diff is collapsed.
Click to expand it.
tx-fi-tax/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
471f0989
...
@@ -143,7 +143,6 @@ class DeliverybillCtl extends CtlBase {
...
@@ -143,7 +143,6 @@ class DeliverybillCtl extends CtlBase {
// 创建服务实例
// 创建服务实例
async
insertInfo
(
pobj
,
qobj
,
req
)
{
async
insertInfo
(
pobj
,
qobj
,
req
)
{
// console.log(pobj);
// 检验各项必传参数
// 检验各项必传参数
if
(
pobj
.
requestId
&&
pobj
.
requestId
!=
'undefined'
&&
if
(
pobj
.
requestId
&&
pobj
.
requestId
!=
'undefined'
&&
pobj
.
bizId
&&
pobj
.
bizId
!=
'undefined'
&&
pobj
.
bizId
&&
pobj
.
bizId
!=
'undefined'
&&
...
@@ -160,30 +159,54 @@ class DeliverybillCtl extends CtlBase {
...
@@ -160,30 +159,54 @@ class DeliverybillCtl extends CtlBase {
pobj
.
delivery_status
&&
pobj
.
delivery_status
!=
'undefined'
&&
pobj
.
delivery_status
&&
pobj
.
delivery_status
!=
'undefined'
&&
pobj
.
facilitator_id
&&
pobj
.
facilitator_id
!=
'undefined'
)
{
pobj
.
facilitator_id
&&
pobj
.
facilitator_id
!=
'undefined'
)
{
try
{
try
{
// console.log(pobj);
var
buInfo
=
await
this
.
service
.
insertInfo
(
pobj
);
var
buInfo
=
await
this
.
service
.
insertInfo
(
pobj
);
var
logInfo
=
{
"flowType"
:
"DELIVERY"
,
"flowId"
:
buInfo
.
id
,
"statusCode"
:
buInfo
.
delivery_status
,
"status_reason"
:
""
}
await
this
.
logService
.
insertInfo
(
logInfo
);
//插入状态日至表
return
system
.
getResult
(
buInfo
);
return
system
.
getResult
(
buInfo
);
}
catch
(
error
)
{
}
catch
(
error
)
{
// console.log(error);
return
system
.
getResultError
(
error
);
return
system
.
getResultError
(
error
);
}
}
}
else
{
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
return
system
.
getResultError
(
"参数错误!"
);
}
}
}
}
async
updateServer
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
pobj
.
requestId
||
pobj
.
requestId
==
'undefined'
)
{
throw
new
Error
(
"requestId 不能为空"
);
}
if
(
!
pobj
.
bizId
||
pobj
.
bizId
==
'undefined'
)
{
throw
new
Error
(
"bizId 不能为空"
);
}
if
(
!
pobj
.
orderId
||
pobj
.
orderId
==
'undefined'
)
{
throw
new
Error
(
"orderId 不能为空"
);
}
if
(
!
pobj
.
topOrgCode
||
pobj
.
topOrgCode
==
'undefined'
)
{
throw
new
Error
(
"topOrgCode 不能为空"
);
}
if
(
!
pobj
.
companyName
||
pobj
.
companyName
==
'undefined'
)
{
throw
new
Error
(
"companyName 不能为空"
);
}
if
(
!
pobj
.
contactName
||
pobj
.
contactName
==
'undefined'
)
{
throw
new
Error
(
"contactName 不能为空"
);
}
if
(
!
pobj
.
companyBizType
||
pobj
.
companyBizType
==
'undefined'
)
{
throw
new
Error
(
"companyBizType 不能为空"
);
}
if
(
!
pobj
.
uscc
||
pobj
.
uscc
==
'undefined'
)
{
throw
new
Error
(
"uscc 不能为空"
);
}
const
rs
=
await
this
.
service
.
updateServer
(
pobj
);
return
system
.
getResult
(
rs
);
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
}
}
}
module
.
exports
=
DeliverybillCtl
;
module
.
exports
=
DeliverybillCtl
;
// var task = new DeliverybillCtl();
// var task = new DeliverybillCtl();
// var obj = {
// var obj = {
// "orderId": "
341184456620455_book
",
// "orderId": "
241284456620422
",
// "source_number": "tx",
// "source_number": "tx",
// "demand_code": "demand_code",
// "demand_code": "demand_code",
// "sku_code": "sku_code",
// "sku_code": "sku_code",
...
@@ -196,14 +219,18 @@ module.exports = DeliverybillCtl;
...
@@ -196,14 +219,18 @@ module.exports = DeliverybillCtl;
// "facilitator_name": "公司宝",
// "facilitator_name": "公司宝",
// "source_name": "tencentCloud",
// "source_name": "tencentCloud",
// "requestId": "282da0a74432-738f-4bed-b48d-d51aa433",
// "requestId": "282da0a74432-738f-4bed-b48d-d51aa433",
// "bizId": "12927486
32
",
// "bizId": "12927486
23
",
// "contactsPhone": "18510669321",
// "contactsPhone": "18510669321",
// "userId": "10973452443103156",
// "userId": "10973452443103156",
// "areaType": "city",
// "areaType": "city",
// "area": "100010",
// "area": "100010",
// "topOrgCode": "rong_yi_suan",
// "topOrgCode": "rong_yi_suan",
// "taxpayerType": 1
// "taxpayerType": "generalTaxpayer",
// "companyName": "汉唐信通",
// "contactName": "王麻子",
// "companyBizType": "1",
// "uscc": "企业社会统一信用代码"
// };
// };
// task.
insertInfo
(obj, {}, {}).then(d => {
// task.
updateServer
(obj, {}, {}).then(d => {
// console.log(JSON.stringify(d));
// console.log(JSON.stringify(d));
// })
// })
\ No newline at end of file
tx-fi-tax/app/base/db/impl/bizchance/bizoptDao.js
View file @
471f0989
...
@@ -13,9 +13,23 @@ class BizoptDao extends Dao {
...
@@ -13,9 +13,23 @@ class BizoptDao extends Dao {
}
else
{
}
else
{
//需要添加公司查询条件
//需要添加公司查询条件
qw
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
)
qw
[
"facilitator_id"
]
=
Number
(
qobj
.
company_id
)
// 为空说明是管理员,不需设置组织结构过滤
/**
if
(
qobj
.
opath
&&
qobj
.
opath
!=
""
)
{
* 数据权限过滤
qw
[
"salesman_opcode"
]
=
{
[
this
.
db
.
Op
.
like
]:
`%
${
qobj
.
opath
}
%`
}
* 1. 管理员 (opath 为空)、 销售主管(isPrincipal = true) 、 销售 (isPrincipal = false && opath不为空)
*/
if
(
!
qobj
.
opath
)
{
// 管理员 不做处理
}
else
if
(
qobj
.
isPrincipal
)
{
// 销售主管 查询为空和自己组织结构下的
qw
[
"$or"
]
=
[
{
salesman_opcode
:
{
$eq
:
null
}
},
{
salesman_opcode
:
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
]
}
else
{
// 销售 查询自己的
qw
[
"salesman_opcode"
]
=
{
$like
:
`%
${
qobj
.
opath
}
%`
}
}
}
//不是来自平台前端查询
//不是来自平台前端查询
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
.
indexOf
(
"pmx"
)
<
0
)
{
...
@@ -29,12 +43,7 @@ class BizoptDao extends Dao {
...
@@ -29,12 +43,7 @@ class BizoptDao extends Dao {
[
this
.
db
.
Op
.
eq
]:
"received"
[
this
.
db
.
Op
.
eq
]:
"received"
};
};
}
}
if
(
qobj
.
bizpath
.
indexOf
(
"demandfollow"
)
>
0
)
{
//从需求跟进列表过来的
if
(
qobj
.
bizpath
.
indexOf
(
"demandfollow"
)
>
0
||
qobj
.
bizpath
.
indexOf
(
"distributionManagement"
)
>
0
)
{
//从需求跟进列表或分配记录列表过来的
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
in
]:
[
"beforeFollowUp"
,
"followingUp"
,
"beforeSubmission"
]
};
}
if
(
qobj
.
bizpath
.
indexOf
(
"distributionManagement"
)
>
0
)
{
//从分配记录列表过来的
qw
[
"business_status"
]
=
{
qw
[
"business_status"
]
=
{
[
this
.
db
.
Op
.
ne
]:
"received"
[
this
.
db
.
Op
.
ne
]:
"received"
};
};
...
@@ -57,8 +66,7 @@ class BizoptDao extends Dao {
...
@@ -57,8 +66,7 @@ class BizoptDao extends Dao {
var
setobj
=
{
"business_status"
:
qobj
.
business_status
};
var
setobj
=
{
"business_status"
:
qobj
.
business_status
};
if
(
qobj
.
close_reason
&&
qobj
.
close_reason
!=
'undefined'
)
{
if
(
qobj
.
close_reason
&&
qobj
.
close_reason
!=
'undefined'
)
{
setobj
[
"close_reason"
]
=
qobj
.
close_reason
;
setobj
[
"close_reason"
]
=
qobj
.
close_reason
;
}
}
else
{
else
{
setobj
[
"close_reason"
]
=
""
;
setobj
[
"close_reason"
]
=
""
;
}
}
var
whereobj
=
{
"demand_code"
:
qobj
.
demand_code
};
var
whereobj
=
{
"demand_code"
:
qobj
.
demand_code
};
...
@@ -95,47 +103,35 @@ class BizoptDao extends Dao {
...
@@ -95,47 +103,35 @@ class BizoptDao extends Dao {
var
obj
=
{
var
obj
=
{
"demand_code"
:
qobj
.
businessMode
,
"demand_code"
:
qobj
.
businessMode
,
"business_type"
:
qobj
.
businessType
,
"business_type"
:
qobj
.
businessType
,
"business_status"
:
qobj
.
currentStatus
,
"business_status"
:
qobj
.
bussinessStatus
,
"business_info"
:
{}
"business_info"
:
{},
"source_number"
:
qobj
.
sourceNumber
,
"service_address"
:
qobj
.
serviceAddress
,
"facilitator_id"
:
qobj
.
favilitatorID
,
"facilitator_name"
:
qobj
.
favilitatorName
,
"source_name"
:
qobj
.
sourceName
,
};
};
if
(
qobj
.
channelSource
&&
qobj
.
channelSource
!=
'undefined'
)
{
//business_info START
obj
.
source_name
=
qobj
.
channelSource
;
if
(
qobj
.
topOrgCode
&&
qobj
.
topOrgCode
!=
'undefined'
)
{
}
obj
.
business_info
.
topOrgCode
=
qobj
.
topOrgCode
if
(
qobj
.
sourceNumber
&&
qobj
.
sourceNumber
!=
'undefined'
)
{
obj
.
source_number
=
qobj
.
sourceNumber
;
}
if
(
qobj
.
serviceCode
&&
qobj
.
serviceCode
!=
'undefined'
)
{
obj
.
service_address
=
qobj
.
serviceCode
;
}
}
if
(
qobj
.
memoInfo
&&
qobj
.
memoInfo
!=
'undefined'
)
{
if
(
qobj
.
intentionBizId
&&
qobj
.
intentionBizId
!=
'undefined'
)
{
obj
.
business_info
.
memoInfo
=
qobj
.
memoInfo
;
obj
.
business_info
.
intentionBizId
=
qobj
.
intentionBizId
;
}
}
if
(
qobj
.
statusReason
&&
qobj
.
statusReason
!=
'undefined'
)
{
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
statusReason
;
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
}
}
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
)
{
if
(
qobj
.
contactsName
&&
qobj
.
contactsName
!=
'undefined'
)
{
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
obj
.
business_info
.
contactsName
=
qobj
.
contactsName
;
}
}
if
(
qobj
.
contactsPhone
&&
qobj
.
contactsPhone
!=
'undefined'
)
{
obj
.
business_info
.
contactsPhone
=
qobj
.
contactsPhone
;
//已经加密
}
if
(
qobj
.
serviceName
&&
qobj
.
serviceName
!=
'undefined'
)
{
if
(
qobj
.
serviceName
&&
qobj
.
serviceName
!=
'undefined'
)
{
obj
.
business_info
.
serviceName
=
qobj
.
serviceName
;
obj
.
business_info
.
serviceName
=
qobj
.
serviceName
;
}
}
if
(
qobj
.
businessName
&&
qobj
.
businessName
!=
'undefined'
)
{
obj
.
business_info
.
businessName
=
qobj
.
businessName
;
//bussiness_info END
}
//other
if
(
qobj
.
UserName
&&
qobj
.
UserName
!=
'undefined'
)
{
if
(
qobj
.
closeReason
&&
qobj
.
closeReason
!=
'undefined'
)
{
obj
.
business_info
.
userName
=
qobj
.
UserNames
;
obj
.
close_reason
=
qobj
.
closeReason
;
}
if
(
qobj
.
companyName
&&
qobj
.
companyName
!=
'undefined'
)
{
obj
.
business_info
.
companyName
=
qobj
.
companyName
;
}
if
(
qobj
.
servicerCode
&&
qobj
.
servicerCode
!=
'undefined'
)
{
obj
.
facilitator_id
=
qobj
.
servicerCode
;
}
if
(
qobj
.
servicerName
&&
qobj
.
servicerName
!=
'undefined'
)
{
obj
.
facilitator_name
=
qobj
.
servicerName
;
}
}
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
if
(
qobj
.
salesmanOpcode
&&
qobj
.
salesmanOpcode
!=
'undefined'
)
{
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
obj
.
salesman_opcode
=
qobj
.
salesmanOpcode
;
...
@@ -143,15 +139,16 @@ class BizoptDao extends Dao {
...
@@ -143,15 +139,16 @@ class BizoptDao extends Dao {
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
if
(
qobj
.
salesmanId
&&
qobj
.
salesmanId
!=
'undefined'
)
{
obj
.
salesman_id
=
qobj
.
salesmanId
;
obj
.
salesman_id
=
qobj
.
salesmanId
;
}
}
if
(
qobj
.
clerkName
&&
qobj
.
clerk
Name
!=
'undefined'
)
{
if
(
qobj
.
salesmanName
&&
qobj
.
salesman
Name
!=
'undefined'
)
{
obj
.
salesman_name
=
qobj
.
clerk
Name
;
obj
.
salesman_name
=
qobj
.
salesman
Name
;
}
}
if
(
qobj
.
clerkPhone
&&
qobj
.
clerk
Phone
!=
'undefined'
)
{
if
(
qobj
.
salesmanPhone
&&
qobj
.
salesman
Phone
!=
'undefined'
)
{
obj
.
salesman_phone
=
qobj
.
clerk
Phone
;
obj
.
salesman_phone
=
qobj
.
salesman
Phone
;
}
}
return
await
this
.
create
(
obj
,
t
);
return
await
this
.
create
(
obj
,
t
);
}
}
}
}
module
.
exports
=
BizoptDao
;
module
.
exports
=
BizoptDao
;
\ No newline at end of file
tx-fi-tax/app/base/db/impl/bizchance/deliverybillDao.js
View file @
471f0989
...
@@ -70,8 +70,6 @@ class DeliverybillDao extends Dao {
...
@@ -70,8 +70,6 @@ class DeliverybillDao extends Dao {
}
}
async
insertInfo
(
qobj
,
t
)
{
async
insertInfo
(
qobj
,
t
)
{
// console.log("dao层qobj===>");
// console.log(qobj);
var
obj
=
{
var
obj
=
{
"delivery_code"
:
qobj
.
orderId
,
"delivery_code"
:
qobj
.
orderId
,
"product_code"
:
qobj
.
product_code
,
"product_code"
:
qobj
.
product_code
,
...
@@ -183,9 +181,16 @@ class DeliverybillDao extends Dao {
...
@@ -183,9 +181,16 @@ class DeliverybillDao extends Dao {
delete
qobj
.
delivery_status
;
delete
qobj
.
delivery_status
;
delete
qobj
.
facilitator_id
;
delete
qobj
.
facilitator_id
;
obj
.
delivery_info
=
qobj
;
obj
.
delivery_info
=
qobj
;
// console.log("dao层obj===>");
// console.log(obj);
return
await
this
.
create
(
obj
,
t
);
return
await
this
.
create
(
obj
,
t
);
}
}
async
updateServer
(
qobj
,
whereobj
,
t
)
{
return
await
this
.
updateByWhere
(
qobj
,
whereobj
,
t
);
}
async
findOneByDeliveryCodeAndBizId
(
qobj
)
{
var
qcwhere
=
{
"delivery_code"
:
qobj
.
orderId
,
"biz_id"
:
qobj
.
bizId
};
return
await
this
.
findOne
(
qcwhere
);
}
}
}
module
.
exports
=
DeliverybillDao
;
module
.
exports
=
DeliverybillDao
;
tx-fi-tax/app/base/service/impl/bizchance/deliverybillSve.js
View file @
471f0989
...
@@ -240,5 +240,140 @@ class DeliverybillService extends ServiceBase {
...
@@ -240,5 +240,140 @@ class DeliverybillService extends ServiceBase {
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
});
}
}
async
updateServer
(
qobj
)
{
var
self
=
this
;
var
bill
=
await
self
.
dao
.
findOneByDeliveryCodeAndBizId
(
qobj
);
var
obj
=
{};
var
whereobj
=
{
"delivery_code"
:
qobj
.
orderId
,
"biz_id"
:
qobj
.
bizId
};
// source_number
if
(
qobj
.
source_number
&&
qobj
.
source_number
!=
'undefined'
)
{
obj
.
source_number
=
qobj
.
source_number
;
delete
qobj
.
source_number
;
}
// demand_code
if
(
qobj
.
demand_code
&&
qobj
.
demand_code
!=
'undefined'
)
{
obj
.
demand_code
=
qobj
.
demand_code
;
delete
qobj
.
demand_code
;
}
// sku_code
if
(
qobj
.
sku_code
&&
qobj
.
sku_code
!=
'undefined'
)
{
obj
.
sku_code
=
qobj
.
sku_code
;
delete
qobj
.
sku_code
;
}
// scheme_number
if
(
qobj
.
solutionBizId
&&
qobj
.
solutionBizId
!=
'undefined'
)
{
obj
.
scheme_number
=
qobj
.
solutionBizId
;
delete
qobj
.
solutionBizId
;
}
// product_code
if
(
qobj
.
product_code
&&
qobj
.
product_code
!=
'undefined'
)
{
obj
.
product_code
=
qobj
.
product_code
;
delete
qobj
.
product_code
;
}
// product_name
if
(
qobj
.
product_name
&&
qobj
.
product_name
!=
'undefined'
)
{
obj
.
product_name
=
qobj
.
product_name
;
delete
qobj
.
product_name
;
}
// service_address
if
(
qobj
.
service_address
&&
qobj
.
service_address
!=
'undefined'
)
{
obj
.
service_address
=
qobj
.
service_address
;
delete
qobj
.
service_address
;
}
// delivery_status
if
(
qobj
.
delivery_status
&&
qobj
.
delivery_status
!=
'undefined'
)
{
obj
.
delivery_status
=
qobj
.
delivery_status
;
delete
qobj
.
delivery_status
;
}
// selling_price
if
(
qobj
.
selling_price
&&
qobj
.
selling_price
!=
'undefined'
)
{
obj
.
selling_price
=
qobj
.
selling_price
;
delete
qobj
.
selling_price
;
}
// cost_price
if
(
qobj
.
cost_price
&&
qobj
.
cost_price
!=
'undefined'
)
{
obj
.
cost_price
=
qobj
.
cost_price
;
delete
qobj
.
cost_price
;
}
// close_reason
if
(
qobj
.
close_reason
&&
qobj
.
close_reason
!=
'undefined'
)
{
obj
.
close_reason
=
qobj
.
close_reason
;
delete
qobj
.
close_reason
;
}
// facilitator_id
if
(
qobj
.
facilitator_id
&&
qobj
.
facilitator_id
!=
'undefined'
)
{
obj
.
facilitator_id
=
qobj
.
facilitator_id
;
delete
qobj
.
facilitator_id
;
}
// facilitator_name
if
(
qobj
.
facilitator_name
&&
qobj
.
facilitator_name
!=
'undefined'
)
{
obj
.
facilitator_name
=
qobj
.
facilitator_name
;
delete
qobj
.
facilitator_name
;
}
// salesman_opcode
if
(
qobj
.
salesman_opcode
&&
qobj
.
salesman_opcode
!=
'undefined'
)
{
obj
.
salesman_opcode
=
qobj
.
salesman_opcode
;
delete
qobj
.
salesman_opcode
;
}
// salesman_id
if
(
qobj
.
salesman_id
&&
qobj
.
salesman_id
!=
'undefined'
)
{
obj
.
salesman_id
=
qobj
.
salesman_id
;
delete
qobj
.
salesman_id
;
}
// salesman_name
if
(
qobj
.
salesman_name
&&
qobj
.
salesman_name
!=
'undefined'
)
{
obj
.
salesman_name
=
qobj
.
salesman_name
;
delete
qobj
.
salesman_name
;
}
// salesman_phone
if
(
qobj
.
salesman_phone
&&
qobj
.
salesman_phone
!=
'undefined'
)
{
obj
.
salesman_phone
=
qobj
.
salesman_phone
;
delete
qobj
.
salesman_phone
;
}
// source_name
if
(
qobj
.
source_name
&&
qobj
.
source_name
!=
'undefined'
)
{
obj
.
source_name
=
qobj
.
source_name
;
delete
qobj
.
source_name
;
}
// master_source_number
if
(
qobj
.
master_source_number
&&
qobj
.
master_source_number
!=
'undefined'
)
{
obj
.
master_source_number
=
qobj
.
master_source_number
;
delete
qobj
.
master_source_number
;
}
// settle_status
if
(
qobj
.
settle_status
&&
qobj
.
settle_status
!=
'undefined'
)
{
obj
.
settle_status
=
qobj
.
settle_status
;
delete
qobj
.
settle_status
;
}
// settlebill_id
if
(
qobj
.
settlebill_id
&&
qobj
.
settlebill_id
!=
'undefined'
)
{
obj
.
settlebill_id
=
qobj
.
settlebill_id
;
delete
qobj
.
settlebill_id
;
}
// delivery_man_id
if
(
qobj
.
delivery_man_id
&&
qobj
.
delivery_man_id
!=
'undefined'
)
{
obj
.
delivery_man_id
=
qobj
.
delivery_man_id
;
delete
qobj
.
delivery_man_id
;
}
// delivery_man_name
if
(
qobj
.
delivery_man_name
&&
qobj
.
delivery_man_name
!=
'undefined'
)
{
obj
.
delivery_man_name
=
qobj
.
delivery_man_name
;
delete
qobj
.
delivery_man_name
;
}
// delivery_man_opcode
if
(
qobj
.
delivery_man_opcode
&&
qobj
.
delivery_man_opcode
!=
'undefined'
)
{
obj
.
delivery_man_opcode
=
qobj
.
delivery_man_opcode
;
delete
qobj
.
delivery_man_opcode
;
}
delete
qobj
.
orderId
;
obj
.
delivery_info
=
JSON
.
parse
((
JSON
.
stringify
(
bill
.
delivery_info
)
+
JSON
.
stringify
(
qobj
)).
replace
(
/}{/
,
','
));
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateServer
(
obj
,
whereobj
,
t
);
});
}
}
}
module
.
exports
=
DeliverybillService
;
module
.
exports
=
DeliverybillService
;
\ 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