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
0765a212
Commit
0765a212
authored
Mar 18, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
4cf33156
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
171 additions
and
169 deletions
+171
-169
center-order/app/base/api/impl/action/icapi.js
+13
-2
center-order/app/base/db/metadata/apps/platform.js
+1
-1
center-order/app/base/db/models/dbneed/needinfo.js
+4
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+100
-162
center-order/app/base/service/impl/dbneed/needinfoSve.js
+53
-4
No files found.
center-order/app/base/api/impl/action/icapi.js
View file @
0765a212
...
...
@@ -6,6 +6,8 @@ class IcAPI extends APIBase {
super
();
// this.utilsProductSve = system.getObject("service.utilsSve.utilsProductSve");
this
.
needsolutionSve
=
system
.
getObject
(
"service.dbneed.needsolutionSve"
);
this
.
needinfoSve
=
system
.
getObject
(
"service.dbneed.needinfoSve"
);
this
.
orderinfoSve
=
system
.
getObject
(
"service.dbcorder.orderinfoSve"
);
}
/**
* 接口跳转-POST请求
...
...
@@ -17,7 +19,7 @@ class IcAPI extends APIBase {
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
if
(
pobj
.
actionType
==
'getPolicyNeedList'
||
pobj
.
actionType
==
'submitPolicyNeedNotes'
)
{
if
(
pobj
.
actionType
==
'getPolicyNeedList'
||
pobj
.
actionType
==
'submitPolicyNeedNotes'
)
{
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"user no login!"
);
}
...
...
@@ -30,7 +32,7 @@ class IcAPI extends APIBase {
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
case
"submitProgramme"
:
//提交公司注册方案
opResult
=
await
this
.
needsolutionSve
.
submitProgramme
(
pobj
);
break
;
...
...
@@ -46,6 +48,15 @@ class IcAPI extends APIBase {
case
"abolishProgramme"
:
//服务商方案作废
opResult
=
await
this
.
needsolutionSve
.
abolishProgramme
(
pobj
);
break
;
case
"submitSolution"
:
//提交需求
opResult
=
await
this
.
needinfoSve
.
createicneedinfo
(
pobj
);
break
;
case
"paySuccess"
:
//支付成功回调
opResult
=
await
this
.
orderinfoSve
.
createsolutionOrder
(
pobj
);
break
;
case
"solutionClose"
:
//需求关闭
opResult
=
await
this
.
needinfoSve
.
solutionClose
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-order/app/base/db/metadata/apps/platform.js
View file @
0765a212
...
...
@@ -69,7 +69,7 @@ module.exports = {
//凭单类型
"direction_type"
:
{
"sr"
:
"收"
,
"zc"
:
"支"
},
"push_return_type"
:
{
"0"
:
"推送失败"
,
"1"
:
"推送成功"
},
"push_chance_type"
:
{
"wts"
:
"未推送"
,
"yts"
:
"已推送"
,
"ygj"
:
"已跟进"
,
"ycd"
:
"已成单"
},
"push_chance_type"
:
{
"wts"
:
"未推送"
,
"yts"
:
"已推送"
,
"ygj"
:
"已跟进"
,
"ycd"
:
"已成单"
,
"ygb"
:
"已关闭"
},
"policy_type"
:{
'fzbt'
:
'租金减免'
,
'jrdk'
:
'金融贷款'
,
'zdfc'
:
'行政措施'
,
'ssjm'
:
'税收优惠'
,
'rlzy'
:
'人力资源'
},
"customer_intention"
:{
"dgj"
:
"待跟进"
,
"yyx"
:
"有意向"
,
"wyx"
:
"无意向"
},
"solution_status"
:{
"ytj"
:
"已提交"
,
"yfk"
:
"已付款"
,
"yzf"
:
"已作废"
,
"ytk"
:
"已退款"
},
...
...
center-order/app/base/db/models/dbneed/needinfo.js
View file @
0765a212
...
...
@@ -31,6 +31,10 @@ module.exports = (db, DataTypes) => {
},
city
:
DataTypes
.
STRING
(
50
),
// 城市
province
:
DataTypes
.
STRING
(
50
),
// 省份
typeCode
:
DataTypes
.
STRING
(
50
),
//类型编码',
typeName
:
DataTypes
.
STRING
(
50
),
//类型名称',
channelTypeCode
:
DataTypes
.
STRING
(
50
),
//渠道类型编码',
channelTypeName
:
DataTypes
.
STRING
(
50
),
//渠道类型名称',
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
0765a212
...
...
@@ -10,6 +10,7 @@ class OrderInfoService extends ServiceBase {
this
.
ordercontactsDao
=
system
.
getObject
(
"db.dbcorder.ordercontactsDao"
);
this
.
orderReceiptVoucherDao
=
system
.
getObject
(
"db.dbcpay.orderreceiptvoucherDao"
);
this
.
moneyJourneyDao
=
system
.
getObject
(
"db.dbcpay.moneyjourneyDao"
);
this
.
needsolutionDao
=
system
.
getObject
(
"db.dbneed.needsolutionDao"
);
}
//----------------------订单创建-----------start----------------
...
...
@@ -284,97 +285,32 @@ class OrderInfoService extends ServiceBase {
return
system
.
getResultSuccess
();
}
// caseService 拟开展服务项目 多 必
// caseCustomerType 目标用户 多 必
// caseProfitType 盈利模式 多 必
// caseApprovalProgram 需专项审批的项目 多
// //caseApprovalProgramName 需专项审批的项目
// //caseApprovalProgramUrl 需专项审批的项目文件
// caseWeb 网站或APP情况
// caseWebName 网站或APP情况名称 必
// caseApp 网站或APP情况
// caseAppName 网站或APP情况名称
// caseWebCertificateUrl 公司域名证书 必
// caseTMCertificateUrl 公司商标证书 必
// 必
// apDxProgramType 申请的电信业务种类 默认
// apProgramScope 申请的业务覆盖范围 默认
// apCompany 公司名称
// apCompanyCode 企业统一社会信用代码
// apCompanyRegCapital 注册资本
// apCompanyRegAddr 注册地址
// apCompanyTel 公司固定电话
// apCompanyLicenseurl 企业法人营业执照
// apCompanyWorkAddr 主要办公地址
// apCompanyType 公司性质
// 必
// companyCate 公司目前主营业务所属行业
// companyPersonnelNum 公司现有人员规模
// companyBusinessScope 公司经营规模
// companyLegalpersonName 法定代表人姓名
// companyLpCertificateCode 法定代表人证件号
// companyLpCertificateType 法定代表人证件类型
// companyLpPhone 法定代表人手机
// companyLpEmail 法定代表人邮箱
// companyLpCertificateUrl 法定代表人身份证
// companyLicenserName 许可负责人姓名
// companyLoCertificateCode 许可负责人证件号
// companyLoCertificateType 许可负责人证件类型
// companyLoPhone 许可负责人手机
// companyLoEmail 许可负责人邮箱
// companyLoCertificateUrl 许可负责人身份证
// companyCsName 客服负责人姓名
// companyCsCertificateCode 客服负责人证件号
// companyCsCertificateType 客服负责人证件类型
// companyCsPhone 客服负责人手机
// companyCsEmail 客服负责人邮箱
// companyCsCertificateUrl 客服负责人身份证
// companySafetyName 安全负责人姓名
// companySfCertificateCode 安全负责人证件号
// companySfCertificateType 安全负责人证件类型
// companySfPhone 安全负责人手机
// companySfEmail 安全负责人邮箱
// companySfCertificateUrl 安全负责人身份证
// shebaoCertificateUrl 社保证明
// webSafetyOrginfo 网络与信息安全管理组织机构设置及工作职责 必
// webSafetyPersonnel 网络与信息安全管理人员配备情况及其相应资质 必
// shareholderCommitUrl 股东追溯不涉及外资承诺书 必
// shareholderInfo 股东股权情况 多 必
// shareholderName 股东名称
// shareholderShareratio 股权比例
// applicantInfo 申请者《国家企业《信用信息公示系统截图》 多 必
// commitUrl 承诺书 必
// otherCaseUrl 收费方案或其他
// otherIDCCertificateUrl 托管协议及托管商IDC证书 多 必
async
createICPOrder
(
pobj
)
{
// var packagingICPResult = await this.packagingICPDeliveryData(pobj, pobj.actionBody);
// if (packagingICPResult.status != 0) {
// return packagingICPResult;
// }
/**
* 创建商标订单
* @param {*} pobj
* {
"actionType": "addOrder",
"actionBody": {
"orderNo":"orderNo"
"channelItemCode":"zzsbzc",
"id":1,
"quantity":1,
"totalSum":300,
"channelOrder":null,
"deliveryData":null
}
}
*/
async
createTmOrder
(
pobj
)
{
var
packagingTmResult
=
await
this
.
packagingTmDeliveryData
(
pobj
,
pobj
.
actionBody
);
if
(
packagingTmResult
.
status
!=
0
)
{
return
packagingTmResult
;
}
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
if
(
pobj
.
actionBody
.
orderNo
)
{
self
.
putOrderDelivery
(
pobj
.
actionBody
.
deliveryData
,
pobj
.
actionBody
.
orderNo
);
}
else
{
var
orderNo
=
await
self
.
getBusUid
(
"icp"
+
pobj
.
appInfo
.
uapp_id
);
self
.
addOrderDelivery
(
pobj
.
actionBody
.
deliveryData
,
orderNo
);
}
var
orderNo
=
await
self
.
getBusUid
(
"tm"
+
pobj
.
appInfo
.
uapp_id
);
var
item
=
await
self
.
createOrder
(
pobj
,
orderNo
,
t
);
self
.
addOrderDelivery
(
pobj
.
actionBody
.
deliveryData
,
orderNo
);
return
system
.
getResultSuccess
({
orderNo
:
orderNo
,
channelServiceNo
:
pobj
.
actionBody
.
channelOrder
.
channelServiceNo
||
orderNo
,
...
...
@@ -384,79 +320,6 @@ class OrderInfoService extends ServiceBase {
});
}
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
...
...
@@ -476,6 +339,81 @@ class OrderInfoService extends ServiceBase {
}
// orderNo
// orderPrice
// phone
// companyName
// city
// area
// companyCategory
// companyType
// orgType
// industryType
// scope
// remark
// solutionBizid
async
createsolutionOrder
(
pobj
)
{
if
(
pobj
.
actionBody
.
orderNo
)
{
return
system
.
getResult
(
null
,
"orderNo不能为空"
);
}
if
(
actionBody
.
orderPrice
)
{
return
system
.
getResult
(
null
,
"orderPrice不能为空"
);
}
if
(
actionBody
.
phone
)
{
return
system
.
getResult
(
null
,
"phone不能为空"
);
}
if
(
actionBody
.
companyName
)
{
return
system
.
getResult
(
null
,
"companyName不能为空"
);
}
if
(
actionBody
.
city
)
{
return
system
.
getResult
(
null
,
"city不能为空"
);
}
if
(
actionBody
.
companyCategory
)
{
return
system
.
getResult
(
null
,
"companyCategory不能为空"
);
}
if
(
actionBody
.
orgType
)
{
return
system
.
getResult
(
null
,
"orgType不能为空"
);
}
if
(
actionBody
.
industryType
)
{
return
system
.
getResult
(
null
,
"industryType不能为空"
);
}
if
(
actionBody
.
scope
)
{
return
system
.
getResult
(
null
,
"scope不能为空"
);
}
var
producesql
=
"SELECT pc.pay_code payCode FROM `p_product` pt JOIN p_product_price pc ON pt.id = pc.product_id WHERE pt.channel_item_name LIKE '%"
+
city
+
"%' AND pc.price_desc LIKE '%"
+
area
+
"%' and pc.additions_desc LIKE '%"
+
companyCategory
+
"%' ;"
var
produceinfo
=
await
this
.
customQuery
(
producesql
);
if
(
produceinfo
)
{
pobj
.
actionBody
.
payCode
=
produceinfo
[
0
].
payCode
;
}
pobj
.
actionBody
.
totalSum
=
pobj
.
actionBody
.
orderPrice
;
pobj
.
actionBody
.
payTotalSum
=
pobj
.
actionBody
.
orderPrice
;
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
orderNo
=
await
self
.
getBusUid
(
"ic"
+
pobj
.
appInfo
.
uapp_id
);
var
needsolutioninfo
=
await
self
.
needsolutionDao
.
findOne
({
channelSolutionNo
:
pobj
.
actionBody
.
solutionBizId
},
t
)
pobj
.
actionBody
.
channelOrder
=
{
channelServiceNo
:
pobj
.
actionBody
.
orderNo
,
channelOrderNo
:
pobj
.
actionBody
.
orderNo
,
needNo
:
needsolutioninfo
.
needNo
,
orderStatus
:
2
}
var
item
=
await
self
.
createOrder
(
pobj
,
orderNo
,
t
);
needsolutioninfo
.
status
=
"ywc"
;
await
self
.
needsolutionDao
.
update
(
needsolutioninfo
,
t
);
self
.
addOrderDelivery
(
pobj
.
actionBody
.
deliveryData
,
orderNo
);
return
system
.
getResultSuccess
({
orderNo
:
orderNo
,
channelServiceNo
:
pobj
.
actionBody
.
channelOrder
.
channelServiceNo
||
orderNo
,
channelOrderNo
:
pobj
.
actionBody
.
channelOrder
.
channelOrderNo
||
orderNo
,
channelParams
:
pobj
.
actionBody
.
channelOrder
.
channelParams
||
""
});
});
}
async
createChannelSource
(
pobj
)
{
//创建渠道来源订单
var
orderNo
=
await
self
.
getBusUid
(
"oc"
+
pobj
.
appInfo
.
uapp_id
);
// var beforeOrder = await this.dao.model.findOne({
...
...
center-order/app/base/service/impl/dbneed/needinfoSve.js
View file @
0765a212
...
...
@@ -9,13 +9,13 @@ class NeedinfoService extends ServiceBase {
}
async
needinfo2fq
(
pobj
)
{
pobj
.
actionBody
.
needNo
=
await
this
.
getBusUid
(
"n"
);
pobj
.
actionBody
.
uapp_id
=
pobj
.
appInfo
.
id
;
pobj
.
actionBody
.
needNo
=
await
this
.
getBusUid
(
"n"
);
pobj
.
actionBody
.
uapp_id
=
pobj
.
appInfo
.
id
;
var
needinfo
=
await
this
.
dao
.
create
(
pobj
.
actionBody
);
var
pobj
=
{
"idempotentId"
:
needinfo
.
needNo
,
"idempotentId"
:
needinfo
.
needNo
,
"idempotentSource"
:
needinfo
.
chanceType_code
,
"idempotentSourceName"
:
pobj
.
appInfo
.
app_name
+
"_"
+
pobj
.
actionBody
.
chanceTypeName
,
"idempotentSourceName"
:
pobj
.
appInfo
.
app_name
+
"_"
+
pobj
.
actionBody
.
chanceTypeName
,
"phone"
:
needinfo
.
publishMobile
,
"remark"
:
needinfo
.
notes
,
"customerName"
:
needinfo
.
publishName
...
...
@@ -32,6 +32,55 @@ class NeedinfoService extends ServiceBase {
// }
}
// intentionBizId
// mobile
// userName
// description
// area
// type
// ext
async
createicneedinfo
(
pobj
,
actionBody
)
{
var
needNo
=
await
this
.
getBusUid
(
"n"
);
if
(
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"intentionBizId不能为空"
);
}
if
(
actionBody
.
mobile
)
{
return
system
.
getResult
(
null
,
"mobile不能为空"
);
}
if
(
actionBody
.
type
)
{
return
system
.
getResult
(
null
,
"type不能为空"
);
}
var
nobj
=
{
uapp_id
:
pobj
.
appInfo
.
uapp_id
,
channelNeedNo
:
actionBody
.
intentionBizId
,
needNo
:
needNo
,
channelUserId
:
pobj
.
userInfo
.
channel_userid
,
publishName
:
actionBody
.
userName
,
publishContent
:
actionBody
.
description
,
publishMobile
:
actionBody
.
mobile
,
city
:
actionBody
.
area
,
disposeNotes
:
actionBody
.
ext
,
channelTypeCode
:
actionBody
.
type
}
return
await
this
.
dao
.
create
(
nobj
);
}
async
solutionClose
(
pobj
)
{
if
(
actionBody
.
intentionBizId
)
{
return
system
.
getResult
(
null
,
"intentionBizId不能为空"
);
}
var
needinfo
=
await
this
.
findOne
({
channelNeedNo
:
actionBody
.
intentionBizId
});
needinfo
.
status
=
"ygb"
;
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
update
(
needinfo
,
t
);
var
needsolutioninfo
=
await
self
.
needsolutionDao
.
findOne
({
channelNeedNo
:
pobj
.
actionBody
.
intentionBizId
},
t
)
needsolutioninfo
.
status
=
"yzf"
;
await
self
.
needsolutionDao
.
update
(
needsolutioninfo
,
t
);
await
})
}
async
flowinfo
(
obj
)
{
}
...
...
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