Commit 87c4b0da by lixinming

Merge branch 'master' of http://123.207.147.179:8888/node_server/zjxcxServer

# Conflicts:
#	src/biz/enterprise/financing.ts
#	src/data/enterprise/financing.ts
parents 81198e84 9f481332
...@@ -136,18 +136,16 @@ export async function deleteEnterpriseByUscc(uscc:string) { ...@@ -136,18 +136,16 @@ export async function deleteEnterpriseByUscc(uscc:string) {
/** /**
* 获取在孵企业信息列表 * 获取在孵企业信息列表
* @param logonTime 新注册时间 * @param time 新注册时间/迁入时间
* @param timeOfImmigration 迁入时间
* @param fuHuaQiUscc 孵化器统一信用代码 实际参数是所属孵化器 * @param fuHuaQiUscc 孵化器统一信用代码 实际参数是所属孵化器
* @param industry 行业领域 * @param industry 行业领域
* @param isNaturalPersonHolding 自然人控股 * @param isNaturalPersonHolding 自然人控股
* @param page 页数 * @param page 页数
* @returns * @returns
*/ */
export async function enterpriseList(logonTime:number, timeOfImmigration:number, fuHuaQiUscc:string, industry:number, isNaturalPersonHolding:boolean, page:number) { export async function enterpriseList(time:number, fuHuaQiUscc:string, industry:number, isNaturalPersonHolding:boolean, page:number) {
let selectParam:any = {}; let selectParam:any = {};
if (logonTime) selectParam.logonTime = logonTime; if (time) selectParam.logonTime = time; selectParam.timeOfImmigration = time;
if (timeOfImmigration) selectParam.timeOfImmigration = timeOfImmigration;
if (fuHuaQiUscc) selectParam.fuHuaQiUscc = fuHuaQiUscc; if (fuHuaQiUscc) selectParam.fuHuaQiUscc = fuHuaQiUscc;
if (industry) selectParam.industry = industry; if (industry) selectParam.industry = industry;
if (isNaturalPersonHolding) selectParam.isNaturalPersonHolding = isNaturalPersonHolding; if (isNaturalPersonHolding) selectParam.isNaturalPersonHolding = isNaturalPersonHolding;
......
...@@ -119,9 +119,9 @@ export async function getAddByName(name:string) { ...@@ -119,9 +119,9 @@ export async function getAddByName(name:string) {
/** /**
* 融资企业信息列表 * 融资企业信息列表
* @param 数据月份 目前数据库没有该字段 * @param month 数据月份 目前数据库没有该字段
* @param fuHuaQiUscc 孵化器统一信用代码 实际参数是所属孵化器 * @param fuHuaQiUscc 孵化器统一信用代码 实际参数是所属孵化器
* @param 行业领域 目前数据库没有该字段 * @param industry 行业领域 根据孵化器信用代码查找 fuhuaqi表的领域
* @param fuHuaQiInvestment 孵化器是否参与投资 * @param fuHuaQiInvestment 孵化器是否参与投资
* @param page 页数 * @param page 页数
* @returns * @returns
......
...@@ -123,6 +123,6 @@ export async function logout(uscc:string):Promise<object> { ...@@ -123,6 +123,6 @@ export async function logout(uscc:string):Promise<object> {
/** /**
* 修改账号状态 * 修改账号状态
*/ */
export async function updateState() { export async function updateState(userStatem, uscc) {
} }
\ No newline at end of file
...@@ -25,6 +25,7 @@ const financingSchema = new Schema({ ...@@ -25,6 +25,7 @@ const financingSchema = new Schema({
year:String,//数据年份 year:String,//数据年份
month:String,//数据月份 month:String,//数据月份
industry:[Number],//领域 industry:[Number],//领域
}); });
var financingModel; var financingModel;
......
...@@ -35,7 +35,8 @@ const fuHuaQiSchema = new Schema({ ...@@ -35,7 +35,8 @@ const fuHuaQiSchema = new Schema({
token:{type:String, index:true}, token:{type:String, index:true},
tokenMs:Number, tokenMs:Number,
firstLoginIsChangePwd:{type:Boolean, default:false},//首次登录是否修改密码 firstLoginIsChangePwd:{type:Boolean, default:false},//首次登录是否修改密码
createTime:Number createTime:Number,
userState:{type:Boolean, default:false} //是否禁用
}); });
var fuHuaQiModel; var fuHuaQiModel;
......
import * as asyncHandler from 'express-async-handler'; import * as asyncHandler from 'express-async-handler';
import * as userBiz from '../biz/guanWeiHui/user'; import * as userBiz from '../biz/fuHuqQi/user';
import * as baseBiz from '../biz/fuHuqQi/base'; import * as baseBiz from '../biz/fuHuqQi/base';
import * as enterpriseBiz from '../biz/enterprise/enterprise';
import * as financingBiz from '../biz/enterprise/financing';
import { checkReqParam } from '../util/tools'; import { checkReqParam } from '../util/tools';
import { BizError } from '../util/bizError'; import { BizError } from '../util/bizError';
import { ERRORENUM } from '../config/errorEnum'; import { ERRORENUM } from '../config/errorEnum';
...@@ -12,13 +14,15 @@ export function setRouter(httpServer) { ...@@ -12,13 +14,15 @@ export function setRouter(httpServer) {
// /** 孵化器*/ // /** 孵化器*/
httpServer.post('/admin/fuhuaqi/baselist', asyncHandler(fuHuaQiBaseList)); httpServer.post('/admin/fuhuaqi/baselist', asyncHandler(fuHuaQiBaseList));
// httpServer.post('/admin/fuhuaqi/monthoccupancyrate', asyncHandler()); // httpServer.post('/admin/fuhuaqi/monthoccupancyrate', asyncHandler());
// httpServer.post('/admin/fuhuaqi/userlist', asyncHandler()); httpServer.post('/admin/fuhuaqi/userlist', asyncHandler(getFuHuaQiUserList));
// httpServer.post('/admin/fuhuaqi/updatestate', asyncHandler()); httpServer.post('/admin/fuhuaqi/updatestate', asyncHandler(updateState));
// /**企业 */ /**企业 */
// httpServer.post('/admin/enterprise/list', asyncHandler()); httpServer.post('/admin/enterprise/list', asyncHandler(getEnterpriseList));
// httpServer.post('/admin/enterprise/financinglist', asyncHandler()); httpServer.post('/admin/enterprise/financinglist', asyncHandler(getFinancingList));
} }
/** /**
* 管理后天登录 * 管理后天登录
* @param req * @param req
...@@ -50,8 +54,64 @@ async function fuHuaQiBaseList(req, res) { ...@@ -50,8 +54,64 @@ async function fuHuaQiBaseList(req, res) {
res.success(result); res.success(result);
} }
async function occupancyRate() {
/**
* 后台管理 获取孵化器账号信息列表
* @param req
* @param res
*/
async function getFuHuaQiUserList(req, res) {
let reqConf = {operationName: 'string', page: 'number' };
let { operationName, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await userBiz.fuHuaQiUserList(operationName, page);
res.success(result);
}
/**
* 后台管理 获取融资企业信息列表
* @param req
* @param res
*/
async function getFinancingList(req, res) {
let reqConf = {fuHuaQiUscc: 'string', fuHuaQiInvestment: 'boolean', page: 'number' };
let { fuHuaQiUscc, fuHuaQiInvestment, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await financingBiz.financingList(fuHuaQiUscc, fuHuaQiInvestment, page);
res.success(result);
}
/**
* 后台管理 获取在孵企业信息列表
* @param req
* @param res
*/
async function getEnterpriseList(req, res) {
let reqConf = {logonTime: 'number', timeOfImmigration: 'number', fuHuaQiUscc: 'string', industry: 'number', isNaturalPersonHolding: 'boolean', page: 'number' };
let { time, fuHuaQiUscc, industry, isNaturalPersonHolding, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await enterpriseBiz.enterpriseList(time, fuHuaQiUscc, industry, isNaturalPersonHolding, page);
res.success(result);
}
/**
* 后台管理 修改孵化器账号状态
* @param req
* @param res
*/
async function updateState(req, res) {
let reqConf = {userState: 'number', uscc: 'string' };
let { userState, uscc } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await userBiz.updateState(userState, uscc);
res.success(result);
} }
;
\ No newline at end of file
...@@ -14,6 +14,7 @@ import { checkFuHuaQiToken } from '../middleware/user'; ...@@ -14,6 +14,7 @@ import { checkFuHuaQiToken } from '../middleware/user';
export function setRouter(httpServer) { export function setRouter(httpServer) {
httpServer.post('/fuhuaqi/login', asyncHandler(login)); httpServer.post('/fuhuaqi/login', asyncHandler(login));
httpServer.post('/fuhuaqi/login/firstupdate', checkFuHuaQiToken, asyncHandler(firstUpdatePwd)); httpServer.post('/fuhuaqi/login/firstupdate', checkFuHuaQiToken, asyncHandler(firstUpdatePwd));
/**基础数据 */ /**基础数据 */
httpServer.post('/fuhuaqi/base', checkFuHuaQiToken, asyncHandler(baseInfo)); httpServer.post('/fuhuaqi/base', checkFuHuaQiToken, asyncHandler(baseInfo));
httpServer.post('/fuhuaqi/mydata', checkFuHuaQiToken, asyncHandler(myDataInfo)); httpServer.post('/fuhuaqi/mydata', checkFuHuaQiToken, asyncHandler(myDataInfo));
...@@ -31,9 +32,8 @@ export function setRouter(httpServer) { ...@@ -31,9 +32,8 @@ export function setRouter(httpServer) {
httpServer.post('/fuhuaqi/financing/update', checkFuHuaQiToken, asyncHandler(updateFinancingInfo)); httpServer.post('/fuhuaqi/financing/update', checkFuHuaQiToken, asyncHandler(updateFinancingInfo));
httpServer.post('/fuhuaqi/financing/select', checkFuHuaQiToken, asyncHandler(selectFinancingInfo)); httpServer.post('/fuhuaqi/financing/select', checkFuHuaQiToken, asyncHandler(selectFinancingInfo));
httpServer.post('/fuhuaqi/financing/delete', checkFuHuaQiToken, asyncHandler(delFinancingInfo)); httpServer.post('/fuhuaqi/financing/delete', checkFuHuaQiToken, asyncHandler(delFinancingInfo));
httpServer.post('/admin/financing/namelist', asyncHandler(getFinancingInfoByName));
httpServer.post('/fuhuaqi/financing/namelist', checkFuHuaQiToken, asyncHandler(getFinancingInfoByName)); httpServer.post('/admin/financing/add', asyncHandler(getAddInfoByName));
httpServer.post('/fuhuaqi/financing/add', checkFuHuaQiToken, asyncHandler(getAddInfoByName));
/**新注册或迁入企业 */ /**新注册或迁入企业 */
httpServer.post('/fuhuaqi/enterprise/register', checkFuHuaQiToken, asyncHandler(registerEnterprise)); httpServer.post('/fuhuaqi/enterprise/register', checkFuHuaQiToken, asyncHandler(registerEnterprise));
...@@ -42,6 +42,7 @@ export function setRouter(httpServer) { ...@@ -42,6 +42,7 @@ export function setRouter(httpServer) {
httpServer.post('/fuhuaqi/enterprise/updatemove', checkFuHuaQiToken, asyncHandler(updateMoveInEnterprise)); httpServer.post('/fuhuaqi/enterprise/updatemove', checkFuHuaQiToken, asyncHandler(updateMoveInEnterprise));
httpServer.post('/fuhuaqi/enterprise/select', checkFuHuaQiToken, asyncHandler(selectEnterpriseFinancingInfo)); httpServer.post('/fuhuaqi/enterprise/select', checkFuHuaQiToken, asyncHandler(selectEnterpriseFinancingInfo));
httpServer.post('/fuhuaqi/enterprise/delete', checkFuHuaQiToken, asyncHandler(delEnterpriseFinancingInfo)); httpServer.post('/fuhuaqi/enterprise/delete', checkFuHuaQiToken, asyncHandler(delEnterpriseFinancingInfo));
} }
/** /**
...@@ -72,33 +73,6 @@ export function setRouter(httpServer) { ...@@ -72,33 +73,6 @@ export function setRouter(httpServer) {
res.success(result); res.success(result);
} }
/**
* 根据融资企业名称获取融资企业名称
* @param req
* @param res
*/
async function getFinancingInfoByName(req, res) {
let reqConf = {name: 'String' };
let { name } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await financingBiz.getFinancingByName(name);
res.success(result);
}
/**
* 根据融资企业名称获取注册地址和经营地址
* @param req
* @param res
*/
async function getAddInfoByName(req, res) {
let reqConf = {name: 'String' };
let { name } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await financingBiz.getAddByName(name);
res.success(result);
}
/** /**
* 新注册企业 * 新注册企业
...@@ -114,6 +88,7 @@ async function registerEnterprise(req, res) { ...@@ -114,6 +88,7 @@ async function registerEnterprise(req, res) {
res.success(result); res.success(result);
} }
/** /**
* 新注册企业表单修改 * 新注册企业表单修改
* @param req * @param req
...@@ -128,6 +103,7 @@ async function updateRegisterEnterprise(req, res) { ...@@ -128,6 +103,7 @@ async function updateRegisterEnterprise(req, res) {
res.success(result); res.success(result);
} }
/** /**
* 迁入企业登记 * 迁入企业登记
* @param req * @param req
...@@ -142,6 +118,7 @@ async function updateRegisterEnterprise(req, res) { ...@@ -142,6 +118,7 @@ async function updateRegisterEnterprise(req, res) {
res.success(result); res.success(result);
} }
/** /**
* 查询迁入企业登记信息或新建企业登录信息 * 查询迁入企业登记信息或新建企业登录信息
* @param req * @param req
...@@ -155,6 +132,7 @@ async function updateRegisterEnterprise(req, res) { ...@@ -155,6 +132,7 @@ async function updateRegisterEnterprise(req, res) {
res.success(result); res.success(result);
} }
/** /**
* 查询企业融资信息 * 查询企业融资信息
* @param req * @param req
...@@ -183,6 +161,37 @@ async function delFinancingInfo(req, res) { ...@@ -183,6 +161,37 @@ async function delFinancingInfo(req, res) {
res.success(result); res.success(result);
} }
/**
* 根据融资企业名称获取融资企业名称
* @param req
* @param res
*/
async function getFinancingInfoByName(req, res) {
let reqConf = {name: 'String' };
let { name } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await financingBiz.getFinancingByName(name);
res.success(result);
}
/**
* 根据融资企业名称获取注册地址和经营地址
* @param req
* @param res
*/
async function getAddInfoByName(req, res) {
let reqConf = {name: 'String' };
let { name } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await financingBiz.getAddByName(name);
res.success(result);
}
/** /**
* 查询企业融资信息 * 查询企业融资信息
* @param req * @param req
...@@ -197,6 +206,7 @@ async function delEnterpriseFinancingInfo(req, res) { ...@@ -197,6 +206,7 @@ async function delEnterpriseFinancingInfo(req, res) {
res.success(result); res.success(result);
} }
//======================= //=======================
/** /**
...@@ -229,6 +239,8 @@ async function login(req, res) { ...@@ -229,6 +239,8 @@ async function login(req, res) {
res.success(result); res.success(result);
} }
/** /**
* 孵化器首次登录 * 孵化器首次登录
* @param req * @param req
...@@ -261,6 +273,7 @@ async function baseInfo(req, res) { ...@@ -261,6 +273,7 @@ async function baseInfo(req, res) {
res.success(userInfo); res.success(userInfo);
} }
/** /**
* 我的数据 详细数据 * 我的数据 详细数据
* @param req * @param req
......
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