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
d021b43b
Commit
d021b43b
authored
Nov 25, 2019
by
庄冰
Browse files
Options
Browse Files
Download
Plain Diff
aaa
parents
e3fd91be
2d6ac03d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
123 deletions
+154
-123
igirl-channel/app/base/db/impl/dborder/orderflowDao.js
+1
-0
igirl-channel/app/base/service/impl/dborder/orderSve.js
+1
-1
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
+23
-5
igirl-channel/app/base/service/impl/dbtrademark/trademarkSve.js
+126
-115
igirl-channel/app/base/utils/aliyunClient.js
+3
-2
No files found.
igirl-channel/app/base/db/impl/dborder/orderflowDao.js
View file @
d021b43b
...
...
@@ -10,6 +10,7 @@ class OrderFlowDao extends Dao {
sourceOrderNo
:
sourceOrderNo
,
isShow
:
1
},
order
:[[
"created_at"
,
'desc'
]],
raw
:
true
});
}
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
d021b43b
...
...
@@ -501,7 +501,7 @@ class OrderService extends ServiceBase {
userId
:
item
.
channelUserId
,
// 否 用户 ID
companyName
:
""
,
// 否 公司名称
orderPrice
:
item
.
totalSum
,
// 是 订单金额
productId
:
"5d
c936eb296d1572b9bc5b8d
"
,
// 是 产品 ID
productId
:
"5d
d513db4f3b08000a6fc082
"
,
// 是 产品 ID
productQuantity
:
item
.
salesNum
,
// 是 产品数量
};
rtn
=
await
rc
.
post
(
reqUrl
,
body
);
...
...
igirl-channel/app/base/service/impl/dborder/ordertmproductSve.js
View file @
d021b43b
...
...
@@ -34,6 +34,24 @@ class OrderTmProductService extends ServiceBase {
if
(
!
nclones
||
nclones
.
length
<
1
)
{
return
system
.
getResult
(
null
,
"尼斯大类不能为空"
);
}
if
(
nclones
.
length
>
1
)
{
return
system
.
getResult
(
null
,
"尼斯大类不能大于1个大类"
);
}
//判断尼斯小项的数量
var
selectNclThreeCount
=
0
;
for
(
let
index
=
0
;
index
<
nclones
.
length
;
index
++
)
{
const
element
=
nclones
[
index
];
var
nclList
=
null
;
if
(
typeof
(
element
)
==
"string"
)
{
nclList
=
JSON
.
parse
(
element
);
}
else
{
nclList
=
element
;
}
selectNclThreeCount
=
selectNclThreeCount
+
nclList
.
nclThree
.
length
;
}
if
(
selectNclThreeCount
>
10
)
{
return
system
.
getResult
(
null
,
"尼斯小项数量不能大于10个小项数量,目前选择的小项数量为"
+
selectNclThreeCount
);
}
if
(
!
itemCode
)
{
return
system
.
getResult
(
null
,
"itemCode参数错误"
);
}
...
...
@@ -103,7 +121,7 @@ class OrderTmProductService extends ServiceBase {
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待上传材料"
:
"订单已创建待付款"
;
}
else
{
orderProductObj
[
"deliveryStatus"
]
=
"dsh"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待
审核
"
:
"订单已创建待付款"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待
专家服务
"
:
"订单已创建待付款"
;
}
}
if
(
apply
.
customerType
==
"ent"
)
{
...
...
@@ -112,7 +130,7 @@ class OrderTmProductService extends ServiceBase {
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待上传材料"
:
"订单已创建待付款"
;
}
else
{
orderProductObj
[
"deliveryStatus"
]
=
"dsh"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待
审核
"
:
"订单已创建待付款"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待
专家服务
"
:
"订单已创建待付款"
;
}
}
//订单客户档案添加和修改
...
...
@@ -236,7 +254,7 @@ class OrderTmProductService extends ServiceBase {
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待上传材料"
:
"订单已创建待付款"
;
}
else
{
orderProductObj
[
"deliveryStatus"
]
=
"dsh"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款
待审核
"
:
"订单已创建待付款"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款"
:
"订单已创建待付款"
;
}
}
if
(
apply
.
customerType
==
"ent"
)
{
...
...
@@ -245,7 +263,7 @@ class OrderTmProductService extends ServiceBase {
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待上传材料"
:
"订单已创建待付款"
;
}
else
{
orderProductObj
[
"deliveryStatus"
]
=
"dsh"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款
待审核
"
:
"订单已创建待付款"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款"
:
"订单已创建待付款"
;
}
}
//订单客户档案添加和修改
...
...
@@ -830,7 +848,7 @@ class OrderTmProductService extends ServiceBase {
nclCount
:
tm
.
nclCount
,
};
var
flowContent
=
""
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待
审核
"
:
"订单已创建待付款"
;
flowContent
=
channelOrder
.
payStatus
==
"yfk"
?
"订单已付款待
专家服务
"
:
"订单已创建待付款"
;
// if (apply.customerType == "person") {
// if (!apply.businessLicensePic || !apply.identityCardPic || !tm.gzwtsUrl) {
// orderProductObj["deliveryStatus"] = "dsccl";
...
...
igirl-channel/app/base/service/impl/dbtrademark/trademarkSve.js
View file @
d021b43b
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
class
TradeMarkService
extends
ServiceBase
{
constructor
()
{
super
(
"dbtrademark"
,
ServiceBase
.
getDaoName
(
TradeMarkService
));
this
.
ordertmproductSve
=
system
.
getObject
(
"service.dborder.ordertmproductSve"
);
this
.
tmofficialDao
=
system
.
getObject
(
"db.dbtrademark.tmofficialDao"
);
this
.
statusConvertJSON
=
{
this
.
orderflowDao
=
system
.
getObject
(
"db.dborder.orderflowDao"
);
this
.
statusConvertJSON
=
{
"WAITARTIFICIALEXAMINE"
:
"dsh"
,
"1"
:
"1"
,
"2"
:
"2"
,
...
...
@@ -32,8 +33,8 @@ class TradeMarkService extends ServiceBase {
"RECVCOMMIT"
:
"ydj"
,
"FILLEXCEPTION"
:
"shbtg"
,
//1688
"WAITCONFIRM"
:
"dqrfa"
,
"CONFIRMFAIL"
:
"dqrfa"
"WAITCONFIRM"
:
"dqrfa"
,
"CONFIRMFAIL"
:
"dqrfa"
}
}
...
...
@@ -48,55 +49,55 @@ class TradeMarkService extends ServiceBase {
* obj.colorizedPicUrl 商标彩色图样,
* obj.user 用户数据
*/
async
updateTmInfo
(
obj
){
async
updateTmInfo
(
obj
)
{
var
user
=
obj
.
user
;
if
(
!
user
||
!
user
.
id
)
{
if
(
!
user
||
!
user
.
id
)
{
return
system
.
getResultFail
(
-
100
,
"未知用户"
);
}
var
deliveryOrderNo
=
obj
.
deliveryOrderNo
;
if
(
!
deliveryOrderNo
)
{
if
(
!
deliveryOrderNo
)
{
return
system
.
getResultFail
(
-
101
,
"deliveryOrderNo参数错误"
);
}
// 1.获取交付单信息
var
ordertmproduct
=
await
this
.
ordertmproductSve
.
dao
.
model
.
findOne
({
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
return
system
.
getResultFail
(
-
102
,
"商标交付单不存在"
);
}
// 2.获取交付单状态,判断是否可修改
if
(
ordertmproduct
.
deliveryStatus
==
'ddj'
||
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
if
(
ordertmproduct
.
deliveryStatus
==
'ddj'
||
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
var
deliveryStatusName
=
"待递交"
;
if
(
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
deliveryStatusName
=
"已完成"
;
if
(
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
deliveryStatusName
=
"已完成"
;
}
return
system
.
getResultFail
(
-
103
,
"该商标交付单状态为"
+
deliveryStatusName
+
",不能进行修改"
);
return
system
.
getResultFail
(
-
103
,
"该商标交付单状态为"
+
deliveryStatusName
+
",不能进行修改"
);
}
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
otpObj
=
{
id
:
ordertmproduct
.
id
,
deliveryOrderNo
:
deliveryOrderNo
,
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
var
otpObj
=
{
id
:
ordertmproduct
.
id
,
deliveryOrderNo
:
deliveryOrderNo
,
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
};
if
(
obj
.
picUrl
)
{
//商标图样 黑白
otpObj
[
"picUrl"
]
=
obj
.
picUrl
;
if
(
obj
.
picUrl
)
{
//商标图样 黑白
otpObj
[
"picUrl"
]
=
obj
.
picUrl
;
}
if
(
obj
.
colorizedPicUrl
)
{
//彩色商标图样
otpObj
[
"colorizedPicUrl"
]
=
obj
.
colorizedPicUrl
;
if
(
obj
.
colorizedPicUrl
)
{
//彩色商标图样
otpObj
[
"colorizedPicUrl"
]
=
obj
.
colorizedPicUrl
;
}
if
(
obj
.
tmName
)
{
//商标名称
otpObj
[
"tmName"
]
=
obj
.
tmName
;
if
(
obj
.
tmName
)
{
//商标名称
otpObj
[
"tmName"
]
=
obj
.
tmName
;
}
if
(
obj
.
tmFormType
)
{
//商标类型
otpObj
[
"tmFormType"
]
=
obj
.
tmFormType
;
if
(
obj
.
tmFormType
)
{
//商标类型
otpObj
[
"tmFormType"
]
=
obj
.
tmFormType
;
}
if
(
obj
.
notes
)
{
//商标说明
otpObj
[
"notes"
]
=
obj
.
notes
;
if
(
obj
.
notes
)
{
//商标说明
otpObj
[
"notes"
]
=
obj
.
notes
;
}
await
self
.
ordertmproductSve
.
dao
.
update
(
otpObj
,
t
);
//商标交付单 修改商标图样
await
self
.
ordertmproductSve
.
dao
.
update
(
otpObj
,
t
);
//商标交付单 修改商标图样
return
system
.
getResultSuccess
();
})
}
...
...
@@ -110,87 +111,87 @@ class TradeMarkService extends ServiceBase {
* obj.nclSmallCodes 商标尼斯小类数组
* obj.user 用户数据
*/
async
updateNclInfo
(
obj
){
async
updateNclInfo
(
obj
)
{
var
user
=
obj
.
user
;
var
self
=
this
;
if
(
!
user
||
!
user
.
id
)
{
if
(
!
user
||
!
user
.
id
)
{
return
system
.
getResultFail
(
-
100
,
"未知用户"
);
}
var
deliveryOrderNo
=
obj
.
deliveryOrderNo
;
if
(
!
deliveryOrderNo
)
{
if
(
!
deliveryOrderNo
)
{
return
system
.
getResultFail
(
-
101
,
"deliveryOrderNo参数错误"
);
}
// 1.获取交付单信息
var
ordertmproduct
=
await
this
.
ordertmproductSve
.
dao
.
model
.
findOne
({
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
return
system
.
getResultFail
(
-
102
,
"商标交付单不存在"
);
}
// 2.获取交付单状态,判断是否可修改
if
(
ordertmproduct
.
deliveryStatus
==
'ddj'
||
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
if
(
ordertmproduct
.
deliveryStatus
==
'ddj'
||
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
var
deliveryStatusName
=
"待递交"
;
if
(
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
deliveryStatusName
=
"已完成"
;
if
(
ordertmproduct
.
deliveryStatus
==
'ywc'
)
{
deliveryStatusName
=
"已完成"
;
}
return
system
.
getResultFail
(
-
103
,
"该商标交付单状态为"
+
deliveryStatusName
+
",不能进行修改"
);
return
system
.
getResultFail
(
-
103
,
"该商标交付单状态为"
+
deliveryStatusName
+
",不能进行修改"
);
}
var
tbCode
=
obj
.
tbCode
;
if
(
!
tbCode
)
{
if
(
!
tbCode
)
{
return
system
.
getResultFail
(
-
104
,
"tbCode参数错误"
);
}
//获取商标尼斯信息
var
tm
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
tbCode
:
tbCode
},
raw
:
true
where
:
{
tbCode
:
tbCode
},
raw
:
true
});
if
(
!
tm
||
!
tm
.
id
)
{
if
(
!
tm
||
!
tm
.
id
)
{
return
system
.
getResultFail
(
-
105
,
"尼斯信息不存在"
);
}
//获取交付单下其它商标尼斯信息
var
othertm
=
await
this
.
dao
.
model
.
findAll
({
where
:{
deliveryOrderNo
:
deliveryOrderNo
,
tbCode
:
{
[
self
.
db
.
Op
.
ne
]:
tbCode
}
where
:
{
deliveryOrderNo
:
deliveryOrderNo
,
tbCode
:
{
[
self
.
db
.
Op
.
ne
]:
tbCode
}
},
raw
:
true
raw
:
true
});
if
(
!
obj
.
nclOneCodes
)
{
if
(
!
obj
.
nclOneCodes
)
{
return
system
.
getResultFail
(
-
106
,
"nclOneCodes参数错误"
);
}
if
(
!
obj
.
nclSmallCodes
||
obj
.
nclSmallCodes
.
length
<
1
)
{
if
(
!
obj
.
nclSmallCodes
||
obj
.
nclSmallCodes
.
length
<
1
)
{
return
system
.
getResultFail
(
-
107
,
"nclSmallCodes参数错误"
);
}
if
(
obj
.
nclSmallCodes
.
length
>
10
)
{
if
(
obj
.
nclSmallCodes
.
length
>
10
)
{
return
system
.
getResultFail
(
-
108
,
"尼斯小类不能超过10项"
);
}
var
nclOneCodes2
=
obj
.
nclOneCodes
;
for
(
var
i
=
0
;
i
<
othertm
.
length
;
i
++
)
{
//判断重复大类
for
(
var
i
=
0
;
i
<
othertm
.
length
;
i
++
)
{
//判断重复大类
var
other
=
othertm
[
i
];
if
(
other
.
nclOneCodes
==
obj
.
nclOneCodes
)
{
if
(
other
.
nclOneCodes
==
obj
.
nclOneCodes
)
{
return
system
.
getResultFail
(
-
109
,
"该商标存在重复的尼斯大类"
);
}
else
{
nclOneCodes2
=
nclOneCodes2
+
","
+
other
.
nclOneCodes
;
}
else
{
nclOneCodes2
=
nclOneCodes2
+
","
+
other
.
nclOneCodes
;
}
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
tmObj
=
{
id
:
tm
.
id
,
nclOneCodes
:
obj
.
nclOneCodes
,
var
tmObj
=
{
id
:
tm
.
id
,
nclOneCodes
:
obj
.
nclOneCodes
,
nclSmallCodes
:
JSON
.
stringify
(
obj
.
nclSmallCodes
),
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
};
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标尼斯信息
var
otpObj
=
{
id
:
ordertmproduct
.
id
,
nclOneCodes
:
nclOneCodes2
,
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标尼斯信息
var
otpObj
=
{
id
:
ordertmproduct
.
id
,
nclOneCodes
:
nclOneCodes2
,
updateuser_id
:
user
.
id
,
updateuser
:
user
.
nickname
};
await
self
.
ordertmproductSve
.
dao
.
update
(
otpObj
,
t
);
//商标交付单 修改大类列表
await
self
.
ordertmproductSve
.
dao
.
update
(
otpObj
,
t
);
//商标交付单 修改大类列表
return
system
.
getResultSuccess
();
})
}
...
...
@@ -210,7 +211,7 @@ class TradeMarkService extends ServiceBase {
* obj.officialFileName 官文文件名称 ,
* obj.officialFileUrl 官文文件地址 ,
*/
async
receiveTmOfficialData
(
obj
){
async
receiveTmOfficialData
(
obj
)
{
// return system.getResultFail(-100, "接口开发中");
// var user = obj.user;
// var app = obj.app;
...
...
@@ -219,60 +220,60 @@ class TradeMarkService extends ServiceBase {
// return system.getResultFail(-100, "未知用户");
// }
var
deliveryOrderNo
=
obj
.
deliveryOrderNo
;
if
(
!
deliveryOrderNo
)
{
if
(
!
deliveryOrderNo
)
{
return
system
.
getResultFail
(
-
101
,
"deliveryOrderNo参数错误"
);
}
// 1.获取交付单信息
var
ordertmproduct
=
await
this
.
ordertmproductSve
.
dao
.
model
.
findOne
({
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
return
system
.
getResultFail
(
-
102
,
"商标交付单不存在"
);
}
// if(!app){
// return system.getResultFail(-103, "未知应用");
// }
var
tbCode
=
obj
.
tbCode
;
if
(
!
tbCode
)
{
if
(
!
tbCode
)
{
return
system
.
getResultFail
(
-
104
,
"tbCode参数错误"
);
}
//获取商标尼斯信息
var
tm
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
tbCode
:
tbCode
,
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
where
:
{
tbCode
:
tbCode
,
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
tm
||
!
tm
.
id
)
{
if
(
!
tm
||
!
tm
.
id
)
{
return
system
.
getResultFail
(
-
105
,
"尼斯信息不存在"
);
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
tmObj
=
{
id
:
tm
.
id
var
tmObj
=
{
id
:
tm
.
id
};
var
officialObj
=
{
app_id
:
ordertmproduct
.
app_id
var
officialObj
=
{
app_id
:
ordertmproduct
.
app_id
};
if
(
obj
.
officialType
)
{
if
(
self
.
statusConvertJSON
[
obj
.
officialType
])
{
tmObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
officialType
];
if
(
obj
.
officialType
)
{
if
(
self
.
statusConvertJSON
[
obj
.
officialType
])
{
tmObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
officialType
];
officialObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
officialType
];
}
}
if
(
obj
.
tmRegistNum
)
{
if
(
obj
.
tmRegistNum
)
{
officialObj
[
"tmRegistNum"
]
=
obj
.
tmRegistNum
;
tmObj
[
"tmRegistNum"
]
=
obj
.
tmRegistNum
;
tmObj
[
"tmRegistNum"
]
=
obj
.
tmRegistNum
;
}
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标状态信息
if
(
officialObj
[
"tmRegistNum"
]
&&
officialObj
[
"officialType"
]){
if
(
obj
.
officialFileName
)
{
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标状态信息
if
(
officialObj
[
"tmRegistNum"
]
&&
officialObj
[
"officialType"
])
{
if
(
obj
.
officialFileName
)
{
officialObj
[
"officialFileName"
]
=
obj
.
officialFileName
;
}
if
(
obj
.
officialFileUrl
)
{
if
(
obj
.
officialFileUrl
)
{
officialObj
[
"officialFileUrl"
]
=
obj
.
officialFileUrl
;
}
var
code
=
await
self
.
getBusUid
(
"tmoff"
);
officialObj
[
"code"
]
=
code
;
await
self
.
tmofficialDao
.
create
(
officialObj
,
t
);
officialObj
[
"code"
]
=
code
;
await
self
.
tmofficialDao
.
create
(
officialObj
,
t
);
}
return
system
.
getResultSuccess
();
})
...
...
@@ -281,57 +282,67 @@ class TradeMarkService extends ServiceBase {
* 辅助商标状态修改
* @param {*} obj
*/
async
updateAssistTmStatus
(
obj
){
async
updateAssistTmStatus
(
obj
)
{
var
self
=
this
;
var
deliveryOrderNo
=
obj
.
channelOrderNum
;
if
(
!
deliveryOrderNo
)
{
if
(
!
deliveryOrderNo
)
{
return
system
.
getResultFail
(
-
101
,
"deliveryOrderNo参数错误"
);
}
// 1.获取交付单信息
var
ordertmproduct
=
await
this
.
ordertmproductSve
.
dao
.
model
.
findOne
({
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
where
:
{
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
if
(
!
ordertmproduct
||
!
ordertmproduct
.
id
)
{
return
system
.
getResultFail
(
-
102
,
"商标交付单不存在"
);
}
var
tbCode
=
obj
.
proxyCode
;
if
(
!
tbCode
)
{
if
(
!
tbCode
)
{
return
system
.
getResultFail
(
-
104
,
"tbCode参数错误"
);
}
//获取商标尼斯信息
var
tm
=
await
this
.
dao
.
model
.
findOne
({
where
:
{
tbCode
:
tbCode
,
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
where
:
{
tbCode
:
tbCode
,
deliveryOrderNo
:
deliveryOrderNo
},
raw
:
true
});
if
(
!
tm
||
!
tm
.
id
)
{
if
(
!
tm
||
!
tm
.
id
)
{
return
system
.
getResultFail
(
-
105
,
"商标信息不存在"
);
}
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
tmObj
=
{
id
:
tm
.
id
};
var
otp
=
{
id
:
ordertmproduct
.
id
};
if
(
obj
.
tmStatus
)
{
if
(
self
.
statusConvertJSON
[
obj
.
tmStatus
])
{
tmObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
tmStatus
];
var
tmObj
=
{
id
:
tm
.
id
};
var
otp
=
{
id
:
ordertmproduct
.
id
};
if
(
obj
.
tmStatus
)
{
if
(
self
.
statusConvertJSON
[
obj
.
tmStatus
])
{
tmObj
[
"officialType"
]
=
self
.
statusConvertJSON
[
obj
.
tmStatus
];
}
if
(
tmObj
.
officialType
&&
",dqrfa,dsccl,dsh,ddj,ydj,ywc,"
.
indexOf
(
tmObj
.
officialType
)
>=
0
)
{
otp
[
"deliveryStatus"
]
=
tmObj
.
officialType
;
await
self
.
ordertmproductSve
.
update
(
otp
,
t
);
if
(
tmObj
.
officialType
&&
",dqrfa,dsccl,dsh,ddj,ydj,ywc,"
.
indexOf
(
tmObj
.
officialType
)
>=
0
)
{
otp
[
"deliveryStatus"
]
=
tmObj
.
officialType
;
await
self
.
ordertmproductSve
.
update
(
otp
,
t
);
}
// {"dqrfa":"待确认方案", "dsccl": "待上传材料", "dsh": "待审核", "ddj": "待递交", "ydj": "已递交", "ywc": "已完成" },
// {"dqrfa":"待确认方案", "dsccl": "待上传材料", "dsh": "待审核", "ddj": "待递交", "ydj": "已递交", "ywc": "已完成" },
}
if
(
obj
.
opNotes
)
{
tmObj
[
"opNotes"
]
=
obj
.
opNotes
;
if
(
obj
.
opNotes
)
{
tmObj
[
"opNotes"
]
=
obj
.
opNotes
;
}
if
(
obj
.
submitTime
)
{
tmObj
[
"submitTime"
]
=
obj
.
submitTime
;
if
(
obj
.
submitTime
)
{
tmObj
[
"submitTime"
]
=
obj
.
submitTime
;
}
if
(
obj
.
tmRegistNum
){
tmObj
[
"tmRegistNum"
]
=
obj
.
tmRegistNum
;
}
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标状态信息
var
deliveryStatusName
=
uiconfig
.
config
.
pdict
.
official_type
[
tmObj
.
officialType
];
var
flowObj
=
{
isShow
:
1
,
app_id
:
ordertmproduct
.
app_id
,
createuser_id
:
ordertmproduct
.
createuser_id
,
sourceOrderNo
:
deliveryOrderNo
,
opContent
:
"第"
+
tm
.
nclOneCodes
+
"类商标状态更新为【"
+
deliveryStatusName
+
"】"
+
obj
.
opNotes
};
await
self
.
orderflowDao
.
create
(
flowObj
,
t
);
//创建交付流程
await
self
.
dao
.
update
(
tmObj
,
t
);
//修改商标状态信息
return
system
.
getResultSuccess
();
})
}
}
module
.
exports
=
TradeMarkService
;
module
.
exports
=
TradeMarkService
;
igirl-channel/app/base/utils/aliyunClient.js
View file @
d021b43b
const
Client
=
require
(
'aliyun-api-gateway'
).
Client
;
// const client = new Client('203727307', 'b6za34qem6k9a3s3jguvh24nc3ridlnh');
const
client
=
new
Client
(
'203756805'
,
'crkyej0xlmqa6bmvqijun6ltxparllyn'
);
// const client = new Client('203756805', 'crkyej0xlmqa6bmvqijun6ltxparllyn');
const
client
=
new
Client
(
'203763771'
,
'e5e2ytnn6nrkr9qnqk4w5e6z0xlhkznu'
);
class
aliyunClient
{
constructor
()
{
// this.aliReqUrl = "https://aliapi.gongsibao.com/tm/springboard";
...
...
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