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
6ef11c7a
Commit
6ef11c7a
authored
Feb 29, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
0b115482
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
1 deletions
+107
-1
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+106
-0
center-order/app/base/service/impl/dbneed/needinfoSve.js
+1
-1
No files found.
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
6ef11c7a
...
...
@@ -224,6 +224,112 @@ class OrderInfoService extends ServiceBase {
delete
pobj
.
actionBody
.
deliveryData
[
"nclones"
];
return
system
.
getResultSuccess
();
}
async
createICPOrder
(
pobj
)
{
var
packagingICPResult
=
await
this
.
packagingICPDeliveryData
(
pobj
,
pobj
.
actionBody
);
if
(
packagingICPResult
.
status
!=
0
)
{
return
packagingICPResult
;
}
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
sql
=
""
;
var
orderNo
=
""
;
if
(
pobj
.
actionBody
.
orderNo
)
{
orderNo
=
pobj
.
actionBody
.
orderNo
;
sql
=
"update c_order_delivery set deliveryContent='"
+
JSON
.
stringify
(
pobj
.
actionBody
.
deliveryData
)
+
"' where sourceOrderNo='"
+
orderNo
+
"'"
;
}
else
{
var
orderNo
=
await
self
.
getBusUid
(
"icp"
+
pobj
.
appInfo
.
uapp_id
);
var
item
=
await
self
.
createOrder
(
pobj
,
orderNo
,
t
);
sql
=
"INSERT INTO `c_order_delivery` (`sourceOrderNo`,`deliveryContent`) VALUE('"
+
orderNo
+
"','"
+
JSON
.
stringify
(
pobj
.
actionBody
.
deliveryData
)
+
"')"
;
}
self
.
customQuery
(
sql
);
return
system
.
getResultSuccess
({
orderNo
:
orderNo
,
channelServiceNo
:
pobj
.
actionBody
.
channelOrder
.
channelServiceNo
||
orderNo
,
channelOrderNo
:
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
||
orderNo
,
channelParams
:
pobj
.
actionBody
.
channelOrder
.
channelParams
||
""
});
});
}
async
packagingICPDeliveryData
(
pobj
,
actionBody
)
{
//重新组装商标交付信息
if
(
actionBody
.
pageNum
)
{
return
"表单参数错误"
;
}
if
(
Number
(
actionBody
.
totalSum
)
<
300
)
{
return
"总价有误,总价不能小于300,20140"
;
}
var
deliveryData
=
actionBody
.
deliveryData
;
if
(
!
deliveryData
.
nclones
)
{
return
"商品/服务项不能为空,20150"
;
}
if
(
!
deliveryData
.
tm
)
{
return
"商标信息不能为空,20180"
;
}
if
(
!
deliveryData
.
tm
.
tmName
)
{
return
"商标名称不能为空,20180"
;
}
if
(
!
deliveryData
.
tm
.
picUrl
)
{
return
"商标图样不能为空,20210"
;
}
if
(
!
deliveryData
.
apply
)
{
return
"申请信息不能为空,20230"
;
}
if
(
!
deliveryData
.
apply
.
code
)
{
return
"申请统一社会信用代码不能为空,20250"
;
}
if
(
!
deliveryData
.
apply
.
zipCode
)
{
return
"申请邮编不能为空,20280"
;
}
if
(
!
deliveryData
.
apply
.
customerType
)
{
return
"申请人类型不能为空,20310"
;
}
if
(
deliveryData
.
apply
.
customerType
!=
"ent"
&&
deliveryData
.
apply
.
customerType
==
"person"
)
{
return
"申请人类型错误,20330"
;
}
var
deliveryStatus
=
"dsccl"
;
var
deliveryStatusName
=
"待上传材料"
;
if
(
deliveryData
.
apply
.
customerType
==
"ent"
)
{
if
(
deliveryData
.
apply
.
businessLicensePdf
&&
deliveryData
.
apply
.
gzwtsUrl
)
{
deliveryStatus
=
"dsh"
;
deliveryStatusName
=
"待审核"
;
}
}
else
{
if
(
deliveryData
.
apply
.
businessLicensePdf
&&
deliveryData
.
apply
.
gzwtsUrl
&&
deliveryData
.
apply
.
identityCardPdf
)
{
deliveryStatus
=
"dsh"
;
deliveryStatusName
=
"待审核"
;
}
}
var
price_item
=
actionBody
.
product_info
.
price_item
;
var
self
=
this
;
var
nclList
=
[];
for
(
let
index
=
0
;
index
<
deliveryData
.
nclones
.
length
;
index
++
)
{
var
nclones
=
deliveryData
.
nclones
[
index
];
var
nclThree
=
nclones
.
nclThree
;
var
tempNclones
=
{
ncloneCode
:
nclones
.
code
,
ncloneName
:
nclones
.
name
,
nclThree
:
nclThree
,
nclCount
:
nclThree
.
length
,
nclPublicExpense
:
Number
(
price_item
.
price
)
*
nclThree
.
length
,
deliveryStatus
:
deliveryStatus
,
//商标交付状态
deliveryStatusName
:
deliveryStatusName
,
submitTime
:
""
,
deliveryType
:
pobj
.
appInfo
.
delivery_type
,
//应用数据操作类型:00独立,10全委托
tbCode
:
await
self
.
getBusUid
(
"tb"
+
pobj
.
appInfo
.
uapp_id
)
//提报号(自动生成)
}
nclList
.
push
(
tempNclones
);
}
pobj
.
actionBody
.
deliveryData
.
nclList
=
nclList
;
delete
pobj
.
actionBody
.
deliveryData
[
"nclones"
];
return
system
.
getResultSuccess
();
}
/**
* 创建其他订单
* @param {*} pobj
...
...
center-order/app/base/service/impl/dbneed/needinfoSve.js
View file @
6ef11c7a
...
...
@@ -22,7 +22,7 @@ class NeedinfoService extends ServiceBase {
};
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
"https://yunfuapi
-dev
.gongsibao.com/crm/opportunity/submit"
,
pobj
);
var
rtn
=
await
rc
.
post
(
"https://yunfuapi.gongsibao.com/crm/opportunity/submit"
,
pobj
);
console
.
log
(
rtn
)
return
system
.
getResultSuccess
();
// var opResultstr = await this.execlient.execPost(pobj, "https://yunfuapi-dev.gongsibao.com/crm/opportunity/submit");
...
...
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