Commit b6b32be9 by chenjinjing

no message

parent ae126d6f
...@@ -30,7 +30,7 @@ export const TablesConfig = [ ...@@ -30,7 +30,7 @@ export const TablesConfig = [
loginId:{type:Sequelize.STRING(100), allowNull:false}, //登录账号 loginId:{type:Sequelize.STRING(100), allowNull:false}, //登录账号
pwd:{type:Sequelize.STRING(100), allowNull:false}, //密码 pwd:{type:Sequelize.STRING(100), allowNull:false}, //密码
token:{type:Sequelize.STRING(100), allowNull:false}, token:{type:Sequelize.STRING(100), allowNull:false},
tokenMs:{type:Sequelize.DATE, allowNull:false} tokenMs:{type:Sequelize.DATE, allowNull:false, defaultValue:Sequelize.NOW}
}, },
association: [] association: []
}, },
...@@ -44,30 +44,30 @@ export const TablesConfig = [ ...@@ -44,30 +44,30 @@ export const TablesConfig = [
primaryKey:true, //表示主键 primaryKey:true, //表示主键
unique:true //表示该列的值必须唯一 unique:true //表示该列的值必须唯一
}, },
etId: {type:Sequelize.INTEGER, allowNull:false, defaultValue:1}, //名册录入类型 1:正式党员、2:入党积极分子、3:预备党员' etId: {type:Sequelize.INTEGER, allowNull:false, defaultValue:1}, //名册录入类型 1:正式党员、2:入党积极分子、3:预备党员
name: {type:Sequelize.STRING(100), allowNull:false}, //姓名 name: {type:Sequelize.STRING(100), allowNull:false}, //姓名
sex: {type:Sequelize.INTEGER, allowNull:false, defaultValue:1}, //性别 1:男、2:女 sex: {type:Sequelize.INTEGER, allowNull:false, defaultValue:1}, //性别 1:男、2:女
birthDate: {type:Sequelize.DATE, allowNull:false}, //出生年月 birthDate: {type:Sequelize.DATE, allowNull:false}, //出生年月
phone: {type:Sequelize.STRING(11), allowNull:false}, //手机号码 phone: {type:Sequelize.STRING(11), allowNull:false}, //手机号码
levelOfEducation: {type:Sequelize.INTEGER, allowNull:false}, //文化程度 levelOfEducation: {type:Sequelize.INTEGER, allowNull:false}, //文化程度
bId: {type:Sequelize.INTEGER(20), allowNull:false}, //支部表id 外键 bId: {type:Sequelize.INTEGER(20), allowNull:false}, //支部表id 外键
partyJoiningTime: {type:Sequelize.DATE, allowNull:false}, //入党时间 --正式党员录入 partyJoiningTime: {type:Sequelize.DATE, allowNull:true}, //入党时间 --正式党员录入
administrativePositionName: {type:Sequelize.INTEGER, allowNull:false, defaultValue:1}, //行政职务id 枚举 默认1:普通职员 administrativePositionName: {type:Sequelize.INTEGER, allowNull:true, defaultValue:1}, //行政职务id 枚举 默认1:普通职员
partyPositionsName: {type:Sequelize.STRING(100), allowNull:false, defaultValue:'[]'}, //党内职务id 枚举 --正式党员录入 [1,2] --多选 partyPositionsName: {type:Sequelize.STRING(100), allowNull:true, defaultValue:'[]'}, //党内职务id 枚举 --正式党员录入 [1,2] --多选
departmentName: {type:Sequelize.STRING(100), allowNull:false, defaultValue:'[]'}, //所属科室表id 枚举 [1,2] --多选 departmentName: {type:Sequelize.STRING(100), allowNull:true, defaultValue:'[]'}, //所属科室表id 枚举 [1,2] --多选
askForTime: {type:Sequelize.DATE, allowNull:false}, //申请入党时间 --入党积极分子录入、入党申请录入 askForTime: {type:Sequelize.DATE, allowNull:true}, //申请入党时间 --入党积极分子录入、入党申请录入
listedAsActivistsTime: {type:Sequelize.DATE, allowNull:false}, //列为积极分子时间 --入党积极分子录入 listedAsActivistsTime: {type:Sequelize.DATE, allowNull:true}, //列为积极分子时间 --入党积极分子录入
liaison: {type:Sequelize.STRING(100), allowNull:false, defaultValue:'[]'}, //联系人 --入党积极分子录入 "" --多选 liaison: {type:Sequelize.STRING(100), allowNull:true, defaultValue:'[]'}, //联系人 --入党积极分子录入 "" --多选
talkTime: {type:Sequelize.DATE, allowNull:false}, //谈话时间 --入党申请录入 talkTime: {type:Sequelize.DATE, allowNull:true}, //谈话时间 --入党申请录入
partyState: {type:Sequelize.INTEGER, allowNull:false, defaultValue:1}, //党员状态 1:在党、2:退党 partyState: {type:Sequelize.INTEGER, allowNull:true, defaultValue:1}, //党员状态 1:在党、2:退党
isAdmin: {type:Sequelize.BOOLEAN, allowNull:false, defaultValue:false}, //是否为管理员 isAdmin: {type:Sequelize.BOOLEAN, allowNull:true, defaultValue:false}, //是否为管理员
/**小程序登录 */ /**小程序登录 */
loginId: {type:Sequelize.STRING(11),allowNull:false}, //登录账号 默认手机号 loginId: {type:Sequelize.STRING(11),allowNull:false}, //登录账号 默认手机号
pwd:{type:Sequelize.STRING(100), allowNull:false}, //密码 默认手机号后6位 pwd:{type:Sequelize.STRING(100), allowNull:false}, //密码 默认手机号后6位
token:{type:Sequelize.STRING(100), allowNull:false}, token:{type:Sequelize.STRING(100), allowNull:false},
tokenMs:{ type:Sequelize.DATE, allowNull:false }, tokenMs:{ type:Sequelize.DATE, allowNull:false },
adminToken:{type:Sequelize.STRING(100), allowNull:false}, adminToken:{type:Sequelize.STRING(100), allowNull:false},
adminTokenMs:{ type:Sequelize.DATE, allowNull:false }, adminTokenMs:{ type:Sequelize.DATE, allowNull:false, defaultValue:Sequelize.NOW },
}, },
association: [ association: [
{type: "hasOne", check: "branch"}, {type: "hasOne", check: "branch"},
...@@ -289,8 +289,8 @@ export const TablesConfig = [ ...@@ -289,8 +289,8 @@ export const TablesConfig = [
unique:true //表示该列的值必须唯一 unique:true //表示该列的值必须唯一
}, },
bId: {type:Sequelize.STRING(100), allowNull:false, defaultValue:''}, //支部表id 外键 [1,2] --多选 bId: {type:Sequelize.STRING(100), allowNull:false, defaultValue:''}, //支部表id 外键 [1,2] --多选
primaryIndicators: {type:Sequelize.INTEGER, allowNull:false}, //一级指标 primaryIndicators: {type:Sequelize.INTEGER, allowNull:false}, //一级指标 枚举
secondaryIndicators: {type:Sequelize.INTEGER, allowNull:false}, //二级指标 secondaryIndicators: {type:Sequelize.INTEGER, allowNull:false}, //二级指标 枚举
thirdLevelScore: {type:Sequelize.INTEGER, allowNull:false, defaultValue:0}, //三级指标分值 thirdLevelScore: {type:Sequelize.INTEGER, allowNull:false, defaultValue:0}, //三级指标分值
thirdLevelContent: {type:Sequelize.STRING(100), allowNull:false, defaultValue:''}, //三级指标内容 thirdLevelContent: {type:Sequelize.STRING(100), allowNull:false, defaultValue:''}, //三级指标内容
totalScore: {type:Sequelize.INTEGER, allowNull:false, defaultValue:0}, //总分 totalScore: {type:Sequelize.INTEGER, allowNull:false, defaultValue:0}, //总分
......
...@@ -46,6 +46,7 @@ async function deleteData(req, res) { ...@@ -46,6 +46,7 @@ async function deleteData(req, res) {
res.success(result); res.success(result);
} }
async function updateManyData(req, res) { async function updateManyData(req, res) {
let table = req.tableModel; let table = req.tableModel;
...@@ -68,6 +69,8 @@ async function findOneData(req, res) { ...@@ -68,6 +69,8 @@ async function findOneData(req, res) {
let result = await findBiz.selectOneDataByParam(table, param, column); let result = await findBiz.selectOneDataByParam(table, param, column);
res.success(result); res.success(result);
} }
async function findManyData(req, res) { async function findManyData(req, res) {
let table = req.tableModel; let table = req.tableModel;
...@@ -77,6 +80,8 @@ async function findManyData(req, res) { ...@@ -77,6 +80,8 @@ async function findManyData(req, res) {
let result = await findBiz.selectDataListByParam(table, param, column); let result = await findBiz.selectDataListByParam(table, param, column);
res.success(result); res.success(result);
} }
async function findManyToPageData(req, res) { async function findManyToPageData(req, res) {
let table = req.tableModel; let table = req.tableModel;
...@@ -87,6 +92,7 @@ async function findManyToPageData(req, res) { ...@@ -87,6 +92,7 @@ async function findManyToPageData(req, res) {
res.success(result); res.success(result);
} }
async function findCountData(req, res) { async function findCountData(req, res) {
let table = req.tableModel; let table = req.tableModel;
...@@ -97,6 +103,7 @@ async function findCountData(req, res) { ...@@ -97,6 +103,7 @@ async function findCountData(req, res) {
res.success(result); res.success(result);
} }
async function findAggragateData(req, res) { async function findAggragateData(req, res) {
let table = req.tableModel; let table = req.tableModel;
...@@ -107,6 +114,7 @@ async function findAggragateData(req, res) { ...@@ -107,6 +114,7 @@ async function findAggragateData(req, res) {
res.success(result); res.success(result);
} }
async function findAggragateDataToPage(req, res) { async function findAggragateDataToPage(req, res) {
let table = req.tableModel; let table = req.tableModel;
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
*/ */
import * as mongoRouter from './mongoRouter'; import * as mongoRouter from './mongoRouter';
import * as mysqlRouter from './mysqlRouter';
export function setRouter(httpServer){ export function setRouter(httpServer){
mongoRouter.setRouter(httpServer); mongoRouter.setRouter(httpServer);
mysqlRouter.setRouter(httpServer);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment