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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
135 additions
and
14 deletions
+135
-14
igirl-channel/app/base/api/impl/action/tmOrder.js
+3
-3
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
+15
-9
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
9ca660cc
...
@@ -62,7 +62,7 @@ class TmOrderAPI extends APIBase {
...
@@ -62,7 +62,7 @@ class TmOrderAPI extends APIBase {
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
opResult
=
await
this
.
toolSve
.
decryptStr
(
req
.
app
,
action_body
.
opStr
);
break
;
break
;
case
"op1688ChannelPushOrder"
:
//处理渠道订单信息
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
)
{
if
(
opResult
.
status
==
0
)
{
opResult
.
data
=
null
;
opResult
.
data
=
null
;
var
encryptResult
=
await
this
.
toolSve
.
encryptStr
(
req
.
app
,
action_body
.
channelUserId
);
var
encryptResult
=
await
this
.
toolSve
.
encryptStr
(
req
.
app
,
action_body
.
channelUserId
);
...
@@ -112,8 +112,8 @@ class TmOrderAPI extends APIBase {
...
@@ -112,8 +112,8 @@ class TmOrderAPI extends APIBase {
await
this
.
pushData2
(
opResult
,
req
,
pobj
,
url
);
await
this
.
pushData2
(
opResult
,
req
,
pobj
,
url
);
}
}
break
;
break
;
case
"getTmOrderList"
:
//商标交付列表
case
"getTmOrderList"
:
//商标交付列表
opResult
=
await
this
.
ordertmproductSve
.
getTmOrderList
(
action_body
);
opResult
=
await
this
.
ordertmproductSve
.
getTmOrderList
(
action_body
,
req
);
break
;
break
;
case
"getTmOrderInfo"
:
//商标交付信息
case
"getTmOrderInfo"
:
//商标交付信息
opResult
=
await
this
.
ordertmproductSve
.
getTmOrder
(
action_body
);
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 {
...
@@ -21,5 +21,40 @@ class OrderTmProductDao extends Dao {
raw
:
true
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
;
module
.
exports
=
OrderTmProductDao
;
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
9ca660cc
...
@@ -54,7 +54,7 @@ class OrderService extends ServiceBase {
...
@@ -54,7 +54,7 @@ class OrderService extends ServiceBase {
"bizStatus"
:
"S"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"paymentAmount"
:
420
,
"executePrice"
:
420
,
"executePrice"
:
420
,
"orderItemNum"
:
"
W171200000000_33
"
,
"orderItemNum"
:
"
ZQ3120025200_01
"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"settleItemDtos"
:
[],
...
@@ -70,7 +70,87 @@ class OrderService extends ServiceBase {
...
@@ -70,7 +70,87 @@ class OrderService extends ServiceBase {
"bizStatus"
:
"S"
,
"bizStatus"
:
"S"
,
"paymentAmount"
:
420
,
"paymentAmount"
:
420
,
"executePrice"
:
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"
,
"gmtServiceBegin"
:
"20171231000000000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"gmtConfirm"
:
"20171231200329000+0800"
,
"settleItemDtos"
:
[],
"settleItemDtos"
:
[],
...
...
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
9ca660cc
...
@@ -66,12 +66,14 @@ class OrderTmProductService extends ServiceBase {
...
@@ -66,12 +66,14 @@ class OrderTmProductService extends ServiceBase {
tm
[
"name"
]
=
"图形"
;
tm
[
"name"
]
=
"图形"
;
}
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
//创建订单
var
orderTm
=
await
self
.
dao
.
getItemByChannelServiceNo
(
channelOrder
.
channelServiceNo
,
app
.
id
,
t
);
var
ordercode
=
await
self
.
getBusUid
(
"tm"
);
if
(
!
orderTm
)
{
return
system
.
getResult
(
null
,
"交付单数据不存在"
);
}
var
orderAmount
=
tm
;
var
orderAmount
=
tm
;
orderAmount
.
salesNum
=
tm
.
nclOneCodes
.
length
;
orderAmount
.
salesNum
=
tm
.
nclOneCodes
.
length
;
orderAmount
.
minitermNum
=
tm
.
nclCount
;
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
)
{
if
(
orderResult
.
status
!=
0
)
{
return
orderResult
;
return
orderResult
;
}
}
...
@@ -92,6 +94,7 @@ class OrderTmProductService extends ServiceBase {
...
@@ -92,6 +94,7 @@ class OrderTmProductService extends ServiceBase {
notes
:
tm
.
notes
||
""
,
// 备注信息
notes
:
tm
.
notes
||
""
,
// 备注信息
nclOneCount
:
tm
.
nclOneCodes
.
length
,
nclOneCount
:
tm
.
nclOneCodes
.
length
,
nclCount
:
tm
.
nclCount
,
nclCount
:
tm
.
nclCount
,
deliveryOrderNo
:
orderTm
.
deliveryOrderNo
};
};
var
flowContent
=
""
;
var
flowContent
=
""
;
if
(
apply
.
customerType
==
"person"
)
{
if
(
apply
.
customerType
==
"person"
)
{
...
@@ -116,17 +119,16 @@ class OrderTmProductService extends ServiceBase {
...
@@ -116,17 +119,16 @@ class OrderTmProductService extends ServiceBase {
await
self
.
opCustomerInfo
(
user
,
apply
,
orderProductObj
,
t
);
await
self
.
opCustomerInfo
(
user
,
apply
,
orderProductObj
,
t
);
//创建服务单
//创建服务单
var
putWhere
=
{
where
:
{
channelServiceNo
:
channelOrder
.
channelServiceNo
}
};
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
=
{
var
flowObj
=
{
app_id
:
user
.
app_id
,
app_id
:
user
.
app_id
,
createuser_id
:
user
.
id
,
createuser_id
:
user
.
id
,
sourceOrderNo
:
order
code
,
sourceOrderNo
:
order
Tm
.
sourceOrderNo
,
opContent
:
flowContent
opContent
:
flowContent
};
};
await
self
.
orderflowDao
.
create
(
flowObj
,
t
);
//创建订单流程
await
self
.
orderflowDao
.
create
(
flowObj
,
t
);
//创建订单流程
flowObj
.
sourceOrderNo
=
orderProductObj
.
deliveryOrderNo
;
flowObj
.
sourceOrderNo
=
orderProductObj
.
deliveryOrderNo
;
await
self
.
orderflowDao
.
create
(
flowObj
,
t
);
//创建交付流程
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
);
var
returnTm
=
await
self
.
opTmInfo
(
user
,
tm
,
apply
,
nclones
,
orderTm
,
JSON
.
stringify
(
productItem
),
t
);
return
system
.
getResultSuccess
({
return
system
.
getResultSuccess
({
deliveryOrderNo
:
orderProductObj
.
deliveryOrderNo
,
deliveryOrderNo
:
orderProductObj
.
deliveryOrderNo
,
...
@@ -517,7 +519,7 @@ class OrderTmProductService extends ServiceBase {
...
@@ -517,7 +519,7 @@ class OrderTmProductService extends ServiceBase {
* 商标交付列表
* 商标交付列表
* @param {*} params 格式:{channelServiceNo:XX, app:{ appId:XX}}
* @param {*} params 格式:{channelServiceNo:XX, app:{ appId:XX}}
*/
*/
async
getTmOrderList
(
params
)
{
//商标交付列表
async
getTmOrderList
(
params
,
req
)
{
//商标交付列表
var
pageSize
=
Number
(
params
.
pageSize
||
10
);
var
pageSize
=
Number
(
params
.
pageSize
||
10
);
var
pageInde
=
Number
(
params
.
pageInde
||
1
);
var
pageInde
=
Number
(
params
.
pageInde
||
1
);
var
from
=
pageInde
==
1
?
0
:
Number
((
pageInde
-
1
)
*
pageSize
);
var
from
=
pageInde
==
1
?
0
:
Number
((
pageInde
-
1
)
*
pageSize
);
...
@@ -525,10 +527,14 @@ class OrderTmProductService extends ServiceBase {
...
@@ -525,10 +527,14 @@ class OrderTmProductService extends ServiceBase {
pageSize
=
50
;
pageSize
=
50
;
}
}
var
sql
=
"SELECT tm.`channelServiceNo`,tm.`deliveryOrderNo`,tm.`tmName`,tm.`nclOneCount`,tm.`nclOneCodes`,tm.itemCode,tm.itemName,"
+
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"
+
" 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 "
;
" `b_customerinfo` AS c ON tm.`deliveryOrderNo`=c.`deliveryOrderNo` where tm.deleted_at is null "
;
var
paramWhere
=
{};
var
paramWhere
=
{};
if
(
req
.
user
)
{
sql
+=
" and tm.createuser_id=:createuser_id"
;
paramWhere
.
createuser_id
=
req
.
user
.
id
;
}
if
(
params
.
channelServiceNo
)
{
if
(
params
.
channelServiceNo
)
{
sql
+=
" and tm.channelServiceNo like :channelServiceNo"
;
sql
+=
" and tm.channelServiceNo like :channelServiceNo"
;
paramWhere
.
channelServiceNo
=
"%"
+
params
.
channelServiceNo
.
trim
()
+
"%"
;
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