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
44ad40e9
Commit
44ad40e9
authored
Apr 19, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
438d063c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
70 deletions
+81
-70
center-order/app/base/api/impl/opaction/opOrder.js
+7
-1
center-order/app/base/db/metadata/apps/platform.js
+1
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+48
-5
center-order/app/base/service/impl/utilsSve/utilsChannelTmDeliverySve.js
+25
-64
No files found.
center-order/app/base/api/impl/opaction/opOrder.js
View file @
44ad40e9
...
...
@@ -14,7 +14,7 @@ class OrderAPI extends APIBase {
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
([
"addAliChannelTmApplicant"
,
"
getAliChannelTmDelivery
"
].
indexOf
(
pobj
.
actionType
)
<
0
)
{
if
([
"addAliChannelTmApplicant"
,
"
updateAliChannelTm"
,
"getAliChannelTmDelivery"
,
"getAllAliChannelTmDelivery"
,
"getOrderProductDeliveryByOrderNo
"
].
indexOf
(
pobj
.
actionType
)
<
0
)
{
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResultFail
(
system
.
noLogin
,
"user no login!"
);
}
...
...
@@ -37,6 +37,12 @@ class OrderAPI extends APIBase {
case
"getAliChannelTmDelivery"
:
//查询ali渠道商标交付信息
opResult
=
await
this
.
utilsChannelTmDeliverySve
.
getAliChannelTmDelivery
(
pobj
.
actionBody
);
break
;
case
"getAllAliChannelTmDelivery"
:
//查询ali渠道所有商标交付信息
opResult
=
await
this
.
utilsChannelTmDeliverySve
.
getAllAliChannelTmDelivery
(
pobj
.
actionBody
);
break
;
case
"getOrderProductDeliveryByOrderNo"
:
//获取订单产品及交付信息--用于钉钉商标推送
opResult
=
await
this
.
orderinfoSve
.
getOrderProductDeliveryByOrderNo
(
pobj
.
actionBody
);
break
;
case
"updateContacts"
:
//修改订单联系人
opResult
=
await
this
.
orderinfoSve
.
updateContacts
(
pobj
,
pobj
.
actionBody
);
break
;
...
...
center-order/app/base/db/metadata/apps/platform.js
View file @
44ad40e9
...
...
@@ -50,6 +50,7 @@ module.exports = {
"1"
:
"商标注册申请书"
,
"2"
:
"商标注册申请补正通知书"
,
"3"
:
"商标注册申请受理通知书"
,
"4"
:
"商标注册申请不予受理通知书"
,
"5"
:
"商标注册同日申请补送使用证据通知书"
,
"6"
:
"商标注册同日申请协商通知书商标注册同日申请抽签通知书"
,
"7"
:
"商标驳回通知书"
,
"8"
:
"商标部分驳回通知书"
,
"9"
:
"商标注册申请初步审定公告通知书"
,
"10"
:
"商标异议答辩通知书"
,
"11"
:
"异议裁定书"
,
"12"
:
"纸质版商标注册证"
,
"13"
:
"电子版商标注册证"
,
"16"
:
"已失败退款"
,
"200"
:
"已补正"
,
"201"
:
"超时未补正"
,
"202"
:
"补正已递交到商标局"
,
"dsccl"
:
"待上传材料"
,
"dqrfa"
:
"待确认方案"
,
"fabtg"
:
"方案不通过"
,
"dsh"
:
"待审核"
,
"shbtg"
:
"审核不通过"
,
"ddj"
:
"待递交"
,
"ydj"
:
"已递交"
,
"djyc"
:
"递交异常"
},
//申请企业类型
...
...
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
44ad40e9
const
system
=
require
(
"../../../system"
);
// const Dao = require("../../dao.base");
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
uuidv4
=
require
(
'uuid/v4'
);
class
OrderInfoService
extends
ServiceBase
{
...
...
@@ -522,8 +523,8 @@ class OrderInfoService extends ServiceBase {
var
self
=
this
;
var
tipsMsg
=
""
;
var
apply
=
actionBody
.
apply
;
if
(
apply
)
{
var
dbApply
=
itemResult
.
data
.
apply
;
if
(
apply
)
{
var
applyKeys
=
Object
.
keys
(
apply
);
if
(
dbApply
&&
applyKeys
.
length
>
0
)
{
for
(
let
index
=
0
;
index
<
applyKeys
.
length
;
index
++
)
{
...
...
@@ -712,6 +713,8 @@ class OrderInfoService extends ServiceBase {
this
.
putOrderDelivery
(
itemResult
.
data
,
actionBody
.
orderNo
);
delete
actionBody
[
"isGetContact"
];
actionBody
.
orderStatus
=
orderItem
.
orderStatus
;
actionBody
.
gzwtsUrl
=
dbApply
.
gzwtsUrl
;
//供阿里渠道委托书绑定
if
(
orderItem
.
orderStatus
<
4
)
{
actionBody
.
product_info
=
product_info
;
}
...
...
@@ -720,6 +723,7 @@ class OrderInfoService extends ServiceBase {
putOrderDelivery
(
data
,
orderNo
)
{
//修改交付信息
var
sql
=
"UPDATE `c_order_delivery` SET deliveryContent ='"
+
JSON
.
stringify
(
data
)
+
"' where sourceOrderNo='"
+
orderNo
+
"'"
;
sql
=
sql
.
replace
(
'
\
n'
,
''
);
this
.
customQuery
(
sql
);
}
addOrderDelivery
(
data
,
orderNo
)
{
//新增交付信息
...
...
@@ -776,6 +780,39 @@ class OrderInfoService extends ServiceBase {
//**************************************获取订单信息**********start**************************************
async
getOrderProductDeliveryByOrderNo
(
actionBody
)
{
//获取订单产品及交付信息--用于钉钉商标推送
var
result
=
system
.
getResultSuccess
();
result
.
data
=
{
actionBody
:
{
delivery_content
:
{},
order_info
:
{
orderStatus
:
2
},
product_info
:
{}
}
};
var
sql
=
"select * from c_order_delivery where sourceOrderNo=:sourceOrderNo"
;
var
paramWhere
=
{
sourceOrderNo
:
actionBody
.
orderNo
};
var
list
=
await
this
.
customQuery
(
sql
,
paramWhere
);
if
(
list
&&
list
.
length
>
0
)
{
if
(
list
[
0
].
deliveryContent
)
{
result
.
data
.
actionBody
.
delivery_content
=
list
[
0
].
deliveryContent
;
}
}
var
orderProductItem
=
await
this
.
orderproductDao
.
getItemInfoByOrderNo
(
actionBody
.
orderNo
);
if
(
orderProductItem
)
{
result
.
data
.
actionBody
.
product_info
=
JSON
.
parse
(
orderProductItem
.
serviceItemSnapshot
);
}
var
item
=
await
this
.
ordercontactsDao
.
getItemByOrderNo
(
actionBody
.
orderNo
);
if
(
item
)
{
result
.
data
.
actionBody
.
delivery_content
.
orderContact
=
item
;
}
return
result
;
}
async
getOrderInfo
(
pobj
,
actionBody
)
{
//获取订单列表信息
var
pageSize
=
Number
(
actionBody
.
pageSize
||
20
);
if
(
pageSize
>
50
)
{
...
...
@@ -969,6 +1006,7 @@ class OrderInfoService extends ServiceBase {
await
this
.
dao
.
updateByWhere
({
orderStatus
:
8
},
{
where
:
{
id
:
item
.
id
}
});
}
sql
=
"UPDATE `c_delivery_official_flow` SET officialFlow ='"
+
JSON
.
stringify
(
updateDeliveryInfo
)
+
"' where sourceOrderNo='"
+
actionBody
.
orderNo
+
"'"
;
sql
=
sql
.
replace
(
'
\
n'
,
''
);
}
this
.
customQuery
(
sql
);
return
system
.
getResultSuccess
();
...
...
@@ -983,8 +1021,11 @@ class OrderInfoService extends ServiceBase {
return
system
.
getResult
(
null
,
"处理失败,tmStatus不能为空,30163"
);
}
if
(
!
actionBody
.
tmStatusName
)
{
actionBody
.
tmStatusName
=
uiconfig
.
config
.
pdict
.
official_type
[
actionBody
.
tmStatus
]
if
(
!
actionBody
.
tmStatusName
)
{
return
system
.
getResult
(
null
,
"处理失败,tmStatusName不能为空,30165"
);
}
}
var
orderItem
=
await
this
.
dao
.
getItemStatusByOrderNo
(
actionBody
.
orderNo
);
if
(
!
orderItem
)
{
return
system
.
getResult
(
null
,
"修改失败,修改的数据为空,30170"
);
...
...
@@ -1013,7 +1054,7 @@ class OrderInfoService extends ServiceBase {
isShow
:
1
};
var
oldDeliveryStatus
=
deliveryInfo
.
deliveryStatus
;
if
(
actionBody
.
tmStatus
==
"WAITCOMMIT"
)
{
if
(
actionBody
.
tmStatus
==
"WAITCOMMIT"
||
actionBody
.
tmStatus
==
"ddj"
)
{
updateOrderFields
.
orderStatus
=
4
;
deliveryInfo
.
deliveryStatus
=
"ddj"
;
deliveryInfo
.
deliveryStatusName
=
"待递交"
;
...
...
@@ -1027,8 +1068,9 @@ class OrderInfoService extends ServiceBase {
deliveryInfo
.
nclones
[
tbCodeIndex
].
tmStatus
=
"ydj"
;
deliveryInfo
.
nclones
[
tbCodeIndex
].
tmStatusName
=
"已递交"
;
orderLog
.
opContent
=
"尊敬的用户,您的商标:“"
+
deliveryInfo
.
tm
.
tmName
+
"”第"
+
deliveryInfo
.
nclones
[
tbCodeIndex
].
code
+
"类,办理状态更新为【已递交】"
;
}
//已提交
else
if
(
actionBody
.
tmStatus
==
"RECVCOMMIT"
)
{
}
//已提交--自己系统中存在此状态(升级后不存在,目前没有升级)
else
if
(
actionBody
.
tmStatus
==
"RECVCOMMIT"
||
actionBody
.
tmStatus
==
"ydj"
)
{
actionBody
.
submitTime
=
actionBody
.
submitTime
||
new
Date
();
updateOrderFields
.
orderStatus
=
8
;
deliveryInfo
.
deliveryStatus
=
"ywc"
;
deliveryInfo
.
deliveryStatusName
=
"已完成"
;
...
...
@@ -1112,6 +1154,7 @@ class OrderInfoService extends ServiceBase {
}
else
{
sql
=
"UPDATE `c_delivery_official_flow` SET officialFlow ='"
+
JSON
.
stringify
(
flowList
)
+
"' where sourceOrderNo='"
+
actionBody
.
officialInfo
.
tmRegistNum
+
"'"
;
sql
=
sql
.
replace
(
'
\
n'
,
''
);
}
this
.
customQuery
(
sql
);
return
system
.
getResultSuccess
();
...
...
center-order/app/base/service/impl/utilsSve/utilsChannelTmDeliverySve.js
View file @
44ad40e9
...
...
@@ -7,86 +7,47 @@ class UtilsChannelTmDeliveryService {
}
//=================================修改渠道交付信息==============start======================================
async
addAliChannelTmApplicant
(
actionBody
)
{
//新增ali渠道商标交付信息
var
itemResult
=
await
this
.
getChannelDeliveryByChannelOrderNo
(
actionBody
.
orderNo
,
actionBody
.
channelOrderNo
);
if
(
itemResult
.
status
!=
0
)
{
this
.
addChannelDelivery
(
actionBody
.
deliveryData
,
actionBody
.
orderNo
,
actionBody
.
channelOrderNo
)
return
system
.
getResultSuccess
();
}
return
system
.
getResult
(
null
,
"添加失败,已经存在要添加的数据,30240"
);
}
async
updateAliChannelTm
(
actionBody
)
{
//修改ali渠道商标信息
var
itemResult
=
await
this
.
getChannelDelivery
(
actionBody
.
orderNo
);
if
(
itemResult
.
status
!=
0
)
{
return
itemResult
;
}
if
(
!
itemResult
.
data
||
Object
.
keys
(
itemResult
.
data
).
length
==
0
)
{
return
system
.
getResult
(
null
,
"修改失败,修改的数据为空,30230"
);
}
var
apply
=
actionBody
.
apply
;
if
(
apply
)
{
var
dbApply
=
itemResult
.
data
.
apply
;
var
applyKeys
=
Object
.
keys
(
apply
);
if
(
dbApply
&&
applyKeys
.
length
>
0
)
{
for
(
let
index
=
0
;
index
<
applyKeys
.
length
;
index
++
)
{
const
aKey
=
applyKeys
[
index
];
if
(
apply
[
aKey
]
!=
dbApply
[
aKey
])
{
itemResult
.
data
.
apply
[
aKey
]
=
apply
[
aKey
];
}
}
this
.
putChannelDelivery
(
itemResult
.
data
,
actionBody
.
orderNo
);
async
getAliChannelTmDelivery
(
actionBody
)
{
//查询ali渠道商标交付信息
var
sql
=
"select * from c_channel_delivery where sourceOrderNo=:sourceOrderNo"
;
var
paramWhere
=
{
sourceOrderNo
:
actionBody
.
orderNo
};
var
list
=
await
this
.
orderinfoDao
.
customQuery
(
sql
,
paramWhere
);
if
(
!
list
||
list
.
length
==
0
||
!
list
[
0
].
deliveryContent
)
{
return
system
.
getResultFail
(
-
130
,
"get channel delivery data is empty,30250"
);
}
return
system
.
getResultSuccess
(
list
[
0
].
deliveryContent
);
}
var
tmInfo
=
actionBody
.
tm
;
if
(
tmInfo
)
{
itemResult
.
data
.
tm
=
tmInfo
;
this
.
putChannelDelivery
(
itemResult
.
data
,
actionBody
.
orderNo
);
async
getAllAliChannelTmDelivery
(
actionBody
)
{
//查询ali渠道所有商标交付信息
var
sql
=
"select * from c_channel_delivery"
;
var
list
=
await
this
.
orderinfoDao
.
customQuery
(
sql
);
if
(
!
list
||
list
.
length
==
0
)
{
return
system
.
getResult
(
null
,
"get channel delivery all data is empty,30253"
);
}
return
system
.
getResultSuccess
(
list
);
}
async
getAliChannelTmDelivery
(
actionBody
)
{
//查询
ali渠道商标交付信息
var
itemResult
=
await
this
.
get
ChannelDelivery
(
actionBody
.
orderNo
);
async
addAliChannelTmApplicant
(
actionBody
)
{
//新增
ali渠道商标交付信息
var
itemResult
=
await
this
.
get
AliChannelTmDelivery
(
actionBody
);
if
(
itemResult
.
status
!=
0
)
{
return
itemResult
;
}
if
(
!
itemResult
.
data
||
Object
.
keys
(
itemResult
.
data
).
length
==
0
)
{
return
system
.
getResult
(
null
,
"获取失败,数据为空,30233"
);
this
.
addChannelDelivery
(
actionBody
.
deliveryData
,
actionBody
.
orderNo
)
return
system
.
getResultSuccess
();
}
var
returnParam
=
{
apply
:
itemResult
.
data
.
apply
,
channelOrderNo
:
itemResult
.
data
.
channelOrderNo
return
system
.
getResult
(
null
,
"添加失败,已经存在要添加的数据,30240"
);
}
return
system
.
getResultSuccess
(
returnParam
);
async
updateAliChannelTm
(
actionBody
)
{
//修改ali渠道商标信息
this
.
putChannelDelivery
(
actionBody
.
deliveryData
,
actionBody
.
orderNo
)
}
putChannelDelivery
(
data
,
orderNo
)
{
//修改交付信息--内部调用
var
sql
=
"UPDATE `c_channel_delivery` SET deliveryContent ='"
+
JSON
.
stringify
(
data
)
+
"' where sourceOrderNo='"
+
orderNo
+
"'"
;
sql
=
sql
.
replace
(
'
\
n'
,
''
);
this
.
orderinfoDao
.
customQuery
(
sql
);
}
addChannelDelivery
(
data
,
orderNo
,
channelOrderNo
)
{
//新增渠道交付信息--内部调用
var
sql
=
"INSERT INTO `c_channel_delivery` (`sourceOrderNo`,`
channelOrderNo`,`
deliveryContent`) VALUE('"
+
orderNo
+
"','"
+
channelOrderNo
+
"','"
+
JSON
.
stringify
(
data
)
+
"')"
;
addChannelDelivery
(
data
,
orderNo
)
{
//新增渠道交付信息--内部调用
var
sql
=
"INSERT INTO `c_channel_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('"
+
orderNo
+
"','"
+
JSON
.
stringify
(
data
)
+
"')"
;
this
.
orderinfoDao
.
customQuery
(
sql
);
}
async
getChannelDelivery
(
orderNo
)
{
//查询渠道交付信息--内部调用
var
sql
=
"select * from c_channel_delivery where sourceOrderNo=:sourceOrderNo"
;
var
paramWhere
=
{
sourceOrderNo
:
orderNo
};
var
list
=
await
this
.
orderinfoDao
.
customQuery
(
sql
,
paramWhere
);
if
(
!
list
||
list
.
length
==
0
||
!
list
[
0
].
deliveryContent
)
{
return
system
.
getResult
(
null
,
"get channel delivery data is empty,30250"
);
}
return
system
.
getResultSuccess
(
list
[
0
].
deliveryContent
);
}
async
getChannelDeliveryByChannelOrderNo
(
orderNo
,
channelOrderNo
)
{
//查询渠道交付信息--内部调用
var
sql
=
"select * from c_channel_delivery where sourceOrderNo=:sourceOrderNo and channelOrderNo=:channelOrderNo"
;
var
paramWhere
=
{
sourceOrderNo
:
orderNo
,
channelOrderNo
:
channelOrderNo
};
var
list
=
await
this
.
orderinfoDao
.
customQuery
(
sql
,
paramWhere
);
if
(
!
list
||
list
.
length
==
0
||
!
list
[
0
].
deliveryContent
)
{
return
system
.
getResult
(
null
,
"get channel delivery data is empty,30253"
);
}
return
system
.
getResultSuccess
(
list
[
0
].
deliveryContent
);
}
//=================================修改渠道交付信息==============end======================================
...
...
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