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
fbc9262c
Commit
fbc9262c
authored
Feb 11, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
policy
parent
0fa46c5b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
4 deletions
+42
-4
center-order/app/base/api/impl/action/policy.js
+2
-1
center-order/app/base/db/models/dbpolicy/policyneed.js
+2
-1
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
+1
-1
center-order/app/base/service/impl/dbpolicy/policyneedSve.js
+34
-0
center-order/表的更新
+3
-1
No files found.
center-order/app/base/api/impl/action/policy.js
View file @
fbc9262c
...
...
@@ -36,7 +36,8 @@ class PolicyAPI extends APIBase {
opResult
=
await
this
.
policyinfoSve
.
policyQuery
(
pobj
);
break
;
case
"submitPolicyNeed"
:
//政策申请提报
opResult
=
system
.
getResult
(
null
,
"接口开发中"
);
// opResult = system.getResult(null, "接口开发中");
opResult
=
this
.
policyneedSve
.
submitPolicyNeed
(
pobj
);
break
;
case
"getPolicyNeedList"
:
//获取政策申请列表
opResult
=
system
.
getResult
(
null
,
"接口开发中"
);
...
...
center-order/app/base/db/models/dbpolicy/policyneed.js
View file @
fbc9262c
...
...
@@ -14,7 +14,8 @@ module.exports = (db, DataTypes) => {
applyDate
:
DataTypes
.
DATE
,
// 申请日期
opNotes
:
DataTypes
.
TEXT
(
'long'
),
// 备注
createUserId
:
DataTypes
.
INTEGER
,
// 创建用户id
popularizeUserId
:
DataTypes
.
INTEGER
,
// 推广人id,即业务员id
popularizeUserId
:
DataTypes
.
INTEGER
,
// 推广人id,即业务员id
popularizeUserCode
:
DataTypes
.
STRING
(
64
),
// 推广人帐号
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
...
...
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
View file @
fbc9262c
...
...
@@ -10,7 +10,7 @@ class PolicyinfoService extends ServiceBase {
var
obj
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
var
paramObj
=
{
uapp_id
:
app
.
uapp_id
};
var
attributes
=
[
"policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyContent"
,
"policyCity"
,
"policyProvince"
,
var
attributes
=
[
"
id"
,
"
policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyContent"
,
"policyCity"
,
"policyProvince"
,
"policyLinkUrl"
,
"policySource"
,
"policyName"
,
"policyNo"
];
if
(
obj
){
if
(
obj
.
policyProvince
){
...
...
center-order/app/base/service/impl/dbpolicy/policyneedSve.js
View file @
fbc9262c
...
...
@@ -3,6 +3,40 @@ const ServiceBase = require("../../sve.base");
class
PolicyneedService
extends
ServiceBase
{
constructor
()
{
super
(
"dbpolicy"
,
ServiceBase
.
getDaoName
(
PolicyneedService
));
this
.
policyinfoDao
=
system
.
getObject
(
"db.dbpolicy.policyinfoDao"
);
}
//提交政策需求
async
submitPolicyNeed
(
pobj
){
var
user
=
pobj
.
userInfo
;
var
app
=
pobj
.
appInfo
;
var
obj
=
pobj
.
actionBody
;
var
paramObj
=
{
uapp_id
:
app
.
uapp_id
};
if
(
!
obj
.
contacts
){
return
system
.
getResult
(
null
,
"联系人不能为空"
);
}
if
(
!
obj
.
mobile
){
return
system
.
getResult
(
null
,
"联系电话不能为空"
);
}
if
(
obj
.
policy_id
){
var
policyinfo
=
await
this
.
policyinfoDao
.
model
.
findOne
({
where
:{
id
:
obj
.
policy_id
},
raw
:
true
});
if
(
policyinfo
&&
policyinfo
.
id
){
paramObj
[
"policySnapshot"
]
=
JSON
.
stringify
(
policyinfo
);
paramObj
[
"policy_id"
]
=
obj
.
policy_id
;
}
}
paramObj
[
"contacts"
]
=
obj
.
contacts
;
paramObj
[
"mobile"
]
=
obj
.
mobile
;
paramObj
[
"company"
]
=
obj
.
company
;
paramObj
[
"industry"
]
=
obj
.
industry
;
paramObj
[
"region"
]
=
obj
.
region
;
paramObj
[
"applyDate"
]
=
new
Date
();
if
(
obj
.
popularizeUserCode
){
paramObj
[
"popularizeUserCode"
]
=
obj
.
popularizeUserCode
;
}
var
policyNeed
=
await
this
.
dao
.
create
(
paramObj
);
return
system
.
getResultSuccess
();
}
}
module
.
exports
=
PolicyneedService
;
center-order/表的更新
View file @
fbc9262c
示例:--
--------------------------------开始--------------------------------------------------------------------
示例:--
--------------------------------开始--------------------------------------------------------------------
...
...
@@ -53,5 +53,6 @@ CREATE TABLE `b_policy_need` (
`version` int(11) NOT NULL DEFAULT 0,
`createUserId` int(11) NULL DEFAULT NULL COMMENT '创建用户id',
`popularizeUserId` int(11) NULL DEFAULT NULL COMMENT '推广人id,即业务员id',
`popularizeUserCode` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '推广人帐号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
\ 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