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
caaa2e5e
Commit
caaa2e5e
authored
Feb 20, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
bfb2bd21
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
137 deletions
+139
-137
igirl-channel/app/base/service/impl/dbcorder/orderinfoSve.js
+132
-130
igirl-channel/app/front/entry/public/apidoc/opTrademark/icbc.md
+7
-7
No files found.
igirl-channel/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
caaa2e5e
...
@@ -20,14 +20,14 @@ class OrderInfoService extends ServiceBase {
...
@@ -20,14 +20,14 @@ class OrderInfoService extends ServiceBase {
/*
/*
* 订单验证
* 订单验证
*/
*/
async
isOrderVerify
(
serviceitem
,
buyProductCount
,
buyPrice
)
{
async
isOrderVerify
(
serviceitem
,
buyProductCount
,
buyPrice
)
{
var
sveItemRateConfig
=
serviceitem
.
rateConfig
?
Number
(
serviceitem
.
rateConfig
)
:
0
;
//产品费率
var
sveItemRateConfig
=
serviceitem
.
rateConfig
?
Number
(
serviceitem
.
rateConfig
)
:
0
;
//产品费率
var
fwf
=
serviceitem
.
serviceCharge
?
Number
(
serviceitem
.
serviceCharge
)
:
0
;
//服务费
var
fwf
=
serviceitem
.
serviceCharge
?
Number
(
serviceitem
.
serviceCharge
)
:
0
;
//服务费
var
yhfl
=
serviceitem
.
discountsRateConfig
?
Number
(
serviceitem
.
discountsRateConfig
)
:
0
;
//最大优惠费率
var
yhfl
=
serviceitem
.
discountsRateConfig
?
Number
(
serviceitem
.
discountsRateConfig
)
:
0
;
//最大优惠费率
var
gf
=
serviceitem
.
publicExpense
?
Number
(
serviceitem
.
publicExpense
)
:
0
;
//产品官费
var
gf
=
serviceitem
.
publicExpense
?
Number
(
serviceitem
.
publicExpense
)
:
0
;
//产品官费
var
productCount
=
1
;
//产品数量
var
productCount
=
1
;
//产品数量
var
gfze
=
0
;
//官费总额
var
gfze
=
0
;
//官费总额
var
qdfcbl
=
serviceitem
.
channelProfitRate
?
Number
(
serviceitem
.
channelProfitRate
)
:
0
;
//渠道利润分成比率
var
qdfcbl
=
serviceitem
.
channelProfitRate
?
Number
(
serviceitem
.
channelProfitRate
)
:
0
;
//渠道利润分成比率
productCount
=
Number
(
buyProductCount
);
//购买产品数量
productCount
=
Number
(
buyProductCount
);
//购买产品数量
buyPrice
=
Number
(
buyPrice
);
//购买价格
buyPrice
=
Number
(
buyPrice
);
//购买价格
gfze
=
gf
*
Number
(
productCount
);
gfze
=
gf
*
Number
(
productCount
);
...
@@ -52,131 +52,133 @@ class OrderInfoService extends ServiceBase {
...
@@ -52,131 +52,133 @@ class OrderInfoService extends ServiceBase {
if
(
yhje
>
zdyhe
)
{
if
(
yhje
>
zdyhe
)
{
return
{
code
:
-
205
,
msg
:
"优惠总额有误"
};
return
{
code
:
-
205
,
msg
:
"优惠总额有误"
};
}
}
var
fcmlze_channel
=
mlze
*
qdfcbl
;
//订单渠道分成毛利润总额
var
fcmlze_channel
=
mlze
*
qdfcbl
;
//订单渠道分成毛利润总额
var
fcmlze_platform
=
mlze
-
fcmlze_channel
;
//订单平台毛利润总额
var
fcmlze_platform
=
mlze
-
fcmlze_channel
;
//订单平台毛利润总额
return
{
code
:
1
,
data
:{
return
{
totalServiceCharge
:
fwfze
,
// 服务费总额(产品配置的服务费*订单件数)
code
:
1
,
data
:
{
totalPublicExpense
:
gfze
,
// 官费总额(产品配置的官费*订单件数)
totalServiceCharge
:
fwfze
,
// 服务费总额(产品配置的服务费*订单件数)
totalTaxes
:
sfze
,
// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalPublicExpense
:
gfze
,
// 官费总额(产品配置的官费*订单件数)
totalSum
:
buyPrice
,
// 订单总额(产品价格×优惠费率×订单件数)
totalTaxes
:
sfze
,
// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalProfitSum
:
mlze
,
// 订单毛利润总额(订单总额-官费总额)
totalSum
:
buyPrice
,
// 订单总额(产品价格×优惠费率×订单件数)
totalDiscounts
:
yhje
,
// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
totalProfitSum
:
mlze
,
// 订单毛利润总额(订单总额-官费总额)
pfProfitSum
:
fcmlze_platform
,
// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
totalDiscounts
:
yhje
,
// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
channelProfitSum
:
fcmlze_channel
,
// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
pfProfitSum
:
fcmlze_platform
,
// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
}};
channelProfitSum
:
fcmlze_channel
,
// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
}
};
}
}
/**
/**
* 创建订单
* 创建订单
*/
*/
async
createOrder
(
obj
,
req
)
{
async
createOrder
(
obj
,
req
)
{
var
self
=
this
;
var
self
=
this
;
var
app
=
req
.
app
;
var
app
=
req
.
app
;
var
user
=
req
.
user
;
var
user
=
req
.
user
;
if
(
!
app
||
!
app
.
uAppId
)
{
if
(
!
app
||
!
app
.
uAppId
)
{
return
system
.
getResult
(
null
,
"渠道信息有误"
);
return
system
.
getResult
(
null
,
"渠道信息有误"
);
}
}
if
(
!
user
)
{
if
(
!
user
)
{
return
system
.
getResult
(
null
,
"用户信息有误"
);
return
system
.
getResult
(
null
,
"用户信息有误"
);
}
}
var
channelItemCode
=
obj
.
itemCode
;
var
channelItemCode
=
obj
.
itemCode
;
if
(
!
channelItemCode
)
{
if
(
!
channelItemCode
)
{
return
system
.
getResult
(
null
,
"未知的产品码"
);
return
system
.
getResult
(
null
,
"未知的产品码"
);
}
}
var
productItem
=
await
this
.
appproductDao
.
findOneByChannelItemCode
(
channelItemCode
,
app
.
id
);
//通过ChannelItemCode获取产品
var
productItem
=
await
this
.
appproductDao
.
findOneByChannelItemCode
(
channelItemCode
,
app
.
id
);
//通过ChannelItemCode获取产品
// if (!productItem) {
// if (!productItem) {
// return system.getResult(null, "未知的产品");
// return system.getResult(null, "未知的产品");
// }
// }
var
verifyResult
=
null
;
var
verifyResult
=
null
;
if
(
productItem
)
{
if
(
productItem
)
{
if
(
productItem
.
status
!=
1
)
{
if
(
productItem
.
status
!=
1
)
{
return
system
.
getResult
(
null
,
"产品已禁用"
);
return
system
.
getResult
(
null
,
"产品已禁用"
);
}
}
}
}
var
channelUser
=
obj
.
channelUser
;
var
channelUser
=
obj
.
channelUser
;
if
(
!
channelUser
||
!
channelUser
.
channelUserId
)
{
if
(
!
channelUser
||
!
channelUser
.
channelUserId
)
{
return
system
.
getResult
(
null
,
"渠道用户信息有误"
);
return
system
.
getResult
(
null
,
"渠道用户信息有误"
);
}
}
var
channelOrder
=
obj
.
channelOrder
;
var
channelOrder
=
obj
.
channelOrder
;
if
(
!
channelOrder
||
!
channelOrder
.
channelServiceNo
)
{
if
(
!
channelOrder
||
!
channelOrder
.
channelServiceNo
)
{
return
system
.
getResult
(
null
,
"渠道订单信息有误"
);
return
system
.
getResult
(
null
,
"渠道订单信息有误"
);
}
}
if
(
!
channelOrder
.
quantity
)
{
if
(
!
channelOrder
.
quantity
)
{
return
system
.
getResult
(
null
,
"渠道订单产品数量不能为空"
);
return
system
.
getResult
(
null
,
"渠道订单产品数量不能为空"
);
}
}
if
(
!
channelOrder
.
totalSum
)
{
if
(
!
channelOrder
.
totalSum
)
{
return
system
.
getResult
(
null
,
"渠道订单支付金额不能为空"
);
return
system
.
getResult
(
null
,
"渠道订单支付金额不能为空"
);
}
}
if
(
productItem
)
{
if
(
productItem
)
{
verifyResult
=
await
self
.
isOrderVerify
(
productItem
,
channelOrder
.
quantity
,
channelOrder
.
totalSum
);
verifyResult
=
await
self
.
isOrderVerify
(
productItem
,
channelOrder
.
quantity
,
channelOrder
.
totalSum
);
if
(
verifyResult
&&
verifyResult
.
code
!=
1
)
{
if
(
verifyResult
&&
verifyResult
.
code
!=
1
)
{
return
system
.
getResult
(
null
,
verifyResult
.
msg
);
return
system
.
getResult
(
null
,
verifyResult
.
msg
);
}
}
}
}
var
beforeOrder
=
await
this
.
dao
.
model
.
findOne
({
var
beforeOrder
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
channelServiceNo
:
channelOrder
.
channelServiceNo
,
uapp_id
:
app
.
uAppId
},
where
:
{
channelServiceNo
:
channelOrder
.
channelServiceNo
,
uapp_id
:
app
.
uAppId
},
raw
:
true
raw
:
true
});
});
if
(
beforeOrder
)
{
//订单已存在
if
(
beforeOrder
)
{
//订单已存在
return
system
.
getResultFail
(
2
,
"订单已存在"
,
beforeOrder
.
orderNo
);
return
system
.
getResultFail
(
2
,
"订单已存在"
,
beforeOrder
.
orderNo
);
}
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
orderNo
=
await
self
.
getBusUid
(
"o"
);
var
orderNo
=
await
self
.
getBusUid
(
"o"
);
//创建订单
//创建订单
var
orderObj
=
{
var
orderObj
=
{
uapp_id
:
app
.
uAppId
,
orderNo
:
orderNo
,
channelServiceNo
:
channelOrder
.
channelServiceNo
,
uapp_id
:
app
.
uAppId
,
orderNo
:
orderNo
,
channelServiceNo
:
channelOrder
.
channelServiceNo
,
channelUserId
:
channelUser
.
channelUserId
,
channelOrderNo
:
channelOrder
.
channelOrderNo
,
channelUserId
:
channelUser
.
channelUserId
,
channelOrderNo
:
channelOrder
.
channelOrderNo
,
ownerUserId
:
channelUser
.
channelUserId
,
ownerUserId
:
channelUser
.
channelUserId
,
quantity
:
channelOrder
.
quantity
,
quantity
:
channelOrder
.
quantity
,
needNo
:
channelOrder
.
needNo
,
payTime
:
channelOrder
.
payTime
,
orderPayStatus
:
channelOrder
.
payStatus
,
needNo
:
channelOrder
.
needNo
,
payTime
:
channelOrder
.
payTime
,
orderPayStatus
:
channelOrder
.
payStatus
,
totalSum
:
channelOrder
.
totalSum
,
totalSum
:
channelOrder
.
totalSum
,
payTotalSum
:
channelOrder
.
payTotalSum
,
payTotalSum
:
channelOrder
.
payTotalSum
,
totalServiceCharge
:
0
,
// 服务费总额(产品配置的服务费*订单件数)
totalServiceCharge
:
0
,
// 服务费总额(产品配置的服务费*订单件数)
totalPublicExpense
:
0
,
// 官费总额(产品配置的官费*订单件数)
totalPublicExpense
:
0
,
// 官费总额(产品配置的官费*订单件数)
totalTaxes
:
0
,
// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalTaxes
:
0
,
// 税费总额(订单总额-(订单总额/(1+产品费率)))
totalProfitSum
:
0
,
// 订单毛利润总额(订单总额-官费总额)
totalProfitSum
:
0
,
// 订单毛利润总额(订单总额-官费总额)
totalDiscounts
:
0
,
// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
totalDiscounts
:
0
,
// 优惠总额((服务费总额+官费总额)-订单总额(产品价格×优惠费率×订单件数)>0则有优惠额度)
pfProfitSum
:
0
,
// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
pfProfitSum
:
0
,
// 订单平台毛利润总额(订单毛利润总额-订单渠道分成毛利润总额)
channelProfitSum
:
0
,
// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
channelProfitSum
:
0
,
// 订单渠道分成毛利润总额((订单总额-官费总额)*渠道利润分成比率)
// pfSettleProfit :DataTypes.INTEGER,// 平台结算渠道利润,0否,1是
// pfSettleProfit :DataTypes.INTEGER,// 平台结算渠道利润,0否,1是
invoiceApplyStatus
:
"00"
,
// 发票状态:00: 未申请, 10: 已申请,20:已开票
invoiceApplyStatus
:
"00"
,
// 发票状态:00: 未申请, 10: 已申请,20:已开票
};
};
if
(
verifyResult
&&
verifyResult
.
code
==
1
&&
verifyResult
.
data
)
{
if
(
verifyResult
&&
verifyResult
.
code
==
1
&&
verifyResult
.
data
)
{
var
orderCostObj
=
verifyResult
.
data
;
var
orderCostObj
=
verifyResult
.
data
;
orderObj
.
totalServiceCharge
=
orderCostObj
.
totalServiceCharge
||
0
;
orderObj
.
totalServiceCharge
=
orderCostObj
.
totalServiceCharge
||
0
;
orderObj
.
totalPublicExpense
=
orderCostObj
.
totalPublicExpense
||
0
;
orderObj
.
totalPublicExpense
=
orderCostObj
.
totalPublicExpense
||
0
;
orderObj
.
totalTaxes
=
orderCostObj
.
totalTaxes
||
0
;
orderObj
.
totalTaxes
=
orderCostObj
.
totalTaxes
||
0
;
orderObj
.
totalProfitSum
=
orderCostObj
.
totalProfitSum
||
0
;
orderObj
.
totalProfitSum
=
orderCostObj
.
totalProfitSum
||
0
;
orderObj
.
totalDiscounts
=
orderCostObj
.
totalDiscounts
||
0
;
orderObj
.
totalDiscounts
=
orderCostObj
.
totalDiscounts
||
0
;
orderObj
.
pfProfitSum
=
orderCostObj
.
pfProfitSum
||
0
;
orderObj
.
pfProfitSum
=
orderCostObj
.
pfProfitSum
||
0
;
orderObj
.
channelProfitSum
=
orderCostObj
.
channelProfitSum
||
0
;
orderObj
.
channelProfitSum
=
orderCostObj
.
channelProfitSum
||
0
;
}
}
var
order
=
await
self
.
dao
.
create
(
orderObj
,
t
);
//创建订单
var
order
=
await
self
.
dao
.
create
(
orderObj
,
t
);
//创建订单
//var orderProductNo = await self.getBusUid("op");
//var orderProductNo = await self.getBusUid("op");
if
(
productItem
)
{
if
(
productItem
)
{
var
orderProductObj
=
{
var
orderProductObj
=
{
uapp_id
:
app
.
uAppId
,
uapp_id
:
app
.
uAppId
,
sourceOrderNo
:
order
.
orderNo
,
// 来源单号
sourceOrderNo
:
order
.
orderNo
,
// 来源单号
productType_id
:
productItem
.
productType_id
,
//产品类型Id
productType_id
:
productItem
.
productType_id
,
//产品类型Id
productOneType_id
:
productItem
.
productOneType_id
,
//产品大类Id
productOneType_id
:
productItem
.
productOneType_id
,
//产品大类Id
itemCode
:
productItem
.
itemCode
,
//产品编码
itemCode
:
productItem
.
itemCode
,
//产品编码
itemName
:
productItem
.
itemName
,
//产品名称
itemName
:
productItem
.
itemName
,
//产品名称
channelItemCode
:
productItem
.
channelItemCode
,
// 渠道产品编码
channelItemCode
:
productItem
.
channelItemCode
,
// 渠道产品编码
channelItemName
:
productItem
.
channelItemName
,
// 渠道产品名称
channelItemName
:
productItem
.
channelItemName
,
// 渠道产品名称
serviceItemCode
:
productItem
.
serviceItemCode
,
// 服务商产品编码
serviceItemCode
:
productItem
.
serviceItemCode
,
// 服务商产品编码
picUrl
:
productItem
.
picUrl
,
// 产品图片地址
picUrl
:
productItem
.
picUrl
,
// 产品图片地址
proPrice
:
productItem
.
proPrice
,
// 产品价格
proPrice
:
productItem
.
proPrice
,
// 产品价格
quantity
:
channelOrder
.
quantity
,
// 订单数量(即产品的倍数,默认值为1)
quantity
:
channelOrder
.
quantity
,
// 订单数量(即产品的倍数,默认值为1)
opPayType
:
"00"
,
// 操作付款类型:00: 创建订单, 10: 补单
opPayType
:
"00"
,
// 操作付款类型:00: 创建订单, 10: 补单
serviceItemSnapshot
:
JSON
.
stringify
(
productItem
),
//产品快照
serviceItemSnapshot
:
JSON
.
stringify
(
productItem
),
//产品快照
};
};
var
orderProduct
=
await
self
.
orderProductDao
.
create
(
orderProductObj
,
t
);
//订单产品
var
orderProduct
=
await
self
.
orderProductDao
.
create
(
orderProductObj
,
t
);
//订单产品
}
}
if
(
order
.
totalSum
>
0
)
{
//支付成功
if
(
order
.
totalSum
>
0
)
{
//支付成功
var
moneyObj
=
{
var
moneyObj
=
{
uapp_id
:
app
.
uAppId
,
uapp_id
:
app
.
uAppId
,
sourceOrderNo
:
order
.
orderNo
,
// 来源单号
sourceOrderNo
:
order
.
orderNo
,
// 来源单号
channelUserId
:
channelUser
.
channelUserId
,
channelUserId
:
channelUser
.
channelUserId
,
ownerUserId
:
channelUser
.
channelUserId
,
ownerUserId
:
channelUser
.
channelUserId
,
accountType
:
"other"
,
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
accountType
:
"other"
,
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
directionType
:
"sr"
,
//凭单类型,"sr": "收","zc": "支"
directionType
:
"sr"
,
//凭单类型,"sr": "收","zc": "支"
voucherDate
:
channelOrder
.
payTime
,
//凭单时间
voucherDate
:
channelOrder
.
payTime
,
//凭单时间
...
@@ -184,13 +186,13 @@ class OrderInfoService extends ServiceBase {
...
@@ -184,13 +186,13 @@ class OrderInfoService extends ServiceBase {
sourceType
:
"orderinfo"
,
//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
sourceType
:
"orderinfo"
,
//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
auditStatus
:
"dsh"
,
//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
auditStatus
:
"dsh"
,
//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
};
};
if
(
channelOrder
.
payStatus
==
'yfk'
||
channelOrder
.
payStatus
==
'bfyfk'
)
{
if
(
channelOrder
.
payStatus
==
'yfk'
||
channelOrder
.
payStatus
==
'bfyfk'
)
{
moneyObj
.
auditStatus
=
"tg"
;
moneyObj
.
auditStatus
=
"tg"
;
}
}
var
moneyJourney
=
await
self
.
moneyJourneyDao
.
create
(
moneyObj
,
t
);
var
moneyJourney
=
await
self
.
moneyJourneyDao
.
create
(
moneyObj
,
t
);
var
orderReceiptVoucherObj
=
{
var
orderReceiptVoucherObj
=
{
uapp_id
:
app
.
uAppId
,
uapp_id
:
app
.
uAppId
,
sourceOrderNo
:
order
.
orderNo
,
// 来源单号
sourceOrderNo
:
order
.
orderNo
,
// 来源单号
accountType
:
"other"
,
accountType
:
"other"
,
payDate
:
channelOrder
.
payTime
,
//支付时间
payDate
:
channelOrder
.
payTime
,
//支付时间
totalSum
:
channelOrder
.
totalSum
,
//订单总额
totalSum
:
channelOrder
.
totalSum
,
//订单总额
...
@@ -201,25 +203,25 @@ class OrderInfoService extends ServiceBase {
...
@@ -201,25 +203,25 @@ class OrderInfoService extends ServiceBase {
// certifyFileUrl: order.orderNo, //支付证明文件Url
// certifyFileUrl: order.orderNo, //支付证明文件Url
wxPayOrderCode
:
order
.
orderNo
,
//业务微信支付订单号
wxPayOrderCode
:
order
.
orderNo
,
//业务微信支付订单号
aliPayOrderCode
:
order
.
orderNo
,
//业务支付宝支付订单号
aliPayOrderCode
:
order
.
orderNo
,
//业务支付宝支付订单号
busPayOrderCode
:
order
.
orderNo
,
//业务支付订单号
busPayOrderCode
:
order
.
orderNo
,
//业务支付订单号
auditStatus
:
"dsh"
auditStatus
:
"dsh"
};
};
if
(
channelOrder
.
payStatus
==
'yfk'
||
channelOrder
.
payStatus
==
'bfyfk'
)
{
if
(
channelOrder
.
payStatus
==
'yfk'
||
channelOrder
.
payStatus
==
'bfyfk'
)
{
orderReceiptVoucherObj
.
auditStatus
=
"tg"
;
orderReceiptVoucherObj
.
auditStatus
=
"tg"
;
}
}
var
orderReceiptVoucher
=
await
self
.
orderReceiptVoucherDao
.
create
(
orderReceiptVoucherObj
,
t
);
var
orderReceiptVoucher
=
await
self
.
orderReceiptVoucherDao
.
create
(
orderReceiptVoucherObj
,
t
);
}
}
var
requestid
=
self
.
getUUID
();
var
requestid
=
self
.
getUUID
();
if
(
productItem
&&
productItem
.
deliveryUrl
)
{
if
(
productItem
&&
productItem
.
deliveryUrl
)
{
obj
[
"orderNo"
]
=
order
.
orderNo
;
obj
[
"orderNo"
]
=
order
.
orderNo
;
self
.
pushData
(
requestid
,
obj
,
productItem
.
deliveryUrl
,
req
);
self
.
pushData
(
requestid
,
obj
,
productItem
.
deliveryUrl
,
req
);
}
}
return
system
.
getResultSuccess
({
return
system
.
getResultSuccess
({
orderNo
:
order
.
orderNo
,
orderNo
:
order
.
orderNo
,
channelServiceNo
:
order
.
channelServiceNo
,
channelServiceNo
:
order
.
channelServiceNo
,
channelParams
:
obj
.
channelParams
,
channelParams
:
obj
.
channelParams
,
requestid
:
requestid
requestid
:
requestid
});
});
});
});
...
@@ -227,7 +229,7 @@ class OrderInfoService extends ServiceBase {
...
@@ -227,7 +229,7 @@ class OrderInfoService extends ServiceBase {
/**
/**
* 数据推送
* 数据推送
*/
*/
async
pushData
(
requestid
,
params
,
url
,
req
)
{
async
pushData
(
requestid
,
params
,
url
,
req
)
{
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
rc
=
system
.
getObject
(
"util.execClient"
);
var
obj
=
params
;
var
obj
=
params
;
var
rtn
=
null
;
var
rtn
=
null
;
...
@@ -265,63 +267,63 @@ class OrderInfoService extends ServiceBase {
...
@@ -265,63 +267,63 @@ class OrderInfoService extends ServiceBase {
});
});
}
}
}
}
async
findAndCountAll
(
obj
,
req
)
{
async
findAndCountAll
(
obj
,
req
)
{
var
app
=
req
.
app
;
var
app
=
req
.
app
;
if
(
!
app
||
!
app
.
uAppId
)
{
if
(
!
app
||
!
app
.
uAppId
)
{
return
system
.
getResult
(
null
,
"渠道信息有误"
);
return
system
.
getResult
(
null
,
"渠道信息有误"
);
}
}
obj
[
"search"
][
"uapp_id"
]
=
app
.
uAppId
;
obj
.
search
.
uapp_id
=
app
.
uAppId
;
const
result
=
await
this
.
dao
.
findAndCountAll
(
obj
);
const
result
=
await
this
.
dao
.
findAndCountAll
(
obj
);
return
system
.
getResultSuccess
(
result
);
return
system
.
getResultSuccess
(
result
);
}
}
async
getOrderDetailByOrderNo
(
obj
,
req
)
{
async
getOrderDetailByOrderNo
(
obj
,
req
)
{
var
orderNo
=
obj
.
orderNo
;
var
orderNo
=
obj
.
orderNo
;
if
(
!
orderNo
)
{
if
(
!
orderNo
)
{
return
system
.
getResult
(
null
,
"订单编号不能为空"
);
return
system
.
getResult
(
null
,
"订单编号不能为空"
);
}
}
var
app
=
req
.
app
;
var
app
=
req
.
app
;
if
(
!
app
||
!
app
.
uAppId
)
{
if
(
!
app
||
!
app
.
uAppId
)
{
return
system
.
getResult
(
null
,
"渠道信息有误"
);
return
system
.
getResult
(
null
,
"渠道信息有误"
);
}
}
var
order
=
await
this
.
dao
.
model
.
findOne
({
var
order
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
orderNo
:
orderNo
,
uapp_id
:
app
.
uAppId
},
where
:
{
orderNo
:
orderNo
,
uapp_id
:
app
.
uAppId
},
attributes
:
[
"orderNo"
,
"channelServiceNo"
,
"channelOrderNo"
,
"channelUserId"
,
"ownerUserId"
,
"needNo"
,
attributes
:
[
"orderNo"
,
"channelServiceNo"
,
"channelOrderNo"
,
"channelUserId"
,
"ownerUserId"
,
"needNo"
,
"payTime"
,
"quantity"
,
"serviceQuantity"
,
"orderPayStatus"
,
"orderPayStatusName"
,
"totalSum"
,
"payTotalSum"
,
"payTime"
,
"quantity"
,
"serviceQuantity"
,
"orderPayStatus"
,
"orderPayStatusName"
,
"totalSum"
,
"payTotalSum"
,
"refundSum"
,
"created_at"
,
"opNotes"
,
"notes"
"refundSum"
,
"created_at"
,
"opNotes"
,
"notes"
],
],
raw
:
true
raw
:
true
});
});
if
(
order
&&
order
.
orderNo
)
{
if
(
order
&&
order
.
orderNo
)
{
var
orderproducts
=
await
this
.
orderProductDao
.
model
.
findAll
({
var
orderproducts
=
await
this
.
orderProductDao
.
model
.
findAll
({
where
:
{
sourceOrderNo
:
order
.
orderNo
},
where
:
{
sourceOrderNo
:
order
.
orderNo
},
attributes
:
[
"sourceOrderNo"
,
"itemCode"
,
"itemName"
,
"channelItemCode"
,
"channelItemName"
,
attributes
:
[
"sourceOrderNo"
,
"itemCode"
,
"itemName"
,
"channelItemCode"
,
"channelItemName"
,
"serviceItemCode"
,
"picUrl"
,
"proPrice"
,
"quantity"
,
"opPayType"
,
"serviceItemSnapshot"
,
"serviceItemCode"
,
"picUrl"
,
"proPrice"
,
"quantity"
,
"opPayType"
,
"serviceItemSnapshot"
,
"created_at"
"created_at"
],
],
raw
:
true
raw
:
true
});
});
order
[
"orderproducts"
]
=
orderproducts
;
order
[
"orderproducts"
]
=
orderproducts
;
var
receptvouchers
=
await
this
.
orderReceiptVoucherDao
.
model
.
findAll
({
var
receptvouchers
=
await
this
.
orderReceiptVoucherDao
.
model
.
findAll
({
where
:
{
sourceOrderNo
:
order
.
orderNo
},
where
:
{
sourceOrderNo
:
order
.
orderNo
},
attributes
:[
attributes
:
[
"sourceOrderNo"
,
"accountType"
,
"accountTypeName"
,
"payDate"
,
"totalSum"
,
"payOrderNo"
,
"buyerOpenId"
,
"sourceOrderNo"
,
"accountType"
,
"accountTypeName"
,
"payDate"
,
"totalSum"
,
"payOrderNo"
,
"buyerOpenId"
,
"passTradeNo"
,
"buyerAliLogonId"
,
"certifyFileUrl"
,
"wxPayOrderCode"
,
"aliPayOrderCode"
,
"busPayOrderCode"
,
"passTradeNo"
,
"buyerAliLogonId"
,
"certifyFileUrl"
,
"wxPayOrderCode"
,
"aliPayOrderCode"
,
"busPayOrderCode"
,
"auditStatusName"
,
"auditStatus"
"auditStatusName"
,
"auditStatus"
],
],
raw
:
true
raw
:
true
});
});
order
[
"receptvouchers"
]
=
receptvouchers
;
order
[
"receptvouchers"
]
=
receptvouchers
;
var
refundvouchers
=
await
this
.
orderRefundVoucherDao
.
model
.
findAll
({
var
refundvouchers
=
await
this
.
orderRefundVoucherDao
.
model
.
findAll
({
where
:
{
sourceOrderNo
:
order
.
orderNo
},
where
:
{
sourceOrderNo
:
order
.
orderNo
},
attributes
:[
attributes
:
[
"busPayOrderCode"
,
"busPayOrderCode"
,
"sourceOrderNo"
,
"accountType"
,
"accountTypeName"
,
"payDate"
,
"totalSum"
,
"payOrderNo"
,
"buyerOpenId"
,
"sourceOrderNo"
,
"accountType"
,
"accountTypeName"
,
"payDate"
,
"totalSum"
,
"payOrderNo"
,
"buyerOpenId"
,
"passTradeNo"
,
"certifyFileUrl"
,
"auditStatusName"
,
"auditStatus"
"passTradeNo"
,
"certifyFileUrl"
,
"auditStatusName"
,
"auditStatus"
],
],
raw
:
true
raw
:
true
});
});
order
[
"refundvouchers"
]
=
refundvouchers
;
order
[
"refundvouchers"
]
=
refundvouchers
;
}
}
return
system
.
getResultSuccess
(
order
);
return
system
.
getResultSuccess
(
order
);
}
}
...
...
igirl-channel/app/front/entry/public/apidoc/opTrademark/icbc.md
View file @
caaa2e5e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
1.
[
产品列表-根据产品大类获取
](
#getProductListByOneCode
)
1.
[
产品列表-根据产品大类获取
](
#getProductListByOneCode
)
1.
[
产品列表-根据产品二类获取
](
#getProductListByTwoCode
)
1.
[
产品列表-根据产品二类获取
](
#getProductListByTwoCode
)
1.
[
产品详情
](
#getProductDetail
)
1.
[
产品详情
](
#getProductDetail
)
1.
[
获取订单列表信息
](
#getOrder
List
)
1.
[
获取订单列表信息
](
#getOrder
Info
)
1.
[
获取工商订单交付流程信息
](
#getIcbcOrderDeliveryStatus
)
1.
[
获取工商订单交付流程信息
](
#getIcbcOrderDeliveryStatus
)
## **<a name="getIcbcOrderDetails"> 获取公司注册详情信息</a>**
## **<a name="getIcbcOrderDetails"> 获取公司注册详情信息</a>**
...
@@ -198,7 +198,7 @@
...
@@ -198,7 +198,7 @@
"max_qty"
:
null
//区间最大值
"max_qty"
:
null
//区间最大值
}
}
],
],
"requestId"
:
"c39ee8a924074904b1694dd3bf2d6c4b"
"requestId"
:
"c39ee8a924074904b1694dd
getOrderInfo
3bf2d6c4b"
}
}
```
```
...
@@ -215,7 +215,7 @@
...
@@ -215,7 +215,7 @@
"pathCode"
:
"gsfu/gszc"
//查询的路径:大类code/二类code
"pathCode"
:
"gsfu/gszc"
//查询的路径:大类code/二类code
}
}
```
```
getOrderInfo
#### 返回结果 0为成功,否则为失败
#### 返回结果 0为成功,否则为失败
```
javascript
```
javascript
...
@@ -288,7 +288,7 @@
...
@@ -288,7 +288,7 @@
```
javascript
```
javascript
{
{
"channelItemCode"
:
"zzsbzc"
"channelItemCode"
:
"zzsbzc"
getOrderInfo
}
}
```
```
...
@@ -349,14 +349,14 @@
...
@@ -349,14 +349,14 @@
```
```
## **<a name="getOrder
List
"> 获取订单列表信息</a>**
## **<a name="getOrder
Info
"> 获取订单列表信息</a>**
[
返回到目录
](
#menu
)
[
返回到目录
](
#menu
)
##### UR
L
##### UR
[
/action/tmOrder/springBoard
]
[
/action/tmOrder/springBoard
]
#### 参数格式 `JSON`
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### HTTP请求方式 `POST`
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 请求头中需要增加userpin(用户登录后的凭证)的值
#### 渠道执行的类型 actionType:getOrder
List
#### 渠道执行的类型 actionType:getOrder
Info
```
javascript
```
javascript
{
{
...
...
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