Commit 790ef45b by lixinming
parents 3b279d99 149eaf28
......@@ -13,6 +13,7 @@ import { FinancingListConfig } from "../../config/ojbectResultKeyConfig";
import { BizError } from "../../util/bizError";
import { checkChange, checkParamater, extractData, getTaskId } from "../../util/tools";
import { findEnterpriseInfoByName, findEnterpriseListByFuHuaQiUsccName } from "../../data/enterprise/enterprise";
import { findFuHuaQiByName } from "../../data/fuHuaQi/fuhuaqi";
/**
......@@ -118,17 +119,21 @@ export async function getFinancingByName(uscc:string) {
/**
* 融资企业信息列表
* @param month 数据月份 目前数据库没有该字段
* @param fuHuaQiUscc 孵化器信用代码
* @param monthData 数据月份 目前数据库没有该字段
* @param fuHuaQiName 所属孵化器
* @param industry 行业领域
* @param fuHuaQiInvestment 孵化器是否参与投资
* @param page 页数
* @returns
*/
export async function financingList(month:string, fuHuaQiUscc:string, industry:string, fuHuaQiInvestment:boolean, page:number) {
export async function financingList(monthData:string, fuHuaQiName:string, industry:[Number], fuHuaQiInvestment:boolean, page:number) {
let fuHuaQiInfo = await findFuHuaQiByName(fuHuaQiName);
let selectParam:any = {};
if (month) selectParam.month = month;
if (fuHuaQiUscc) selectParam.fuHuaQiUscc = fuHuaQiUscc;
let year = monthData.substring(0,5);
let month = monthData.slice(5, monthData.length);
if (monthData) selectParam.year = year; selectParam.month = month;
if (fuHuaQiName) selectParam.fuHuaQiUscc = fuHuaQiInfo.uscc;
if (industry) selectParam.industry = industry;
if (fuHuaQiInvestment) selectParam.fuHuaQiInvestment = fuHuaQiInvestment;
......
......@@ -16,7 +16,7 @@ const financingSchema = new Schema({
operatingAdd:String,//经营地址
financingAmount:Number,//融资金额(万元)
investmentInstitutionsName:String,//投资机构名称
timeToObtainInvestment:Number,//获得投资时间
timeToObtainInvestment:String,//获得投资时间
fuHuaQiInvestment:{type:Boolean, default:false},//孵化器是否投资
fuHuaQiInvestmentAmount:Number,//孵化器投资金额(万元)
fuHuaQiInvestmentStyle:Number,//孵化器投资方式
......@@ -25,7 +25,6 @@ const financingSchema = new Schema({
year:String,//数据年份
month:String,//数据月份
industry:[Number],//领域
belongToIncubator:String, //所属孵化器
});
var financingModel;
......
......@@ -80,7 +80,7 @@ export async function findFuHuaQiByUSCC(uscc:string) {
* @returns {}
*/
export async function findFuHuaQiByName(name:string) {
return await fuHuaQiModel.findOne({name}).exec();
return await fuHuaQiModel.findOne({name});
}
/**
......@@ -89,7 +89,7 @@ export async function findFuHuaQiByName(name:string) {
* @returns 信用代码为uscc的孵化器信息
*/
export async function findFuHuaQiByUscc(uscc:string) {
return await fuHuaQiModel.findOne({uscc}).exec();
return await fuHuaQiModel.findOne({uscc});
}
......
......@@ -61,7 +61,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function getFuHuaQiUserList(req, res) {
let reqConf = {operationName: 'string', page: 'number' };
let reqConf = {operationName: 'String', page: 'Number' };
let { operationName, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
......@@ -76,11 +76,11 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function getFinancingList(req, res) {
let reqConf = {month: 'string', fuHuaQiUscc: 'string', industry: 'string', fuHuaQiInvestment: 'boolean', page: 'number' };
let { month, fuHuaQiUscc, industry, fuHuaQiInvestment, page } = checkReqParam(reqConf, req.body);
let reqConf = {monthData: 'String', fuHuaQiName: 'String', industry: '[Number]', fuHuaQiInvestment: 'Boolean', page: 'Number' };
let { monthData, fuHuaQiName, industry, fuHuaQiInvestment, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
let result = await financingBiz.financingList(month, fuHuaQiUscc, industry, fuHuaQiInvestment, page);
let result = await financingBiz.financingList(monthData, fuHuaQiName, industry, fuHuaQiInvestment, page);
res.success(result);
}
......@@ -91,7 +91,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function getEnterpriseList(req, res) {
let reqConf = {time: 'number', fuHuaQiUscc: 'string', industry: 'number', isNaturalPersonHolding: 'boolean', page: 'number' };
let reqConf = {time: 'Number', fuHuaQiUscc: 'String', industry: 'Number', isNaturalPersonHolding: 'Boolean', page: 'Number' };
let { time, fuHuaQiUscc, industry, isNaturalPersonHolding, page } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
......@@ -106,7 +106,7 @@ async function fuHuaQiBaseList(req, res) {
* @param res
*/
async function updateState(req, res) {
let reqConf = {userState: 'boolean', uscc: 'string' };
let reqConf = {userState: 'Boolean', uscc: 'String' };
let { userState, uscc } = checkReqParam(reqConf, req.body);
const Uscc = req.headers.uscc;
......
......@@ -17,7 +17,7 @@ export function setRouter(httpServer) {
/**基础数据 */
httpServer.post('/fuhuaqi/base', checkFuHuaQiToken, asyncHandler(baseInfo));
httpServer.post('/fuhuaqi/mydata', checkFuHuaQiToken, asyncHandler(myDataInfo));
httpServer.post('/fuhuaqi/mydata', asyncHandler(myDataInfo));
httpServer.post('/fuhuaqi/base/update', checkFuHuaQiToken, asyncHandler(updateMyDataInfo));
/**任务 */
httpServer.post('/fuhuaqi/task/list', checkFuHuaQiToken, asyncHandler(taskList));
......@@ -32,7 +32,7 @@ export function setRouter(httpServer) {
/**融资企业填报 */
httpServer.post('/fuhuaqi/financing/create', checkFuHuaQiToken, asyncHandler(createFinancingInfo));
httpServer.post('/fuhuaqi/financing/update', checkFuHuaQiToken, asyncHandler(updateFinancingInfo));
httpServer.post('/fuhuaqi/financing/select', checkFuHuaQiToken, asyncHandler(selectEnterpriseFinancingInfo));
httpServer.post('/fuhuaqi/financing/select', asyncHandler(selectEnterpriseFinancingInfo));
httpServer.post('/fuhuaqi/financing/delete', checkFuHuaQiToken, asyncHandler(delEnterpriseFinancingInfo));
httpServer.post('/admin/financing/namelist', asyncHandler(getFinancingInfoByName));
......
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