Commit 9f481332 by 孙香冬

no message

parent e24ffb3c
......@@ -136,18 +136,16 @@ export async function deleteEnterpriseByUscc(uscc:string) {
/**
* 获取在孵企业信息列表
* @param logonTime 新注册时间
* @param timeOfImmigration 迁入时间
* @param time 新注册时间/迁入时间
* @param fuHuaQiUscc 孵化器统一信用代码 实际参数是所属孵化器
* @param industry 行业领域
* @param isNaturalPersonHolding 自然人控股
* @param page 页数
* @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 = {};
if (logonTime) selectParam.logonTime = logonTime;
if (timeOfImmigration) selectParam.timeOfImmigration = timeOfImmigration;
if (time) selectParam.logonTime = time; selectParam.timeOfImmigration = time;
if (fuHuaQiUscc) selectParam.fuHuaQiUscc = fuHuaQiUscc;
if (industry) selectParam.industry = industry;
if (isNaturalPersonHolding) selectParam.isNaturalPersonHolding = isNaturalPersonHolding;
......
......@@ -119,11 +119,10 @@ export async function getAddByName(name:string) {
/**
* 融资企业信息列表
* @param 数据月份 目前数据库没有该字段
* @param month 数据月份 目前数据库没有该字段
* @param fuHuaQiUscc 孵化器统一信用代码 实际参数是所属孵化器
* @param 行业领域 目前数据库没有该字段
* @param industry 行业领域 根据孵化器信用代码查找 fuhuaqi表的领域
* @param fuHuaQiInvestment 孵化器是否参与投资
* @param 实体孵化 目前数据库没有该字段
* @param page 页数
* @returns
*/
......
......@@ -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
......@@ -22,6 +22,8 @@ const financingSchema = new Schema({
fuHuaQiInvestmentStyle:Number,//孵化器投资方式
draftLock:{type:Boolean, default:false},//草稿锁,true为提交之后,false为草稿
createTime:Number,//录入时间
month:{type:Number, index:true}, //数据月份
});
var financingModel;
......
......@@ -35,7 +35,8 @@ const fuHuaQiSchema = new Schema({
token:{type:String, index:true},
tokenMs:Number,
firstLoginIsChangePwd:{type:Boolean, default:false},//首次登录是否修改密码
createTime:Number
createTime:Number,
userState:{type:Boolean, default:false} //是否禁用
});
var fuHuaQiModel;
......
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 enterpriseBiz from '../biz/enterprise/enterprise';
import * as financingBiz from '../biz/enterprise/financing';
import { checkReqParam } from '../util/tools';
import { BizError } from '../util/bizError';
import { ERRORENUM } from '../config/errorEnum';
......@@ -12,13 +14,15 @@ export function setRouter(httpServer) {
// /** 孵化器*/
httpServer.post('/admin/fuhuaqi/baselist', asyncHandler(fuHuaQiBaseList));
// httpServer.post('/admin/fuhuaqi/monthoccupancyrate', asyncHandler());
// httpServer.post('/admin/fuhuaqi/userlist', asyncHandler());
// httpServer.post('/admin/fuhuaqi/updatestate', asyncHandler());
// /**企业 */
// httpServer.post('/admin/enterprise/list', asyncHandler());
// httpServer.post('/admin/enterprise/financinglist', asyncHandler());
httpServer.post('/admin/fuhuaqi/userlist', asyncHandler(getFuHuaQiUserList));
httpServer.post('/admin/fuhuaqi/updatestate', asyncHandler(updateState));
/**企业 */
httpServer.post('/admin/enterprise/list', asyncHandler(getEnterpriseList));
httpServer.post('/admin/enterprise/financinglist', asyncHandler(getFinancingList));
}
/**
* 管理后天登录
* @param req
......@@ -50,8 +54,64 @@ async function fuHuaQiBaseList(req, res) {
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';
export function setRouter(httpServer) {
httpServer.post('/fuhuaqi/login', asyncHandler(login));
httpServer.post('/fuhuaqi/login/firstupdate', checkFuHuaQiToken, asyncHandler(firstUpdatePwd));
/**基础数据 */
httpServer.post('/fuhuaqi/base', checkFuHuaQiToken, asyncHandler(baseInfo));
httpServer.post('/fuhuaqi/mydata', checkFuHuaQiToken, asyncHandler(myDataInfo));
......@@ -31,9 +32,8 @@ export function setRouter(httpServer) {
httpServer.post('/fuhuaqi/financing/update', checkFuHuaQiToken, asyncHandler(updateFinancingInfo));
httpServer.post('/fuhuaqi/financing/select', checkFuHuaQiToken, asyncHandler(selectFinancingInfo));
httpServer.post('/fuhuaqi/financing/delete', checkFuHuaQiToken, asyncHandler(delFinancingInfo));
httpServer.post('/fuhuaqi/financing/namelist', checkFuHuaQiToken, asyncHandler(getFinancingInfoByName));
httpServer.post('/fuhuaqi/financing/add', checkFuHuaQiToken, asyncHandler(getAddInfoByName));
httpServer.post('/admin/financing/namelist', asyncHandler(getFinancingInfoByName));
httpServer.post('/admin/financing/add', asyncHandler(getAddInfoByName));
/**新注册或迁入企业 */
httpServer.post('/fuhuaqi/enterprise/register', checkFuHuaQiToken, asyncHandler(registerEnterprise));
......@@ -42,6 +42,7 @@ export function setRouter(httpServer) {
httpServer.post('/fuhuaqi/enterprise/updatemove', checkFuHuaQiToken, asyncHandler(updateMoveInEnterprise));
httpServer.post('/fuhuaqi/enterprise/select', checkFuHuaQiToken, asyncHandler(selectEnterpriseFinancingInfo));
httpServer.post('/fuhuaqi/enterprise/delete', checkFuHuaQiToken, asyncHandler(delEnterpriseFinancingInfo));
}
/**
......@@ -72,33 +73,6 @@ export function setRouter(httpServer) {
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) {
res.success(result);
}
/**
* 新注册企业表单修改
* @param req
......@@ -128,6 +103,7 @@ async function updateRegisterEnterprise(req, res) {
res.success(result);
}
/**
* 迁入企业登记
* @param req
......@@ -142,6 +118,7 @@ async function updateRegisterEnterprise(req, res) {
res.success(result);
}
/**
* 查询迁入企业登记信息或新建企业登录信息
* @param req
......@@ -155,6 +132,7 @@ async function updateRegisterEnterprise(req, res) {
res.success(result);
}
/**
* 查询企业融资信息
* @param req
......@@ -183,6 +161,37 @@ async function delFinancingInfo(req, res) {
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
......@@ -197,6 +206,7 @@ async function delEnterpriseFinancingInfo(req, res) {
res.success(result);
}
//=======================
/**
......@@ -229,6 +239,8 @@ async function login(req, res) {
res.success(result);
}
/**
* 孵化器首次登录
* @param req
......@@ -261,6 +273,7 @@ async function baseInfo(req, res) {
res.success(userInfo);
}
/**
* 我的数据 详细数据
* @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