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
e47c3eb3
Commit
e47c3eb3
authored
Feb 10, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-order' of gitlab.gongsibao.com:jiangyong/zhichan into center-order
parents
b063d9e5
859c4dce
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
249 additions
and
3 deletions
+249
-3
center-order/app/base/api/api.base.js
+2
-2
center-order/app/base/api/impl/action/policy.js
+56
-0
center-order/app/base/db/impl/dbpolicy/policyinfoDao.js
+8
-0
center-order/app/base/db/impl/dbpolicy/policyneedDao.js
+8
-0
center-order/app/base/db/metadata/apps/platform.js
+2
-0
center-order/app/base/db/models/dbpolicy/policyinfo.js
+41
-0
center-order/app/base/db/models/dbpolicy/policyneed.js
+34
-0
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
+44
-0
center-order/app/base/service/impl/dbpolicy/policyneedSve.js
+8
-0
center-order/表的更新
+46
-1
No files found.
center-order/app/base/api/api.base.js
View file @
e47c3eb3
const
system
=
require
(
"../system"
);
const
settings
=
require
(
"../../config/settings"
);
const
DocBase
=
require
(
"./doc.base"
);
//
const DocBase = require("./doc.base");
const
uuidv4
=
require
(
'uuid/v4'
);
const
md5
=
require
(
"MD5"
);
class
APIBase
{
...
...
@@ -22,7 +22,7 @@ class APIBase {
async
doexec
(
gname
,
methodname
,
pobj
,
query
,
req
)
{
req
.
requestId
=
this
.
getUUID
();
try
{
//
//
验证accesskey或验签
//验证accesskey或验签
var
isPassResult
=
await
this
.
checkAcck
(
gname
,
methodname
,
pobj
,
query
,
req
);
if
(
isPassResult
.
status
!=
0
)
{
isPassResult
.
requestId
=
""
;
...
...
center-order/app/base/api/impl/action/policy.js
0 → 100644
View file @
e47c3eb3
var
APIBase
=
require
(
"../../api.base"
);
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
class
PolicyAPI
extends
APIBase
{
constructor
()
{
super
();
// this.utilsProductSve = system.getObject("service.utilsSve.utilsProductSve");
this
.
policyinfoSve
=
system
.
getObject
(
"service.dbpolicy.policyinfoSve"
);
this
.
policyneedSve
=
system
.
getObject
(
"service.dbpolicy.policyneedSve"
);
}
/**
* 接口跳转-POST请求
* action_process 执行的流程
* action_type 执行的类型
* action_body 执行的参数
*/
async
springBoard
(
pobj
,
qobj
,
req
)
{
// if (!pobj.userInfo) {
// return system.getResult(system.noLogin, "user no login!");
// }
if
(
!
pobj
.
actionType
)
{
return
system
.
getResult
(
null
,
"actionType参数不能为空"
);
}
if
(
pobj
.
actionType
==
'getPolicyNeedList'
||
pobj
.
actionType
==
'submitPolicyNeedNotes'
){
if
(
!
pobj
.
userInfo
)
{
return
system
.
getResult
(
system
.
noLogin
,
"user no login!"
);
}
}
var
result
=
await
this
.
opActionProcess
(
pobj
,
pobj
.
actionType
,
req
);
return
result
;
}
async
opActionProcess
(
pobj
,
action_type
,
req
)
{
var
opResult
=
null
;
switch
(
action_type
)
{
case
"policyQuery"
:
//政策检索
opResult
=
await
this
.
policyinfoSve
.
policyQuery
(
pobj
);
break
;
case
"submitPolicyNeed"
:
//政策申请提报
opResult
=
system
.
getResult
(
null
,
"接口开发中"
);
break
;
case
"getPolicyNeedList"
:
//获取政策申请列表
opResult
=
system
.
getResult
(
null
,
"接口开发中"
);
break
;
case
"submitPolicyNeedNotes"
:
//申请信息备注提交
opResult
=
system
.
getResult
(
null
,
"接口开发中"
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
}
return
opResult
;
}
}
module
.
exports
=
PolicyAPI
;
\ No newline at end of file
center-order/app/base/db/impl/dbpolicy/policyinfoDao.js
0 → 100644
View file @
e47c3eb3
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
PolicyinfoDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
PolicyinfoDao
));
}
}
module
.
exports
=
PolicyinfoDao
;
center-order/app/base/db/impl/dbpolicy/policyneedDao.js
0 → 100644
View file @
e47c3eb3
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
PolicyneedDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
PolicyneedDao
));
}
}
module
.
exports
=
PolicyneedDao
;
center-order/app/base/db/metadata/apps/platform.js
View file @
e47c3eb3
...
...
@@ -69,6 +69,7 @@ module.exports = {
//凭单类型
"direction_type"
:
{
"sr"
:
"收"
,
"zc"
:
"支"
},
"push_return_type"
:
{
"0"
:
"推送失败"
,
"1"
:
"推送成功"
},
"policy_type"
:{
'zh'
:
'综合'
,
'fzbt'
:
'房租补贴'
,
'jrdk'
:
'金融贷款'
,
'zdfc'
:
'重点扶持'
,
'ssjm'
:
'税收减免'
},
},
}
}
\ No newline at end of file
center-order/app/base/db/models/dbpolicy/policyinfo.js
0 → 100644
View file @
e47c3eb3
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"policyinfo"
,
{
uapp_id
:
DataTypes
.
INTEGER
,
//
policyNo
:
DataTypes
.
STRING
(
64
),
// 政策编号
policyName
:
DataTypes
.
STRING
(
255
),
// 政策名称
policySource
:
DataTypes
.
STRING
(
255
),
// 政策出处
policyLinkUrl
:
DataTypes
.
STRING
(
255
),
// 政策链接
policyProvince
:
DataTypes
.
STRING
(
100
),
// 所属省份
policyCity
:
DataTypes
.
STRING
(
100
),
// 所属城市
policyContent
:
DataTypes
.
TEXT
(
'long'
),
// 政策内容
policyDate
:
DataTypes
.
DATE
,
// 政策日期
policyTypeName
:
DataTypes
.
STRING
(
100
),
//
policyType
:{
type
:
DataTypes
.
ENUM
,
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
policy_type
),
set
:
function
(
val
)
{
this
.
setDataValue
(
"policyType"
,
val
);
this
.
setDataValue
(
"policyTypeName"
,
uiconfig
.
config
.
pdict
.
policy_type
[
val
]);
}
},
//政策类型 'zh':'综合','fzbt':'房租补贴','jrdk':'金融贷款','zdfc':'重点扶持','ssjm':'税收减免',
opNotes
:
DataTypes
.
STRING
,
// 备注
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
timestamps
:
true
,
updatedAt
:
false
,
//freezeTableName: true,
// define the table's name
tableName
:
'b_policy_info'
,
validate
:
{
},
indexes
:
[
]
});
}
center-order/app/base/db/models/dbpolicy/policyneed.js
0 → 100644
View file @
e47c3eb3
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"policyneed"
,
{
uapp_id
:
DataTypes
.
INTEGER
,
//
contacts
:
DataTypes
.
STRING
(
64
),
// 联系人
company
:
DataTypes
.
STRING
(
255
),
// 公司名称
industry
:
DataTypes
.
STRING
(
100
),
// 行业名称
region
:
DataTypes
.
STRING
(
100
),
// 地区
mobile
:
DataTypes
.
STRING
(
100
),
// 联系电话
policy_id
:
DataTypes
.
INTEGER
,
// 政策id
policySnapshot
:
DataTypes
.
TEXT
(
'long'
),
// 政策快照
applyDate
:
DataTypes
.
DATE
,
// 申请日期
opNotes
:
DataTypes
.
TEXT
(
'long'
),
// 备注
createUserId
:
DataTypes
.
INTEGER
,
// 创建用户id
popularizeUserId
:
DataTypes
.
INTEGER
,
// 推广人id,即业务员id
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
timestamps
:
true
,
updatedAt
:
false
,
//freezeTableName: true,
// define the table's name
tableName
:
'b_policy_need'
,
validate
:
{
},
indexes
:
[
]
});
}
center-order/app/base/service/impl/dbpolicy/policyinfoSve.js
0 → 100644
View file @
e47c3eb3
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
class
PolicyinfoService
extends
ServiceBase
{
constructor
()
{
super
(
"dbpolicy"
,
ServiceBase
.
getDaoName
(
PolicyinfoService
));
}
//政策检索
async
policyQuery
(
pobj
){
var
obj
=
pobj
.
actionBody
;
var
app
=
pobj
.
appInfo
;
var
paramObj
=
{
uapp_id
:
app
.
uapp_id
};
var
attributes
=
[
"policyType"
,
"policyTypeName"
,
"policyDate"
,
"policyContent"
,
"policyCity"
,
"policyProvince"
,
"policyLinkUrl"
,
"policySource"
,
"policyName"
,
"policyNo"
];
if
(
obj
){
if
(
obj
.
policyProvince
){
paramObj
[
"policyProvince"
]
=
obj
.
policyProvince
;
if
(
obj
.
policyCity
){
paramObj
[
"policyCity"
]
=
obj
.
policyCity
;
}
}
if
(
obj
.
policyName
){
paramObj
[
"policyName"
]
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
obj
.
policyName
+
"%"
};
}
console
.
log
(
paramObj
);
}
var
result
=
{};
//"policy_type":{'zh':'综合','fzbt':'房租补贴','jrdk':'金融贷款','zdfc':'重点扶持','ssjm':'税收减免'},
result
[
"zh"
]
=
await
this
.
findByParams
(
"zh"
,
paramObj
,
attributes
);
result
[
"fzbt"
]
=
await
this
.
findByParams
(
"fzbt"
,
paramObj
,
attributes
);
result
[
"jrdk"
]
=
await
this
.
findByParams
(
"jrdk"
,
paramObj
,
attributes
);
result
[
"zdfc"
]
=
await
this
.
findByParams
(
"zdfc"
,
paramObj
,
attributes
);
result
[
"ssjm"
]
=
await
this
.
findByParams
(
"ssjm"
,
paramObj
,
attributes
);
return
system
.
getResultSuccess
(
result
);
}
async
findByParams
(
type
,
paramObj
,
attributes
){
paramObj
.
policyType
=
type
;
return
await
this
.
dao
.
model
.
findAll
({
where
:
paramObj
,
raw
:
true
,
attributes
:
attributes
});
}
}
module
.
exports
=
PolicyinfoService
;
center-order/app/base/service/impl/dbpolicy/policyneedSve.js
0 → 100644
View file @
e47c3eb3
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
class
PolicyneedService
extends
ServiceBase
{
constructor
()
{
super
(
"dbpolicy"
,
ServiceBase
.
getDaoName
(
PolicyneedService
));
}
}
module
.
exports
=
PolicyneedService
;
center-order/表的更新
View file @
e47c3eb3
示例:--
--------------------------------开始--------------------------------------------------------------------
示例:--
--------------------------------开始--------------------------------------------------------------------
...
...
@@ -11,3 +11,47 @@ ALTER TABLE b_order ADD COLUMN needNoOrderNo VARCHAR(64) DEFAULT NULL COMMENT '
ALTER TABLE b_order_tm_product ADD COLUMN needNoOrderNo VARCHAR(64) DEFAULT NULL COMMENT '需求订单号';
ALTER TABLE b_order_tm_product modify COLUMN deliveryStatus ENUM('dqrfa','fabtg','dfwsfw','dsccl','dsh','ddj','ydj','ywc') DEFAULT 'dfwsfw';
2020-02-10 zhuangbing
DROP TABLE IF EXISTS `b_policy_info`;
CREATE TABLE `b_policy_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uapp_id` int(11) NULL DEFAULT NULL,
`policyNo` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '政策编号',
`policyName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '政策名称',
`policyType` enum('zh','fzbt','jrdk','zdfc','ssjm') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'zh' COMMENT '政策类型 \'zh\':\'综合\',\'fzbt\':\'房租补贴\',\'jrdk\':\'金融贷款\',\'zdfc\':\'重点扶持\',\'ssjm\':\'税收减免\'',
`policyTypeName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '政策类型名称',
`policySource` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '政策出处',
`policyLinkUrl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '政策链接',
`policyDate` datetime(0) NULL DEFAULT NULL COMMENT '政策日期',
`policyProvince` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属省份',
`policyCity` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属城市',
`policyContent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '政策内容',
`opNotes` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作备注',
`created_at` datetime(0) NOT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`version` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `b_policy_need`;
CREATE TABLE `b_policy_need` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uapp_id` int(11) NULL DEFAULT NULL,
`contacts` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
`company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公司名称',
`industry` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '行业名称',
`region` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区',
`mobile` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
`policy_id` int(11) NULL DEFAULT NULL COMMENT '政策id',
`policySnapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '政策快照',
`applyDate` datetime(0) NULL DEFAULT NULL COMMENT '申请日期',
`opNotes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作备注',
`created_at` datetime(0) NOT NULL,
`updated_at` datetime(0) NULL DEFAULT NULL,
`deleted_at` datetime(0) NULL DEFAULT NULL,
`version` int(11) NOT NULL DEFAULT 0,
`createUserId` int(11) NULL DEFAULT NULL COMMENT '创建用户id',
`popularizeUserId` int(11) NULL DEFAULT NULL COMMENT '推广人id,即业务员id',
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