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
95f60733
Commit
95f60733
authored
Feb 16, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order
parents
22b467de
3e2ea648
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
166 additions
and
8 deletions
+166
-8
center-order/app/base/api/impl/action/zcbusinesschanceApi.js
+45
-0
center-order/app/base/db/impl/dbneed/needinfoDao.js
+16
-0
center-order/app/base/db/metadata/apps/platform.js
+2
-1
center-order/app/base/db/models/dbneed/needinfo.js
+49
-0
center-order/app/base/service/impl/dbneed/needinfoSve.js
+44
-0
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
+10
-7
No files found.
center-order/app/base/api/impl/action/zcbusinesschanceApi.js
0 → 100644
View file @
95f60733
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
PaymentAPI
extends
APIBase
{
constructor
()
{
super
();
this
.
needinfoSve
=
system
.
getObject
(
"service.dbneed.needinfoSve"
);
}
/**
* 接口跳转-POST请求
* actionProcess 执行的流程
* actionType 执行的类型
* actionBody 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
if
(
!
pobj
.
actionProcess
)
{
return
system
.
getResult
(
null
,
"actionProcess参数不能为空"
);
}
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
pobj
.
actionBody
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
action_body
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
// sy
case
"needinfo2fq"
:
//pc端订单支付二维码生成
opResult
=
await
this
.
needinfoSve
.
needinfo2fq
(
pobj
);
break
;
// case "flowinfo"://pc端订单支付二维码生成
// opResult = await this.needinfoSve.flowinfo(needinfo);
// break;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
PaymentAPI
;
\ No newline at end of file
center-order/app/base/db/impl/dbneed/needinfoDao.js
0 → 100644
View file @
95f60733
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
NeedinfoDao
extends
Dao
{
constructor
(){
super
(
Dao
.
getModelName
(
NeedinfoDao
));
}
extraWhere
(
obj
,
w
){
if
(
obj
.
codepath
&&
obj
.
codepath
!=
""
){
if
(
obj
.
codepath
.
indexOf
(
"calculateprice"
)
>
0
){
w
[
"user_id"
]
=
obj
.
uid
;
}
}
return
w
;
}
}
module
.
exports
=
NeedinfoDao
;
center-order/app/base/db/metadata/apps/platform.js
View file @
95f60733
...
@@ -69,7 +69,8 @@ module.exports = {
...
@@ -69,7 +69,8 @@ module.exports = {
//凭单类型
//凭单类型
"direction_type"
:
{
"sr"
:
"收"
,
"zc"
:
"支"
},
"direction_type"
:
{
"sr"
:
"收"
,
"zc"
:
"支"
},
"push_return_type"
:
{
"0"
:
"推送失败"
,
"1"
:
"推送成功"
},
"push_return_type"
:
{
"0"
:
"推送失败"
,
"1"
:
"推送成功"
},
"policy_type"
:{
'fzbt'
:
'租金减免'
,
'jrdk'
:
'金融贷款'
,
'zdfc'
:
'扶持措施'
,
'ssjm'
:
'税收优惠'
,
'rlzy'
:
'人力资源'
},
"push_chance_type"
:
{
"wts"
:
"未推送"
,
"yts"
:
"已推送"
,
"ygj"
:
"已跟进"
,
"ycd"
:
"已成单"
},
"policy_type"
:{
'fzbt'
:
'租金减免'
,
'jrdk'
:
'金融贷款'
,
'zdfc'
:
'行政措施'
,
'ssjm'
:
'税收优惠'
,
'rlzy'
:
'人力资源'
},
"customer_intention"
:{
"dgj"
:
"待跟进"
,
"yyx"
:
"有意向"
,
"wyx"
:
"无意向"
},
"customer_intention"
:{
"dgj"
:
"待跟进"
,
"yyx"
:
"有意向"
,
"wyx"
:
"无意向"
},
},
},
}
}
...
...
center-order/app/base/db/models/dbneed/needinfo.js
0 → 100644
View file @
95f60733
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"needinfo"
,
{
uapp_id
:
DataTypes
.
INTEGER
,
needNo
:
DataTypes
.
STRING
,
channelUserId
:
DataTypes
.
INTEGER
,
//发布者id
publisherName
:
DataTypes
.
STRING
,
//发布者姓名
publisherOnlyCode
:
DataTypes
.
STRING
(
50
),
//发布者唯一码
publishContent
:
DataTypes
.
STRING
,
//发布内容
publishMobile
:
DataTypes
.
STRING
,
//发布者手机号
followManUserId
:
DataTypes
.
INTEGER
,
//跟进人id
followManName
:
DataTypes
.
STRING
,
//跟进人姓名
followManMobile
:
DataTypes
.
STRING
,
//跟进人手机号(合伙人)
followManOnlyCode
:
DataTypes
.
STRING
(
50
),
//跟进者唯一码
followContent
:
DataTypes
.
STRING
,
//跟进内容
chanceType_code
:
DataTypes
.
STRING
,
// 商机类型
productOneType_id
:
DataTypes
.
STRING
,
//产品大类Id
productType_id
:
DataTypes
.
STRING
,
//产品类型Id
notes
:
DataTypes
.
STRING
,
//备注
disposeNotes
:
DataTypes
.
STRING
,
//处理的备注
status
:{
//wts未推送,yts已推送,ygj已跟进,ycd已成单
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
push_chance_type
),
set
:
function
(
val
){
this
.
setDataValue
(
"chanceType"
,
val
);
this
.
setDataValue
(
"chanceTypeName"
,
uiconfig
.
config
.
pdict
.
push_chance_type
[
val
]);
}
},
city
:
DataTypes
.
STRING
(
50
),
// 城市
province
:
DataTypes
.
STRING
(
50
),
// 省份
},{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'n_need_info'
,
validate
:
{
},
indexes
:[
]
});
}
center-order/app/base/service/impl/dbneed/needinfoSve.js
0 → 100644
View file @
95f60733
const
uuidv4
=
require
(
'uuid/v4'
);
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
NeedinfoService
extends
ServiceBase
{
constructor
()
{
super
(
"dbneed"
,
ServiceBase
.
getDaoName
(
NeedinfoService
));
this
.
execlient
=
system
.
getObject
(
"util.execClient"
);
}
async
needinfo2fq
(
pobj
)
{
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
,
"idempotentSource"
:
needinfo
.
chanceType_code
,
"idempotentSourceName"
:
pobj
.
appInfo
.
app_name
+
"_"
+
pobj
.
actionBody
.
chanceTypeName
,
"phone"
:
needinfo
.
publishMobile
,
"remark"
:
needinfo
.
notes
,
"customerName"
:
needinfo
.
publishName
};
var
rc
=
system
.
getObject
(
"util.aliyunClient"
);
var
rtn
=
await
rc
.
post
(
"https://yunfuapi-dev.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");
// opResult = JSON.parse(opResultstr.stdout)
// if (opResultstr) {
// return system.getResultSuccess();
// }
}
async
flowinfo
(
obj
)
{
}
}
module
.
exports
=
NeedinfoService
;
var
a
=
new
NeedinfoService
();
a
.
needinfo2fq
();
\ No newline at end of file
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
View file @
95f60733
...
@@ -12,7 +12,7 @@ class PolicyinfoService extends ServiceBase {
...
@@ -12,7 +12,7 @@ class PolicyinfoService extends ServiceBase {
var
obj
=
pobj
.
actionBody
;
var
obj
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
var
app
=
pobj
.
appInfo
;
var
paramObj
=
{
uapp_id
:
app
.
uapp_id
};
var
paramObj
=
{
uapp_id
:
app
.
uapp_id
};
var
attributes
=
[
"id"
,
"policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyC
ontent"
,
"policyC
ity"
,
"policyProvince"
,
var
attributes
=
[
"id"
,
"policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyCity"
,
"policyProvince"
,
"policyLinkUrl"
,
"policySource"
,
"policyName"
,
"policyNo"
];
"policyLinkUrl"
,
"policySource"
,
"policyName"
,
"policyNo"
];
if
(
obj
){
if
(
obj
){
if
(
obj
.
policyProvince
){
if
(
obj
.
policyProvince
){
...
@@ -22,7 +22,10 @@ class PolicyinfoService extends ServiceBase {
...
@@ -22,7 +22,10 @@ class PolicyinfoService extends ServiceBase {
}
}
}
}
if
(
obj
.
policyName
){
if
(
obj
.
policyName
){
paramObj
[
"policyName"
]
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
};
paramObj
[
this
.
db
.
Op
.
or
]
=
[
{
policyName
:{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
}},
{
policyContent
:{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
}}
];
}
}
console
.
log
(
paramObj
);
console
.
log
(
paramObj
);
}
}
...
@@ -44,7 +47,7 @@ class PolicyinfoService extends ServiceBase {
...
@@ -44,7 +47,7 @@ class PolicyinfoService extends ServiceBase {
}
}
async
addPolicyByExcel
(){
async
addPolicyByExcel
(){
var
workbook
=
xl
.
readFile
(
"policy
.xlsx
"
)
var
workbook
=
xl
.
readFile
(
"policy
4.xls
"
)
const
sheetNames
=
workbook
.
SheetNames
;
// 返回 ['sheet1', 'sheet2']
const
sheetNames
=
workbook
.
SheetNames
;
// 返回 ['sheet1', 'sheet2']
const
worksheet
=
workbook
.
Sheets
[
sheetNames
[
0
]];
const
worksheet
=
workbook
.
Sheets
[
sheetNames
[
0
]];
var
dataa
=
xl
.
utils
.
sheet_to_json
(
worksheet
);
var
dataa
=
xl
.
utils
.
sheet_to_json
(
worksheet
);
...
@@ -58,9 +61,9 @@ class PolicyinfoService extends ServiceBase {
...
@@ -58,9 +61,9 @@ class PolicyinfoService extends ServiceBase {
uapp_id
:
26
,
policyNo
:
data
[
'政策编号'
],
policyName
:
data
[
'政策名称'
],
uapp_id
:
26
,
policyNo
:
data
[
'政策编号'
],
policyName
:
data
[
'政策名称'
],
policySource
:
data
[
'政策出处'
],
policyLinkUrl
:
data
[
'政策链接'
],
policySource
:
data
[
'政策出处'
],
policyLinkUrl
:
data
[
'政策链接'
],
policyProvince
:
data
[
'所属省份'
],
policyCity
:
data
[
'所属城市'
],
policyProvince
:
data
[
'所属省份'
],
policyCity
:
data
[
'所属城市'
],
policyTypeName
:
data
[
'政策类型'
]};
policyTypeName
:
data
[
'政策类型'
]
,
policyContent
:
data
[
'内容'
]
};
if
(
data
[
'政策类型'
]){
if
(
data
[
'政策类型'
]){
var
policy_type
=
{
'租金减免'
:
'fzbt'
,
'金融贷款'
:
'jrdk'
,
'
扶持
措施'
:
'zdfc'
,
'税收优惠'
:
'ssjm'
,
'人力资源'
:
'rlzy'
};
var
policy_type
=
{
'租金减免'
:
'fzbt'
,
'金融贷款'
:
'jrdk'
,
'
行政
措施'
:
'zdfc'
,
'税收优惠'
:
'ssjm'
,
'人力资源'
:
'rlzy'
};
var
typename
=
data
[
'政策类型'
];
var
typename
=
data
[
'政策类型'
];
if
(
policy_type
[
typename
]){
if
(
policy_type
[
typename
]){
pobj
[
"policyType"
]
=
policy_type
[
typename
];
pobj
[
"policyType"
]
=
policy_type
[
typename
];
...
@@ -68,11 +71,11 @@ class PolicyinfoService extends ServiceBase {
...
@@ -68,11 +71,11 @@ class PolicyinfoService extends ServiceBase {
}
}
if
(
pobj
.
policyNo
){
if
(
pobj
.
policyNo
){
var
a
=
await
that
.
dao
.
create
(
pobj
,
t
);
var
a
=
await
that
.
dao
.
create
(
pobj
,
t
);
arr
.
push
(
a
);
arr
.
push
(
pobj
);
}
}
}
}
})
})
console
.
log
(
arr
[
0
],
"###################################"
);
console
.
log
(
arr
.
length
,
"###################################"
);
console
.
log
(
arr
.
length
,
"###################################"
);
}
}
}
}
...
...
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