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
3b7a4952
Commit
3b7a4952
authored
Jun 16, 2020
by
高宇强
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ic-deliver' of gitlab.gongsibao.com:jiangyong/zhichan into ic-deliver
parents
c67ad416
6bca5559
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
295 additions
and
142 deletions
+295
-142
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+22
-17
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
+25
-21
ic-deliver/app/base/controller/impl/bizchance/schemeCtl.js
+106
-97
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
+7
-2
ic-deliver/app/base/db/impl/bizchance/materialDao.js
+1
-1
ic-deliver/app/base/db/impl/bizchance/schemeDao.js
+1
-1
ic-deliver/app/base/db/metadata/app/platform.js
+9
-3
ic-deliver/app/base/db/models/delivery/delivery_bill.js
+5
-0
ic-deliver/app/base/db/models/delivery/settle_bill.js
+70
-0
ic-deliver/app/base/service/impl/bizchance/schemeSve.js
+49
-0
No files found.
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
3b7a4952
...
...
@@ -50,36 +50,41 @@ class BizOptCtl extends CtlBase {
var
rarr
=
{}
if
(
rs
){
var
statusInfo
=
{
"currentStatus"
:
rs
.
business_status
};
//商机状态
var
bus
s
inessInfo
=
{};
bus
s
inessInfo
.
businessMode
=
rs
.
demand_code
;
//商机编号
bus
sinessInfo
.
channelSource
=
rs
.
source_name
;
//渠道来源
bus
sinessInfo
.
businessType
=
rs
.
business_type
;
//商机类型代码
bus
sinessInfo
.
businessName
=
appconfig
.
pdict
.
businessType
[
rarr
.
businessT
ype
];
//商机类型名称
bussinessInfo
.
serviceCode
=
rs
.
service_address
;
//服务地区
if
(
bus
s
inessInfo
.
businessName
==
"云上园区注册"
){
bus
sinessInfo
.
serviceName
=
appconfig
.
pdict
.
registeredParkDict
[
bussinessInfo
.
serviceCode
];
//服务地区名称
var
businessInfo
=
{};
businessInfo
.
businessMode
=
rs
.
demand_code
;
//商机编号
bus
inessInfo
.
channelSource
=
appconfig
.
pdict
.
source
[
rs
.
source_name
];
/
//渠道来源
// bu
sinessInfo.businessType = rs.business_type;//商机类型代码
bus
inessInfo
.
businessType
=
appconfig
.
pdict
.
businessType
[
rs
.
business_t
ype
];
//商机类型名称
// businessInfo.serviceArea
= rs.service_address;//服务地区
if
(
businessInfo
.
businessName
==
"云上园区注册"
){
bus
inessInfo
.
serviceArea
=
appconfig
.
pdict
.
registeredParkDict
[
rs
.
service_address
];
//服务地区名称
}
else
{
bus
sinessInfo
.
serviceName
=
appconfig
.
pdict
.
registeredAreaDict
[
bussinessInfo
.
serviceCode
];
//服务地区名称
bus
inessInfo
.
serviceArea
=
appconfig
.
pdict
.
registeredAreaDict
[
rs
.
service_address
];
//服务地区名称
}
bussinessInfo
.
statusReason
=
rs
.
close_reason
;
//商机关闭原因
bussinessInfo
.
memoInfo
=
rs
.
business_info
.
memoInfo
;
//备注信息
bussinessInfo
.
contactsName
=
rs
.
business_info
.
contactsName
;
//联系人名称
bussinessInfo
.
contactsPhone
=
rs
.
business_info
.
contactsPhone
;
//联系人联系方式
bussinessInfo
.
createdTime
=
this
.
timeFormat
(
rs
.
created_at
);
//商机创建时间
rarr
.
push
(
statusInfo
);
rarr
.
push
(
bussinessInfo
);
if
(
businessInfo
.
businessName
==
"注册地址"
){
businessInfo
.
registeredAddress
=
appconfig
.
pdict
.
registeredAreaDict
[
rs
.
service_address
];
//注册地址名称
}
businessInfo
.
statusReason
=
rs
.
close_reason
;
//商机关闭原因
businessInfo
.
memoInfo
=
rs
.
business_info
.
memoInfo
;
//备注信息
businessInfo
.
contactsName
=
rs
.
business_info
.
contactsName
;
//联系人名称
businessInfo
.
contactsPhone
=
rs
.
business_info
.
contactsPhone
;
//联系人联系方式
businessInfo
.
createdTime
=
this
.
timeFormat
(
rs
.
created_at
);
//商机创建时间
rarr
.
statusInfo
=
statusInfo
;
rarr
.
businessInfo
=
businessInfo
;
}
if
(
ms
){
var
planInfo
=
ms
.
scheme_info
;
planInfo
.
schemeNumber
=
ms
.
scheme_number
;
planInfo
.
currentStatus
=
ms
.
scheme_status
;
planInfo
.
statusReason
=
ms
.
reject_reason
;
rarr
.
p
ush
(
planInfo
)
;
rarr
.
p
lanInfo
=
planInfo
;
}
return
system
.
getResult
(
rarr
);
}
catch
(
error
){
console
.
log
(
"eeeeeeeeeeeeeeeeeeeeee"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
}
...
...
ic-deliver/app/base/controller/impl/bizchance/deliverybillCtl.js
View file @
3b7a4952
...
...
@@ -134,30 +134,34 @@ class DeliverybillCtl extends CtlBase {
}
}
async
UpdateofficialSealByDeliverCode
(
pobj
,
qobj
,
req
){
//
if
((
pobj
.
deliverNumber
&&
pobj
.
deliverNumber
!=
'undefined'
&&
((
pobj
.
baseInfo
.
officialSeal
&&
pobj
.
baseInfo
.
officialSeal
!=
'undefined'
)
||
(
pobj
.
baseInfo
.
businessLicense
&&
pobj
.
baseInfo
.
businessLicense
!=
'undefined'
)))){
var
rs
=
await
this
.
service
.
findInfoByDeliverCode
(
pobj
)
//先得到交付单详情
if
(
pobj
.
baseInfo
.
officialSeal
&&
pobj
.
baseInfo
.
officialSeal
!=
'undefined'
){
rs
.
delivery_info
.
officialSeal
=
pobj
.
baseInfo
.
officialSeal
;
}
if
(
pobj
.
baseInfo
.
businessLicense
&&
pobj
.
baseInfo
.
businessLicense
!=
'undefined'
){
rs
.
delivery_info
.
businessLicense
=
pobj
.
baseInfo
.
businessLicense
;
}
//更新详情
var
uarr
=
{
"deliverNumber"
:
pobj
.
deliverNumber
,
"baseInfo"
:
rs
.
delivery_info
};
await
this
.
service
.
updateInfoByDeliverCode
(
uarr
);
return
system
.
getResult
(
"更新成功"
);
}
else
{
return
system
.
getResultError
(
"参数错误!"
);
}
}
/*根据交付单编号更新交付单详情*/
async
updateInfoByDeliverCode
(
pobj
,
qobj
,
req
){
//
if
(
pobj
.
deliverNumber
&&
pobj
.
deliverNumber
!=
'undefined'
){
try
{
//判断工商扫描件和营业执照扫描件是否存在,若存在更新交付单的详情
if
((
pobj
.
baseInfo
.
officialSeal
&&
pobj
.
baseInfo
.
officialSeal
!=
'undefined'
)
||
(
pobj
.
baseInfo
.
businessLicense
&&
pobj
.
baseInfo
.
businessLicense
!=
'undefined'
)){
var
rs
=
await
this
.
service
.
findInfoByDeliverCode
(
pobj
)
//先得到交付单详情
var
deliveryInfo
=
rs
.
delivery_info
;
if
(
pobj
.
baseInfo
.
officialSeal
&&
pobj
.
baseInfo
.
officialSeal
!=
'undefined'
){
deliveryInfo
.
officialSeal
=
pobj
.
baseInfo
.
officialSeal
;
}
if
(
pobj
.
baseInfo
.
businessLicense
&&
pobj
.
baseInfo
.
businessLicense
!=
'undefined'
){
deliveryInfo
.
businessLicense
=
pobj
.
baseInfo
.
businessLicense
;
}
//更新详情
var
uarr
=
{
"deliverNumber"
:
pobj
.
deliverNumber
,
"deliveryInfo"
:
deliveryInfo
};
await
this
.
service
.
updateInfoByDeliverCode
(
uarr
);
}
//更新详情
await
this
.
service
.
updateInfoByDeliverCode
(
pobj
);
//更新材料信息
await
this
.
materialService
.
updateInfoByDeliverNumber
(
pobj
);
var
statusInfo
=
{
...
...
@@ -213,7 +217,7 @@ class DeliverybillCtl extends CtlBase {
"actionType"
:
"updateOrderStatus"
,
"actionBody"
:{
"orderNum"
:
pobj
.
businessMode
,
//订单编码
"status"
:
2
,
//已接单
"status"
:
2
0
,
//已接单
"deliverContent"
:
pobj
}
}
...
...
ic-deliver/app/base/controller/impl/bizchance/schemeCtl.js
View file @
3b7a4952
...
...
@@ -121,48 +121,7 @@ class SchemeCtl extends CtlBase {
rarr
.
clerkPhone
=
rs
.
salesman_phone
;
//业务员联系方式
rarr
.
createdTime
=
this
.
timeFormat
(
rs
.
created_at
);
//创建方案的日期
rarr
.
statusTime
=
this
.
timeFormat
(
rs
.
updated_at
);
//当前状态的日期
var
baseInfo
=
{};
if
(
rarr
.
businessName
==
"公司注册"
||
rarr
.
businessName
==
"园区注册"
||
rarr
.
businessName
==
"税控申请"
||
rarr
.
businessName
==
"代理记账"
){
baseInfo
.
taxpayerType
=
rs
.
scheme_info
.
taxpayerType
;
}
if
(
rarr
.
businessName
==
"园区注册"
){
baseInfo
.
registeredType
=
rs
.
scheme_info
.
registeredType
;
}
if
(
rarr
.
businessName
==
"公司注册"
||
rarr
.
businessName
==
"园区注册"
){
if
(
rarr
.
businessName
==
"公司注册"
){
baseInfo
.
companyProperties
=
rs
.
scheme_info
.
companyProperties
;
}
baseInfo
.
engagedIndustry
=
rs
.
scheme_info
.
engagedIndustry
;
baseInfo
.
addressType
=
rs
.
scheme_info
.
addressType
;
baseInfo
.
fullAddress
=
rs
.
scheme_info
.
fullAddress
;
baseInfo
.
businessScope
=
rs
.
scheme_info
.
businessScope
;
baseInfo
.
isWhether
=
rs
.
scheme_info
.
isWhether
;
}
if
(
rarr
.
businessName
==
"刻章服务"
){
baseInfo
.
whetherType
=
rs
.
scheme_info
.
whetherType
;
}
if
(
rarr
.
businessName
==
"代理记账"
){
baseInfo
.
subjectType
=
rs
.
scheme_info
.
subjectType
;
}
if
(
rarr
.
businessName
==
"注册地址"
||
rarr
.
businessName
==
"代理记账"
){
baseInfo
.
buyTime
=
rs
.
scheme_info
.
buyTime
;
baseInfo
.
buyDuration
=
rs
.
scheme_info
.
buyDuration
;
baseInfo
.
isRenew
=
rs
.
scheme_info
.
isRenew
;
}
rarr
.
baseInfo
=
baseInfo
;
if
(
rarr
.
businessName
!=
"公司注册"
&&
rarr
.
businessName
!=
"园区注册"
){
var
companyInfo
=
{};
companyInfo
.
creditCode
=
rs
.
scheme_info
.
creditCode
;
companyInfo
.
companyType
=
rs
.
scheme_info
.
companyType
;
companyInfo
.
establishedTime
=
rs
.
scheme_info
.
establishedTime
;
companyInfo
.
registeredCapital
=
rs
.
scheme_info
.
registeredCapital
;
companyInfo
.
shareholderName
=
rs
.
scheme_info
.
shareholderName
;
companyInfo
.
businessTerm
=
rs
.
scheme_info
.
businessTerm
;
companyInfo
.
businessScope
=
rs
.
scheme_info
.
businessScope
;
companyInfo
.
residenceAddress
=
rs
.
scheme_info
.
residenceAddress
;
rarr
.
companyInfo
=
companyInfo
;
}
rarr
.
baseInfo
=
rs
.
scheme_info
;
}
return
system
.
getResult
(
rarr
);
}
...
...
@@ -193,92 +152,119 @@ class SchemeCtl extends CtlBase {
/*根据商机编号更新方案详情*/
async
updateInfoByDemandCode
(
pobj
,
qobj
,
req
){
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
schemeNumber
&&
schemeNumber
!=
'undefined'
&&
pobj
.
planInfo
&&
pobj
.
plan
Info
!=
'undefined'
){
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
schemeNumber
&&
pobj
.
schemeNumber
!=
'undefined'
&&
pobj
.
baseInfo
&&
pobj
.
base
Info
!=
'undefined'
){
try
{
pobj
.
currentStatus
=
"beforeConfirmation"
;
//同时把方案的状态也更新为待确认
if
(
pobj
.
planInfo
.
caseRemarks
&&
pobj
.
planInfo
.
caseRemarks
!=
'undefined'
){
pobj
.
planInfo
.
memoInfo
=
pobj
.
planInfo
.
caseRemarks
;
//备注信息
var
businessInfo
=
await
this
.
bizoptService
.
findInfoByDemandCode
(
pobj
);
//得到商机的信息,插入方案表时要用到
if
(
businessInfo
){
pobj
.
businessId
=
businessInfo
.
id
;
//商机id
pobj
.
businessType
=
businessInfo
.
business_type
;
//商机类型
pobj
.
servicerCode
=
businessInfo
.
facilitator_id
;
//服务商id
pobj
.
servicerName
=
businessInfo
.
facilitator_name
;
//服务商的名称
pobj
.
clerkOpcode
=
businessInfo
.
salesman_opcode
;
//这个信息需要确认
pobj
.
clerkId
=
businessInfo
.
salesman_id
;
//业务员id
pobj
.
clerkName
=
businessInfo
.
salesman_name
;
//业务员名称
pobj
.
clerkPhone
=
businessInfo
.
salesman_phone
;
//业务员联系电话
//pobj.currentStatus = appconfig.pdict.businessStatus[businessInfo.business_status];//商机状态即为方案状态
//pobj.statusReason = businessInfo.close_reason;//状态原因
}
if
(
pobj
.
planInfo
.
cmpName
&&
pobj
.
planInfo
.
cmpName
!=
'undefined'
){
pobj
.
planInfo
.
companyName
=
pobj
.
planInfo
.
cmpName
;
//公司名称
if
(
pobj
.
baseInfo
.
caseRemarks
&&
pobj
.
baseInfo
.
caseRemarks
!=
'undefined'
){
pobj
.
baseInfo
.
memoInfo
=
pobj
.
baseInfo
.
caseRemarks
;
//备注信息
}
if
(
pobj
.
baseInfo
.
cmpName
&&
pobj
.
baseInfo
.
cmpName
!=
'undefined'
){
pobj
.
baseInfo
.
companyName
=
pobj
.
baseInfo
.
cmpName
;
//公司名称
}
//是否刻章
if
(
pobj
.
planInfo
.
cmpSealSevCase
&&
pobj
.
plan
Info
.
cmpSealSevCase
!=
'undefined'
){
pobj
.
planInfo
.
isWhether
=
pobj
.
plan
Info
.
cmpSealSevCase
;
if
(
pobj
.
baseInfo
.
cmpSealSevCase
&&
pobj
.
base
Info
.
cmpSealSevCase
!=
'undefined'
){
pobj
.
baseInfo
.
isWhether
=
pobj
.
base
Info
.
cmpSealSevCase
;
}
if
(
pobj
.
planInfo
.
psSealSevCase
&&
pobj
.
plan
Info
.
psSealSevCase
!=
'undefined'
){
pobj
.
planInfo
.
isWhether
=
pobj
.
plan
Info
.
psSealSevCase
if
(
pobj
.
baseInfo
.
psSealSevCase
&&
pobj
.
base
Info
.
psSealSevCase
!=
'undefined'
){
pobj
.
baseInfo
.
isWhether
=
pobj
.
base
Info
.
psSealSevCase
}
//纳税人类型
if
(
pobj
.
planInfo
.
psTaxpayerType
&&
pobj
.
plan
Info
.
psTaxpayerType
!=
'undefined'
){
pobj
.
planInfo
.
taxPayerType
=
pobj
.
planInfo
.
psT
axpayerType
;
if
(
pobj
.
baseInfo
.
psTaxpayerType
&&
pobj
.
base
Info
.
psTaxpayerType
!=
'undefined'
){
pobj
.
baseInfo
.
taxpayerType
=
pobj
.
baseInfo
.
t
axpayerType
;
}
if
(
pobj
.
planInfo
.
cmpTaxPayerType
&&
pobj
.
plan
Info
.
cmpTaxPayerType
!=
'undefined'
){
pobj
.
planInfo
.
taxPayerType
=
pobj
.
planInfo
.
cmpTaxP
ayerType
;
if
(
pobj
.
baseInfo
.
cmpTaxPayerType
&&
pobj
.
base
Info
.
cmpTaxPayerType
!=
'undefined'
){
pobj
.
baseInfo
.
taxpayerType
=
pobj
.
baseInfo
.
taxp
ayerType
;
}
if
(
pobj
.
planInfo
.
agentTaxpayerType
&&
pobj
.
plan
Info
.
agentTaxpayerType
!=
'undefined'
){
pobj
.
planInfo
.
taxpayerType
=
pobj
.
plan
Info
.
agentTaxpayerType
;
if
(
pobj
.
baseInfo
.
agentTaxpayerType
&&
pobj
.
base
Info
.
agentTaxpayerType
!=
'undefined'
){
pobj
.
baseInfo
.
taxpayerType
=
pobj
.
base
Info
.
agentTaxpayerType
;
}
//详细地址
if
(
pobj
.
planInfo
.
addressTypeInput
&&
pobj
.
plan
Info
.
addressTypeInput
!=
'undefined'
){
pobj
.
planInfo
.
residenceAddress
=
pobj
.
plan
Info
.
addressTypeInput
;
if
(
pobj
.
baseInfo
.
addressTypeInput
&&
pobj
.
base
Info
.
addressTypeInput
!=
'undefined'
){
pobj
.
baseInfo
.
residenceAddress
=
pobj
.
base
Info
.
addressTypeInput
;
}
if
(
pobj
.
planInfo
.
addressType
&&
pobj
.
plan
Info
.
addressType
!=
'undefined'
){
//地址类型
pobj
.
planInfo
.
addressTypeName
=
appconfig
.
pdict
.
addressTypeDict
[
pobj
.
plan
Info
.
addressType
];
//地址类型名称
if
(
pobj
.
baseInfo
.
addressType
&&
pobj
.
base
Info
.
addressType
!=
'undefined'
){
//地址类型
pobj
.
baseInfo
.
addressTypeName
=
appconfig
.
pdict
.
addressTypeDict
[
pobj
.
base
Info
.
addressType
];
//地址类型名称
}
if
(
pobj
.
planInfo
.
TaxPayerType
&&
pobj
.
planInfo
.
TaxP
ayerType
!=
'undefined'
){
pobj
.
planInfo
.
TaxPayerName
=
appconfig
.
pdict
.
TaxpayerTypeDict
[
pobj
.
planInfo
.
TaxP
ayerType
];
//纳税人名称
if
(
pobj
.
baseInfo
.
taxpayerType
&&
pobj
.
baseInfo
.
taxp
ayerType
!=
'undefined'
){
pobj
.
baseInfo
.
taxpayerName
=
appconfig
.
pdict
.
TaxpayerTypeDict
[
pobj
.
baseInfo
.
taxp
ayerType
];
//纳税人名称
}
if
(
pobj
.
planInfo
.
registeredType
&&
pobj
.
plan
Info
.
registeredType
!=
'undefined'
){
pobj
.
planInfo
.
registeredName
=
appconfig
.
pdict
.
registeredTypeDict
[
pobj
.
plan
Info
.
registeredType
];
//云上园区名称
if
(
pobj
.
baseInfo
.
registeredType
&&
pobj
.
base
Info
.
registeredType
!=
'undefined'
){
pobj
.
baseInfo
.
registeredName
=
appconfig
.
pdict
.
registeredTypeDict
[
pobj
.
base
Info
.
registeredType
];
//云上园区名称
}
if
(
pobj
.
planInfo
.
agentType
&&
pobj
.
plan
Info
.
agentType
!=
'undefined'
){
pobj
.
planInfo
.
agentName
=
appconfig
.
pdict
.
agentTypeDict
[
pobj
.
plan
Info
.
agentType
];
//代理记账主体名称
if
(
pobj
.
planInfo
.
serviceArea
&&
pobj
.
plan
Info
.
serviceArea
!=
'undefined'
){
if
(
pobj
.
plan
Info
.
agentType
==
"company"
){
pobj
.
planInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
plan
Info
.
serviceArea
];
//注册地区
if
(
pobj
.
baseInfo
.
agentType
&&
pobj
.
base
Info
.
agentType
!=
'undefined'
){
pobj
.
baseInfo
.
agentName
=
appconfig
.
pdict
.
agentTypeDict
[
pobj
.
base
Info
.
agentType
];
//代理记账主体名称
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
base
Info
.
serviceArea
!=
'undefined'
){
if
(
pobj
.
base
Info
.
agentType
==
"company"
){
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
base
Info
.
serviceArea
];
//注册地区
}
else
{
pobj
.
planInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
plan
Info
.
serviceArea
];
//注册地区
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
base
Info
.
serviceArea
];
//注册地区
}
}
}
if
(
pobj
.
businessType
==
"companyCase"
){
if
(
pobj
.
planInfo
.
companynature
&&
pobj
.
plan
Info
.
companynature
!=
'undefined'
){
pobj
.
planInfo
.
companyType
=
appconfig
.
pdict
.
companyNatureDict
[
pobj
.
plan
Info
.
companynature
];
//公司类型的名称
if
(
pobj
.
baseInfo
.
companynature
&&
pobj
.
base
Info
.
companynature
!=
'undefined'
){
pobj
.
baseInfo
.
companyType
=
appconfig
.
pdict
.
companyNatureDict
[
pobj
.
base
Info
.
companynature
];
//公司类型的名称
}
//注册地区
if
(
pobj
.
planInfo
.
serviceArea
&&
pobj
.
plan
Info
.
serviceArea
!=
'undefined'
){
pobj
.
planInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
plan
Info
.
serviceArea
];
//注册地区
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
base
Info
.
serviceArea
!=
'undefined'
){
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
base
Info
.
serviceArea
];
//注册地区
}
}
else
if
(
pobj
.
businessType
==
"psCase"
){
//注册地区
if
(
pobj
.
planInfo
.
serviceArea
&&
pobj
.
planInfo
.
serviceArea
!=
'undefined'
){
pobj
.
planInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
planInfo
.
serviceArea
];
//注册地区
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
baseInfo
.
serviceArea
!=
'undefined'
){
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
}
}
else
{
//注册地区
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
baseInfo
.
serviceArea
!=
'undefined'
){
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
}
}
if
(
pobj
.
planInfo
.
engagedIndustry
&&
pobj
.
planInfo
.
engagedIndustry
!=
'undefined'
){
pobj
.
planInfo
.
engagedIndName
=
appconfig
.
pdict
.
engagedIndustryDict
[
pobj
.
planInfo
.
engagedIndustry
];
//从事行业名称
}
if
(
pobj
.
planInfo
.
sealSevType
&&
pobj
.
planInfo
.
sealSevType
!=
'undefined'
){
pobj
.
planInfo
.
sealSevName
=
appconfig
.
pdict
.
sealSevTypeDict
[
pobj
.
planInfo
.
sealSevType
];
//刻章类型名称名称
if
(
pobj
.
planInfo
.
serviceArea
&&
pobj
.
planInfo
.
serviceArea
!=
'undefined'
){
if
(
pobj
.
planInfo
.
sealSevType
==
"company"
){
pobj
.
planInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
planInfo
.
serviceArea
];
//注册地区
//goumaisichang
if
(
pobj
.
baseInfo
.
buyDuration
&&
pobj
.
baseInfo
.
buyDuration
!=
'undefined'
){
pobj
.
baseInfo
.
buyDuration
=
appconfig
.
pdict
.
buyDurationDict
[
pobj
.
baseInfo
.
buyDuration
];
}
if
(
pobj
.
baseInfo
.
isRenew
){
pobj
.
baseInfo
.
isRenew
=
appconfig
.
pdict
.
isRenewDict
[
pobj
.
baseInfo
.
isRenew
];
}
else
{
pobj
.
baseInfo
.
isRenew
=
"不开启"
}
if
(
pobj
.
baseInfo
.
engagedIndustry
&&
pobj
.
baseInfo
.
engagedIndustry
!=
'undefined'
){
pobj
.
baseInfo
.
engagedIndName
=
appconfig
.
pdict
.
engagedIndustryDict
[
pobj
.
baseInfo
.
engagedIndustry
];
//从事行业名称
}
if
(
pobj
.
baseInfo
.
sealSevType
&&
pobj
.
baseInfo
.
sealSevType
!=
'undefined'
){
pobj
.
baseInfo
.
sealSevName
=
appconfig
.
pdict
.
sealSevTypeDict
[
pobj
.
baseInfo
.
sealSevType
];
//刻章类型名称名称
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
baseInfo
.
serviceArea
!=
'undefined'
){
if
(
pobj
.
baseInfo
.
sealSevType
==
"company"
){
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
}
else
{
pobj
.
planInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
plan
Info
.
serviceArea
];
//注册地区
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
base
Info
.
serviceArea
];
//注册地区
}
}
}
//修改方案的时候,需要把修改的方案传给商城
var
ttype
=
pobj
.
businessType
;
pobj
.
businessType
=
appconfig
.
pdict
.
fdyDict
[
pobj
.
businessType
];
...
...
@@ -294,6 +280,8 @@ class SchemeCtl extends CtlBase {
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
console
.
log
(
"777777777777777777"
);
console
.
log
(
JSON
.
stringify
(
j
));
if
(
j
.
status
==
1
){
pobj
.
businessType
=
ttype
;
var
retn
=
await
this
.
service
.
updateInfoByDemandCode
(
pobj
);
//更新方案详情
...
...
@@ -304,15 +292,15 @@ class SchemeCtl extends CtlBase {
else
{
return
system
.
getResultError
(
"更新方案出错!"
);
}
}
catch
(
error
){
console
.
log
(
"ffffffffffffffffffffffffffffffff"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
}
else
{
console
.
log
(
"DDDDDDDDDDDDDDD"
);
return
system
.
getResultError
(
"参数错误!"
);
}
}
...
...
@@ -335,6 +323,8 @@ class SchemeCtl extends CtlBase {
/*插入方案信息*/
async
insertInfo
(
pobj
,
qobj
,
req
){
console
.
log
(
"11111111111111111111111"
);
console
.
log
(
JSON
.
stringify
(
pobj
));
if
(
pobj
.
businessMode
&&
pobj
.
businessMode
!=
'undefined'
&&
pobj
.
baseInfo
&&
pobj
.
baseInfo
!=
'undefined'
){
//商机编号必须存在
try
{
pobj
.
currentStatus
=
"beforeConfirmation"
;
//商机状态为待用户确认
...
...
@@ -367,10 +357,10 @@ class SchemeCtl extends CtlBase {
}
//纳税人类型
if
(
pobj
.
baseInfo
.
psTaxpayerType
&&
pobj
.
baseInfo
.
psTaxpayerType
!=
'undefined'
){
pobj
.
baseInfo
.
tax
PayerType
=
pobj
.
baseInfo
.
psT
axpayerType
;
pobj
.
baseInfo
.
tax
payerType
=
pobj
.
baseInfo
.
t
axpayerType
;
}
if
(
pobj
.
baseInfo
.
cmpTaxPayerType
&&
pobj
.
baseInfo
.
cmpTaxPayerType
!=
'undefined'
){
pobj
.
baseInfo
.
tax
PayerType
=
pobj
.
baseInfo
.
cmpTaxP
ayerType
;
pobj
.
baseInfo
.
tax
payerType
=
pobj
.
baseInfo
.
taxp
ayerType
;
}
if
(
pobj
.
baseInfo
.
agentTaxpayerType
&&
pobj
.
baseInfo
.
agentTaxpayerType
!=
'undefined'
){
pobj
.
baseInfo
.
taxpayerType
=
pobj
.
baseInfo
.
agentTaxpayerType
;
...
...
@@ -383,8 +373,8 @@ class SchemeCtl extends CtlBase {
if
(
pobj
.
baseInfo
.
addressType
&&
pobj
.
baseInfo
.
addressType
!=
'undefined'
){
//地址类型
pobj
.
baseInfo
.
addressTypeName
=
appconfig
.
pdict
.
addressTypeDict
[
pobj
.
baseInfo
.
addressType
];
//地址类型名称
}
if
(
pobj
.
baseInfo
.
TaxPayerType
&&
pobj
.
baseInfo
.
TaxP
ayerType
!=
'undefined'
){
pobj
.
baseInfo
.
TaxPayerName
=
appconfig
.
pdict
.
TaxpayerTypeDict
[
pobj
.
baseInfo
.
TaxP
ayerType
];
//纳税人名称
if
(
pobj
.
baseInfo
.
taxpayerType
&&
pobj
.
baseInfo
.
taxp
ayerType
!=
'undefined'
){
pobj
.
baseInfo
.
taxpayerName
=
appconfig
.
pdict
.
TaxpayerTypeDict
[
pobj
.
baseInfo
.
taxp
ayerType
];
//纳税人名称
}
if
(
pobj
.
baseInfo
.
registeredType
&&
pobj
.
baseInfo
.
registeredType
!=
'undefined'
){
pobj
.
baseInfo
.
registeredName
=
appconfig
.
pdict
.
registeredTypeDict
[
pobj
.
baseInfo
.
registeredType
];
//云上园区名称
...
...
@@ -407,7 +397,7 @@ class SchemeCtl extends CtlBase {
}
//注册地区
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
baseInfo
.
serviceArea
!=
'undefined'
){
pobj
.
baseInfo
.
serviceAreaName
=
baseInfo
.
pdict
.
registeredAreaDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
}
}
else
if
(
pobj
.
businessType
==
"psCase"
){
...
...
@@ -416,7 +406,23 @@ class SchemeCtl extends CtlBase {
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredParkDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
}
}
else
{
//注册地区
if
(
pobj
.
baseInfo
.
serviceArea
&&
pobj
.
baseInfo
.
serviceArea
!=
'undefined'
){
pobj
.
baseInfo
.
serviceAreaName
=
appconfig
.
pdict
.
registeredAreaDict
[
pobj
.
baseInfo
.
serviceArea
];
//注册地区
}
}
//goumaisichang
if
(
pobj
.
baseInfo
.
buyDuration
&&
pobj
.
baseInfo
.
buyDuration
!=
'undefined'
){
pobj
.
baseInfo
.
buyDuration
=
appconfig
.
pdict
.
buyDurationDict
[
pobj
.
baseInfo
.
buyDuration
];
}
if
(
pobj
.
baseInfo
.
isRenew
){
pobj
.
baseInfo
.
isRenew
=
appconfig
.
pdict
.
isRenewDict
[
pobj
.
baseInfo
.
isRenew
];
}
else
{
pobj
.
baseInfo
.
isRenew
=
"不开启"
}
if
(
pobj
.
baseInfo
.
engagedIndustry
&&
pobj
.
baseInfo
.
engagedIndustry
!=
'undefined'
){
pobj
.
baseInfo
.
engagedIndName
=
appconfig
.
pdict
.
engagedIndustryDict
[
pobj
.
baseInfo
.
engagedIndustry
];
//从事行业名称
}
...
...
@@ -448,6 +454,8 @@ class SchemeCtl extends CtlBase {
}
var
rtn
=
await
rc
.
execPost
(
params
,
requrl
);
var
j
=
JSON
.
parse
(
rtn
.
stdout
);
console
.
log
(
"!!!!!!!!!!!!!!!!"
);
console
.
log
(
JSON
.
stringify
(
j
));
if
(
j
.
status
==
1
){
pobj
.
schemeNumber
=
j
.
data
;
pobj
.
businessType
=
btype
;
...
...
@@ -461,6 +469,7 @@ class SchemeCtl extends CtlBase {
}
catch
(
error
){
console
.
log
(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
);
console
.
log
(
error
);
return
system
.
getResultError
(
error
);
}
...
...
ic-deliver/app/base/db/impl/bizchance/deliverybillDao.js
View file @
3b7a4952
...
...
@@ -9,6 +9,12 @@ class DeliverybillDao extends Dao {
qc
.
raw
=
true
;
//检查查询的用户所属公司是否是平台运营公司-1,如果是则不添加公司查询条件, 不添加路径条件,返回所有数据
if
(
qobj
.
company_id
==
1
)
{
if
(
qobj
.
bizpath
&&
qobj
.
bizpath
!=
""
)
{
if
(
qobj
.
bizpath
.
indexOf
(
"pmxdeliverrequest"
)
>
0
)
{
//说明是从商机列表过来的
qw
[
"delivery_status"
]
=
"success"
;
qw
[
"settle_status"
]
=
"waittosettle"
;
}
}
return
qw
}
else
{
//需要添加公司查询条件
...
...
@@ -27,7 +33,6 @@ class DeliverybillDao extends Dao {
qw
[
"salesman_id"
]
=
qobj
.
userid
;
}
}
}
}
return
qw
;
...
...
@@ -52,7 +57,7 @@ class DeliverybillDao extends Dao {
/*根据交付单更新交付材料信息*/
async
UpdateInfoByDeliverCode
(
qobj
,
t
)
{
//公司注册、云上园区注册时填写交付材料
var
whereobj
=
{
"delivery_code"
:
qobj
.
deliverNumber
};
var
setobj
=
{
"delivery_info"
:
qobj
.
delivery
Info
};
var
setobj
=
{
"delivery_info"
:
qobj
.
base
Info
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
...
...
ic-deliver/app/base/db/impl/bizchance/materialDao.js
View file @
3b7a4952
...
...
@@ -28,7 +28,7 @@ class MaterialDao extends Dao {
setobj
.
position_info
=
qobj
.
positionInfo
;
}
if
(
qobj
.
managerInfo
&&
qobj
.
managerInfo
!=
'undefined'
){
setobj
.
position_info
=
setobj
.
position_i
nfo
;
setobj
.
position_info
=
qobj
.
managerI
nfo
;
}
if
(
qobj
.
regInfo
&&
qobj
.
regInfo
!=
'undefined'
){
setobj
.
file_info
=
qobj
.
regInfo
;
...
...
ic-deliver/app/base/db/impl/bizchance/schemeDao.js
View file @
3b7a4952
...
...
@@ -24,7 +24,7 @@ class SchemeDao extends Dao {
/*根据商机编号更新方案详情*/
async
updateInfoByDemandCode
(
qobj
,
t
){
var
whereobj
=
{
"demand_code"
:
qobj
.
businessMode
};
var
setobj
=
{
"scheme_info"
:
qobj
.
plan
Info
,
"scheme_status"
:
qobj
.
currentStatus
};
var
setobj
=
{
"scheme_info"
:
qobj
.
base
Info
,
"scheme_status"
:
qobj
.
currentStatus
};
return
await
this
.
updateByWhere
(
setobj
,
whereobj
,
t
);
}
...
...
ic-deliver/app/base/db/metadata/app/platform.js
View file @
3b7a4952
...
...
@@ -113,7 +113,7 @@ module.exports = {
},
"TaxpayerTypeDict"
:
{
//纳税人类型
"smallScaleTaxpayer"
:
"小规模纳税人"
,
"generalTaxpayer"
:
"一般纳税人
人
"
"generalTaxpayer"
:
"一般纳税人"
},
"companyNatureDict"
:
{
//公司类型
"limitedLiabilityCompany"
:
"有限责任公司"
,
...
...
@@ -159,6 +159,12 @@ module.exports = {
"company"
:
"公司"
,
"individual"
:
"个体户"
},
"buyDurationDict"
:
{
//购买时长
"buyDuration"
:
"1年"
,
},
"isRenewDict"
:
{
//是否自动续费
"isRenew"
:
"开启"
,
},
"dyDict"
:{
//产品对应关系
"/ic/gsreg/"
:
"companyCase"
,
"/ic/kzfw/"
:
"sealSevCase"
,
...
...
@@ -168,7 +174,7 @@ module.exports = {
"/ic/sksq/"
:
"taxControlCase"
,
"/ic/dljz/"
:
"agentCase"
,
"/ic/regaddr/"
:
"regAddrCase"
,
"/ic/gsn
j
/"
:
"icCheckCase"
,
"/ic/gsn
b
/"
:
"icCheckCase"
,
"/ic/gschangs/"
:
"icChangeCase"
,
"/ic/sbopen/"
:
"ssOpenCase"
},
...
...
@@ -181,7 +187,7 @@ module.exports = {
"taxControlCase"
:
"/ic/sksq/"
,
"agentCase"
:
"/ic/dljz/"
,
"regAddrCase"
:
"/ic/regaddr/"
,
"icCheckCase"
:
"/ic/gsn
j
/"
,
"icCheckCase"
:
"/ic/gsn
b
/"
,
"icChangeCase"
:
"/ic/gschangs/"
,
"ssOpenCase"
:
"/ic/sbopen/"
},
...
...
ic-deliver/app/base/db/models/delivery/delivery_bill.js
View file @
3b7a4952
...
...
@@ -50,6 +50,11 @@ module.exports = (db, DataTypes) => {
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
settle_status
:
{
// 服务单流转状态
allowNull
:
false
,
type
:
DataTypes
.
STRING
,
defaultValue
:
'waittosettle'
},
selling_price
:
{
//售价
allowNull
:
false
,
type
:
DataTypes
.
INTEGER
...
...
ic-deliver/app/base/db/models/delivery/settle_bill.js
0 → 100644
View file @
3b7a4952
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 交付单表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"settlebill"
,
{
code
:
{
//交付单编号
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
audit_status
:
{
// 审核状态
allowNull
:
false
,
type
:
DataTypes
.
STRING
,
defaultValue
:
'waittoaudit'
},
settle_amount
:
{
//结算金额
allowNull
:
true
,
type
:
DataTypes
.
INTEGER
},
isPayed
:{
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
}
},
{
paranoid
:
true
,
//真的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'fi_settlebill'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
ic-deliver/app/base/service/impl/bizchance/schemeSve.js
0 → 100644
View file @
3b7a4952
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
class
SchemeService
extends
ServiceBase
{
constructor
()
{
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
SchemeService
));
}
async
findById
(
qobj
){
//根据id获取方案信息
var
oid
=
qobj
.
id
;
return
await
this
.
dao
.
findById
(
oid
);
}
async
findInfoByDemandCode
(
qobj
){
//根据方案编号获取方案详情
return
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
}
async
updateStatusByDemandCode
(
qobj
){
//根据商机编号号更新方案状态及原因
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateStatusByDemandCode
(
qobj
,
t
);
});
}
async
updateInfoByDemandCode
(
qobj
){
//根据商机编号更新方案详情
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateInfoByDemandCode
(
qobj
,
t
);
});
}
async
updateSchemeNumberByDemandCode
(
qobj
){
//根据商机编号更新方案编号
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateSchemeNumberByDemandCode
(
qobj
,
t
);
});
}
async
insertInfo
(
qobj
){
//插入方案信息
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
}
}
module
.
exports
=
SchemeService
;
\ No newline at end of file
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