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
4093ad78
Commit
4093ad78
authored
Dec 13, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
e2b5557a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
49 deletions
+36
-49
igirl-channel/app/base/api/impl/test/testApi.js
+25
-25
igirl-channel/app/base/db/impl/dborder/orderDao.js
+3
-1
igirl-channel/app/base/db/impl/dborder/receiptvoucherDao.js
+2
-2
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
+6
-21
No files found.
igirl-channel/app/base/api/impl/test/testApi.js
View file @
4093ad78
...
...
@@ -34,50 +34,50 @@ class TestAPI extends APIBase {
// clientIp: ""
// });
// }
var
body
=
{
channelItemCode
:
"1329709"
};
returnRuslt
=
{
//
var body = { channelItemCode: "1329709" };
//
returnRuslt={
"returnValue"
:
[
{
//
"returnValue": [
//
{
"bizStatusExt"
:
"service"
,
//
"bizStatusExt": "service",
"memberId"
:
"b2b-****02"
,
//
"memberId": "b2b-****02",
"productName"
:
"商机**"
,
//
"productName": "商机**",
"gmtCreate"
:
"20171231200252000+0800"
,
//
"gmtCreate": "20171231200252000+0800",
"gmtServiceEnd"
:
"20190101000000000+0800"
,
//
"gmtServiceEnd": "20190101000000000+0800",
"bizStatus"
:
"S"
,
//
"bizStatus": "S",
"paymentAmount"
:
420
,
//
"paymentAmount": 420,
"executePrice"
:
420
,
//
"executePrice": 420,
"orderItemNum"
:
"W1712*****_1"
,
//
"orderItemNum": "W1712*****_1",
"gmtServiceBegin"
:
"20171231000000000+0800"
,
//
"gmtServiceBegin": "20171231000000000+0800",
"gmtConfirm"
:
"20171231200329000+0800"
,
//
"gmtConfirm": "20171231200329000+0800",
"settleItemDtos"
:
[
//
"settleItemDtos": [
],
//
],
"payCustomerUid"
:
"12345678990000"
,
//
"payCustomerUid": "12345678990000",
"signCustomerUid"
:
"12345678990000"
//
"signCustomerUid": "12345678990000"
}
],
//
}
//
],
"successed"
:
true
//
"successed": true
};
var
tmpreq
=
{
app
:};
this
.
orderSve
.
addOrderNeed
()
//
};
//
var tmpreq={app:};
//
this.orderSve.addOrderNeed()
return
system
.
getResultSuccess
({
req
:
"ok"
});
}
}
...
...
igirl-channel/app/base/db/impl/dborder/orderDao.js
View file @
4093ad78
...
...
@@ -82,7 +82,9 @@ class OrderDao extends Dao {
serviceItemSnapshot
:
JSON
.
stringify
(
productItem
),
//产品快照
};
var
order
=
await
this
.
create
(
orderObj
,
t
);
return
system
.
getResultSuccess
(
order
);
var
tmpResult
=
system
.
getResultSuccess
(
order
);
tmpResult
.
addOrder
=
true
;
return
tmpResult
;
}
async
putOrder
(
setObj
,
whereObj
,
t
)
{
return
this
.
updateByWhere
(
setObj
,
whereObj
,
t
)
...
...
igirl-channel/app/base/db/impl/dborder/receiptvoucherDao.js
View file @
4093ad78
...
...
@@ -14,14 +14,14 @@ class ReceiptVoucherDao extends Dao {
}
async
addReceiptvoucher
(
orderParams
,
req
,
t
)
{
var
param
=
{
app_id
:
req
.
app
.
id
,
//
app_id
:
orderParams
.
app_
id
,
//
totalSum
:
orderParams
.
totalSum
||
0
,
// 订单总额(产品价格×优惠费率×订单件数)
channelServiceNo
:
orderParams
.
channelServiceNo
,
// 渠道服务单号
auditStatus
:
"tg"
,
sourceType
:
"order"
,
sourceOrderNo
:
orderParams
.
orderNo
,
// 来源订单号
payDate
:
orderParams
.
payTime
,
//
createuser_id
:
req
.
user
.
id
,
createuser_id
:
orderParams
.
createuser_
id
,
creator
:
orderParams
.
creator
||
""
,
accountType
:
"other"
,
};
...
...
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
4093ad78
...
...
@@ -190,25 +190,6 @@ class OrderTmProductService extends ServiceBase {
if
(
verifyResult
)
{
return
verifyResult
;
}
// if (productItem && productItem.verifyPrice == 1) {
// var verifyResult = await self.isOrderVerify(user, 1, tm, productItem, nclones, null);
// if (verifyResult) {
// return verifyResult;
// }
// } else {
// tm.nclOneCodes = [];
// tm.nclCount = 0;
// for (var i = 0; i < nclones.length; i++) {
// var tbcode = await self.getBusUid("tb");
// var nclone = nclones[i];
// var nclthreeobj = nclone.nclThree;
// if (nclone) {
// tm.nclOneCodes.push(nclone.code);
// tm.nclCount = tm.nclCount + nclthreeobj.length;
// }
// }
// }
if
(
tm
.
tmFormType
==
"4"
)
{
//图形商标
tm
[
"name"
]
=
"图形"
;
}
...
...
@@ -225,6 +206,9 @@ class OrderTmProductService extends ServiceBase {
}
var
order
=
orderResult
.
data
;
if
(
orderResult
.
addOrder
&&
orderResult
.
addOrder
==
true
)
{
await
self
.
receiptvoucherDao
.
addReceiptvoucher
(
order
,
null
,
t
);
//创建订单支付信息
}
var
orderProductObj
=
{
app_id
:
user
.
app_id
,
//
productType_id
:
productItem
.
productType_id
,
//产品类型Id
...
...
@@ -278,7 +262,7 @@ class OrderTmProductService extends ServiceBase {
//订单客户档案添加和修改
await
self
.
opCustomerInfo
(
user
,
apply
,
orderProductObj
,
t
);
//创建服务单
var
orderTm
=
await
self
.
dao
.
create
(
orderProductObj
,
t
);
//创建商标订单
var
orderTm
=
await
self
.
dao
.
create
(
orderProductObj
,
t
);
//创建商标订单
var
flowObj
=
{
app_id
:
user
.
app_id
,
createuser_id
:
user
.
id
,
...
...
@@ -342,7 +326,7 @@ class OrderTmProductService extends ServiceBase {
mlze
=
mlze
.
toFixed
(
2
);
mlze
=
Number
(
mlze
);
var
ddze
=
Number
(
fwfze
)
+
Number
(
gfze
);
//订单总额---------------------------------------------------
if
(
Number
(
tm
.
totalSum
)
<
Number
(
ddze
))
{
if
(
parseFloat
(
tm
.
totalSum
)
<
Number
(
ddze
))
{
return
{
code
:
-
201
,
msg
:
"订单总额有误"
};
}
...
...
@@ -666,6 +650,7 @@ class OrderTmProductService extends ServiceBase {
gzwtsUrl
:
item
.
gzwtsUrl
,
smwjUrl
:
item
.
smwjUrl
,
deliveryStatus
:
item
.
deliveryStatus
,
totalSum
:
item
.
totalSum
,
notes
:
item
.
notes
},
orderFlow
:
[],
receiptVoucher
:
[]
};
...
...
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