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
9ca660cc
Commit
9ca660cc
authored
Nov 15, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
0dda07ae
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
12 deletions
+133
-12
igirl-channel/app/base/api/impl/action/tmOrder.js
+2
-2
igirl-channel/app/base/db/impl/dborder/ordertmproductDao.js
+35
-0
igirl-channel/app/base/service/impl/dborder/orderSve.js
+82
-2
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
+14
-8
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
9ca660cc
...
...
@@ -62,7 +62,7 @@ class TmOrderAPI extends APIBase {
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
break
;
case
"op1688ChannelPushOrder"
:
//处理渠道订单信息
opResult
=
await
this
.
orderSve
.
op1688ChannelPushOrder
Test
(
action_body
,
pobj
,
req
);
opResult
=
await
this
.
orderSve
.
op1688ChannelPushOrder
(
action_body
,
pobj
,
req
);
if
(
opResult
.
status
==
0
)
{
opResult
.
data
=
null
;
var
encryptResult
=
await
this
.
toolSve
.
encryptStr
(
req
.
app
,
action_body
.
channelUserId
);
...
...
@@ -113,7 +113,7 @@ class TmOrderAPI extends APIBase {
}
break
;
case
"getTmOrderList"
:
//商标交付列表
opResult
=
await
this
.
ordertmproductSve
.
getTmOrderList
(
action_body
);
opResult
=
await
this
.
ordertmproductSve
.
getTmOrderList
(
action_body
,
req
);
break
;
case
"getTmOrderInfo"
:
//商标交付信息
opResult
=
await
this
.
ordertmproductSve
.
getTmOrder
(
action_body
);
...
...
igirl-channel/app/base/db/impl/dborder/ordertmproductDao.js
View file @
9ca660cc
...
...
@@ -21,5 +21,40 @@ class OrderTmProductDao extends Dao {
raw
:
true
});
}
async
getItemByChannelServiceNo
(
channelServiceNo
,
appId
,
t
)
{
var
sqlWhere
=
{
where
:
{
channelServiceNo
:
channelServiceNo
,
app_id
:
appId
}
};
if
(
t
)
{
sqlWhere
.
transaction
=
t
;
}
return
this
.
model
.
findOne
({
sqlWhere
,
attributes
:
[
"id"
,
"deliveryOrderNo"
,
"needNo"
,
"sourceOrderNo"
,
"tmName"
,
"tmType"
,
"tmFormType"
,
"nclOneCodes"
,
"deliveryStatus"
,
"picUrl"
,
"colorizedPicUrl"
,
"sywjUrl"
,
"gzwtsUrl"
,
"nclCount"
,
"smwjUrl"
,
"updateuser_id"
,
"updateuser"
,
"notes"
,
"nclOneCount"
],
raw
:
true
});
}
}
module
.
exports
=
OrderTmProductDao
;
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
9ca660cc
...
...
@@ -54,7 +54,7 @@ class OrderService extends ServiceBase {
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"
W171200000000_33
"
,
"orderItemNum"
:
"
ZQ3120025200_01
"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
...
...
@@ -70,7 +70,87 @@ class OrderService extends ServiceBase {
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"W171200000000_44"
,
"orderItemNum"
:
"ZQ3120025200_02"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"payCustomerUid"
:
"12345678990000"
,
"signCustomerUid"
:
"12345678990000"
},
{
"bizStatusExt"
:
"service"
,
"memberId"
:
"b2b-****02"
,
"productName"
:
"商机**"
,
"gmtCreate"
:
"20171231200252000+0800"
,
"gmtServiceEnd"
:
"20190101000000000+0800"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"ZQ3120025200_03"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"payCustomerUid"
:
"12345678990000"
,
"signCustomerUid"
:
"12345678990000"
},
{
"bizStatusExt"
:
"service"
,
"memberId"
:
"b2b-****02"
,
"productName"
:
"商机**"
,
"gmtCreate"
:
"20171231200252000+0800"
,
"gmtServiceEnd"
:
"20190101000000000+0800"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"ZQ3120025200_04"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"payCustomerUid"
:
"12345678990000"
,
"signCustomerUid"
:
"12345678990000"
},
{
"bizStatusExt"
:
"service"
,
"memberId"
:
"b2b-****02"
,
"productName"
:
"商机**"
,
"gmtCreate"
:
"20171231200252000+0800"
,
"gmtServiceEnd"
:
"20190101000000000+0800"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"ZQ3120025200_05"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"payCustomerUid"
:
"12345678990000"
,
"signCustomerUid"
:
"12345678990000"
},
{
"bizStatusExt"
:
"service"
,
"memberId"
:
"b2b-****02"
,
"productName"
:
"商机**"
,
"gmtCreate"
:
"20171231200252000+0800"
,
"gmtServiceEnd"
:
"20190101000000000+0800"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"ZQ3120025200_06"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"payCustomerUid"
:
"12345678990000"
,
"signCustomerUid"
:
"12345678990000"
},
{
"bizStatusExt"
:
"service"
,
"memberId"
:
"b2b-****02"
,
"productName"
:
"商机**"
,
"gmtCreate"
:
"20171231200252000+0800"
,
"gmtServiceEnd"
:
"20190101000000000+0800"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"ZQ3120025200_07"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
...
...
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
9ca660cc
...
...
@@ -66,12 +66,14 @@ class OrderTmProductService extends ServiceBase {
tm
[
"name"
]
=
"图形"
;
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
//创建订单
var
ordercode
=
await
self
.
getBusUid
(
"tm"
);
var
orderTm
=
await
self
.
dao
.
getItemByChannelServiceNo
(
channelOrder
.
channelServiceNo
,
app
.
id
,
t
);
if
(
!
orderTm
)
{
return
system
.
getResult
(
null
,
"交付单数据不存在"
);
}
var
orderAmount
=
tm
;
orderAmount
.
salesNum
=
tm
.
nclOneCodes
.
length
;
orderAmount
.
minitermNum
=
tm
.
nclCount
;
var
orderResult
=
await
self
.
orderDao
.
addOrder
(
order
code
,
orderType
,
user
,
app
,
productItem
,
channelOrder
,
channelUser
,
apply
,
orderAmount
,
t
);
var
orderResult
=
await
self
.
orderDao
.
addOrder
(
order
Tm
.
sourceOrderNo
,
orderType
,
user
,
app
,
productItem
,
channelOrder
,
channelUser
,
apply
,
orderAmount
,
t
);
if
(
orderResult
.
status
!=
0
)
{
return
orderResult
;
}
...
...
@@ -92,6 +94,7 @@ class OrderTmProductService extends ServiceBase {
notes
:
tm
.
notes
||
""
,
// 备注信息
nclOneCount
:
tm
.
nclOneCodes
.
length
,
nclCount
:
tm
.
nclCount
,
deliveryOrderNo
:
orderTm
.
deliveryOrderNo
};
var
flowContent
=
""
;
if
(
apply
.
customerType
==
"person"
)
{
...
...
@@ -116,17 +119,16 @@ class OrderTmProductService extends ServiceBase {
await
self
.
opCustomerInfo
(
user
,
apply
,
orderProductObj
,
t
);
//创建服务单
var
putWhere
=
{
where
:
{
channelServiceNo
:
channelOrder
.
channelServiceNo
}
};
var
orderTm
=
await
self
.
dao
.
updateByWhere
(
orderProductObj
,
putWhere
,
t
);
//创建商标订单--------put
await
self
.
dao
.
updateByWhere
(
orderProductObj
,
putWhere
,
t
);
//创建商标订单--------put
var
flowObj
=
{
app_id
:
user
.
app_id
,
createuser_id
:
user
.
id
,
sourceOrderNo
:
order
code
,
sourceOrderNo
:
order
Tm
.
sourceOrderNo
,
opContent
:
flowContent
};
await
self
.
orderflowDao
.
create
(
flowObj
,
t
);
//创建订单流程
flowObj
.
sourceOrderNo
=
orderProductObj
.
deliveryOrderNo
;
await
self
.
orderflowDao
.
create
(
flowObj
,
t
);
//创建交付流程
orderTm
.
needNo
=
channelOrder
.
needNo
||
null
;
//需求单号
var
returnTm
=
await
self
.
opTmInfo
(
user
,
tm
,
apply
,
nclones
,
orderTm
,
JSON
.
stringify
(
productItem
),
t
);
return
system
.
getResultSuccess
({
deliveryOrderNo
:
orderProductObj
.
deliveryOrderNo
,
...
...
@@ -517,7 +519,7 @@ class OrderTmProductService extends ServiceBase {
* 商标交付列表
* @param {*} params 格式:{channelServiceNo:XX, app:{ appId:XX}}
*/
async
getTmOrderList
(
params
)
{
//商标交付列表
async
getTmOrderList
(
params
,
req
)
{
//商标交付列表
var
pageSize
=
Number
(
params
.
pageSize
||
10
);
var
pageInde
=
Number
(
params
.
pageInde
||
1
);
var
from
=
pageInde
==
1
?
0
:
Number
((
pageInde
-
1
)
*
pageSize
);
...
...
@@ -525,10 +527,14 @@ class OrderTmProductService extends ServiceBase {
pageSize
=
50
;
}
var
sql
=
"SELECT tm.`channelServiceNo`,tm.`deliveryOrderNo`,tm.`tmName`,tm.`nclOneCount`,tm.`nclOneCodes`,tm.itemCode,tm.itemName,"
+
"o.`totalSum`,c.`name`,tm.`deliveryStatus`,tm.`deliveryStatusName`,tm.payStatus,tm.payStatusName,o.
created_at
AS CreateDate,tm.submitTime"
+
"o.`totalSum`,c.`name`,tm.`deliveryStatus`,tm.`deliveryStatusName`,tm.payStatus,tm.payStatusName,o.
payTime
AS CreateDate,tm.submitTime"
+
" FROM `b_order_tm_product` AS tm LEFT JOIN `b_order` AS o ON tm.`sourceOrderNo`=o.`orderNo` LEFT JOIN"
+
" `b_customerinfo` AS c ON tm.`deliveryOrderNo`=c.`deliveryOrderNo` where tm.deleted_at is null "
;
var
paramWhere
=
{};
if
(
req
.
user
)
{
sql
+=
" and tm.createuser_id=:createuser_id"
;
paramWhere
.
createuser_id
=
req
.
user
.
id
;
}
if
(
params
.
channelServiceNo
)
{
sql
+=
" and tm.channelServiceNo like :channelServiceNo"
;
paramWhere
.
channelServiceNo
=
"%"
+
params
.
channelServiceNo
.
trim
()
+
"%"
;
...
...
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