Commit 78803053 by Zllgogo

no message

parent 8a5753f5
......@@ -25,17 +25,19 @@ export async function getBaseData() {
let baseData = {
fuhuaData:{ //孵化器数据
"总面积":0, //没有
// "总面积":0, //没有
"孵化器总面积":0,
"在孵面积":0,
"自用面积":0,
// "自用面积":0,
"在孵企业":0,
"迁出企业":0,
"毕业企业":0,
"园区面积":0,//新增
"产业规模": 0,
"总资产投入金额": 0,
"引入机构数量": 0,
"引入机构投资": 0,
"出租率": "", // 添加出租率字段
// "园区面积":0,//新增
// "产业规模": 0,
// "总资产投入金额": 0,
// "引入机构数量": 0,
// "引入机构投资": 0,
},
fuhuaPinfen:0, //孵化器评分 没有该字段
fuhuaInfo:{ //孵化器信息
......@@ -53,11 +55,20 @@ export async function getBaseData() {
let zaifuResList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId"], zaifuTableInfo );
if (zaifuResList) baseData.fuhuaData["在孵企业"] = zaifuResList.length;
zaifuResList.forEach( info => {
info.enterprise_leases.forEach( lease => {
baseData.fuhuaData["在孵面积"] += parseFloat(lease.area);
})
})
// zaifuResList.forEach( info => {
// info.enterprise_leases.forEach( lease => {
// baseData.fuhuaData["在孵面积"] += parseFloat(lease.area);
// })
// })
// 累加在孵面积(考虑租赁时间)
zaifuResList.forEach(info => {
info.enterprise_leases.forEach(lease => {
// 确认租赁时间在有效范围内
if (nowTime >= lease.startTime && nowTime <= lease.endTime) {
baseData.fuhuaData["在孵面积"] += parseFloat(lease.area);
}
});
});
// baseData.fuhuaData["在孵面积占比"] = ((baseData.fuhuaData["在孵面积(㎡)"] / baseData.fuhuaData["总面积(㎡)"])*100).toFixed(2) + "%";
/**迁出企业 */
......@@ -72,16 +83,23 @@ export async function getBaseData() {
/**孵化器信息 */
let yuyiList = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.羽翼孵化器信息, {}, []);
if (baseData.fuhuaData["在孵面积"] != yuyiList.zaifuArea) await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.羽翼孵化器信息, {zaifuArea:baseData.fuhuaData["在孵面积"]}, {yId:yuyiList.yId});
if (yuyiList) {
baseData.fuhuaData["总面积"] = yuyiList.totalArea;
// baseData.fuhuaData["总面积"] = yuyiList.totalArea;
baseData.fuhuaData["孵化器总面积"] = yuyiList.totalArea;
// baseData.fuhuaData["在孵面积"] = yuyiList.zaifuArea;
baseData.fuhuaData["自用面积"] = yuyiList.ziyonArea;
baseData.fuhuaData["园区面积"] = yuyiList.parkArea;//新增
baseData.fuhuaData["产业规模"] = yuyiList.industrialScale;
baseData.fuhuaData["总资产投入金额"] = yuyiList.totalAssetInvestmentAmount;
baseData.fuhuaData["引入机构数量"] = yuyiList.numberOfInstitutionsIntroduced;
baseData.fuhuaData["引入机构投资"] = yuyiList.introduceInstitutionalInvestment;
// baseData.fuhuaData["自用面积"] = yuyiList.ziyonArea;
// baseData.fuhuaData["园区面积"] = yuyiList.parkArea;//新增
// baseData.fuhuaData["产业规模"] = yuyiList.industrialScale;
// baseData.fuhuaData["总资产投入金额"] = yuyiList.totalAssetInvestmentAmount;
// baseData.fuhuaData["引入机构数量"] = yuyiList.numberOfInstitutionsIntroduced;
// baseData.fuhuaData["引入机构投资"] = yuyiList.introduceInstitutionalInvestment;
// 计算出租率
if (baseData.fuhuaData["孵化器总面积"] > 0) {
baseData.fuhuaData["出租率"] = ((baseData.fuhuaData["在孵面积"] / baseData.fuhuaData["孵化器总面积"]) * 100).toFixed(2);
}
baseData.fuhuaInfo = {
"运营名称":yuyiList.operateName,
"孵化器名称":yuyiList.name,
......@@ -91,7 +109,7 @@ export async function getBaseData() {
"孵化器认定时间":yuyiList.incubateTime,
"孵化领域":yuyiList.incubateField,
"机构性质":yuyiList.natureInstitution,
"是否成立投资基金":yuyiList.fundedReserve,
"是否成立投资基金":yuyiList.fundedReserve,//
"联系人":yuyiList.contacts,
"负责人":yuyiList.personCharge,
"手机号码":yuyiList.phone,
......
......@@ -308,7 +308,8 @@ export async function enterpriseRegister(param) {
logonTime:getMySqlMs(param.logonTime),
state:0,
register:0,
rent: param.rent
rent: param.rent,
// randomCode: randomCode() // 在企业注册时生成 randomCode
};
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {});
......
......@@ -123,6 +123,8 @@ export async function createRuFu(uId, param) {
register:0
};
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {});
console.log("addEInfo", addEInfo);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业用户表, {eId:addEInfo.eId}, {uId});
......@@ -162,6 +164,7 @@ export async function createRuFu(uId, param) {
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业用户表, addUInfo, {});
return {eId:addEInfo.eId};
}
......
......@@ -12,55 +12,171 @@ import { BizError } from "../util/bizError";
import { ERRORENUM } from "../config/enum/errorEnum";
import { getMySqlMs } from "../tools/system";
/**
* 备份在孵企业列表
*/
// export async function enterpriseList(enterpriseName:string, page:number, logonTime:string, startTime:number, endTime:number, building:string) {
// let selectParam:any = {state:1};
// if (enterpriseName) {
// selectParam.enterpriseName = {"%like%":enterpriseName}
// }
// if (logonTime) {
// // 假设 logonTime 是一个具体的日期字符串,例如 "2023-01-01"
// selectParam.logonTime = logonTime;
// }
// selectParam["enterprise_leases.startTime"] = { "%gte%": startTime };
// selectParam["enterprise_leases.endTime"] = { "%lte%": endTime };
// if (building) {
// selectParam["enterprise_leases.building"] = building
// }
export async function enterpriseList(enterpriseName:string, page:number) {
let selectParam:any = {state:1};
if (enterpriseName) {
selectParam.enterpriseName = {"%like%":enterpriseName}
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "qiYeGuiMo"];
// let manyTableInfo:any = {};
// manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber" ,"building"], where:{} };
// // 关联企业孵化信息表,获取 moveOutTime 字段
// manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType","startTime" ,"endTime"], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
// let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page);
// // let dataCount = await selectManyTableData(OPERATIONALDATATYPE.查询数据量, TABLENAME.企业基础信息表, selectParam, null);
// let dataCount = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
// let dataList = [];
// resInfo.forEach(info => {
// let {eId, enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases, enterprise_fuhuas} = info;
// let leasesTime = '-'
// if (enterprise_leases[0].startTime){
// leasesTime = `${moment(enterprise_leases[0].startTime).format("YYYY-MM-DD")}至${moment(enterprise_leases[0].endTime).format("YYYY-MM-DD")}`;
// }
// let fuhuaTime = '-';
// if (enterprise_fuhuas[0].startTime) {
// fuhuaTime = `${moment(enterprise_fuhuas[0].startTime).format("YYYY-MM-DD")}至${moment(enterprise_fuhuas[0].endTime).format("YYYY-MM-DD")}`;
// }
// let dataInfo = {
// eId,
// enterpriseName, //企业名称
// uscc, //统一信用代码
// logonTime:moment(logonTime).format("YYYY-MM-DD"), //注册日期
// logonAddress:changeAdd(JSON.parse(logonAddress)), //注册地址
// qiYeGuiMo,//企业规模
// fuhuaTime,//孵化时间
// leasesTime,//租赁时间
// area:enterprise_leases[0].area+"㎡",//租赁面积
// building:enterprise_leases[0].building,//楼栋
// roomNumber:enterprise_leases[0].roomNumber,//室号
// };
// dataList.push(dataInfo);
// })
// return {dataList, dataCount:dataCount.length};
// }
export async function enterpriseList(enterpriseName:string, page:number, logonStartTime:string, logonEndTime:string, startTime: number,endTime: number, building: number) {
let selectParam: any = { state: 1 };
if (enterpriseName) { selectParam.enterpriseName = { "%like%": enterpriseName };}
if (logonStartTime && logonEndTime) {
selectParam.logonTime = {"%between%":[getMySqlMs(logonStartTime), getMySqlMs(logonEndTime)]}
}
// 主表字段过滤参数保持不变
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "qiYeGuiMo"];
let manyTableInfo:any = {};
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber"], where:{} };
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType","startTime" ,"endTime"], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page);
// 子表配置:租赁信息
let leaseWhere:any = {};
// console.log(getMySqlMs(startTime), getMySqlMs(endTime))
if (startTime && endTime) {
if (!leaseWhere["%literal%"]) {
leaseWhere["%literal%"] = `(startTime between '${getMySqlMs(startTime)}' and '${getMySqlMs(endTime)}'
or endTime between '${getMySqlMs(startTime)}' and '${getMySqlMs(endTime)}') `;
} // leaseWhere["%or%"] = [
// {startTime: { "%between%":[getMySqlMs(startTime), getMySqlMs(endTime)] }},
// {endTime: { "%between%":[getMySqlMs(startTime), getMySqlMs(endTime)] }}
// ]
}
// if (building && ['1', '3', '4'].includes(building)) {leaseWhere.building = building;}
if (building) selectParam["enterprise_leases.building"] = building
let manyTableInfo: any = {};
// 租赁信息表配置
manyTableInfo[TABLENAME.租赁信息] = {
column: ["area", "startTime", "endTime", "roomNumber", "building"],
where: leaseWhere
};
// 企业孵化信息表配置
manyTableInfo[TABLENAME.企业孵化信息] = {
column: ["moveOutTime", "moveOutType", "startTime", "endTime"],
where: {"%literal%": `enterprise_fuhuas.state <> ${enumConfig.FUHUASTATE.迁出}`}
}
// 查询分页数据
let resInfo = await selectManyTableData(
OPERATIONALDATATYPE.多表分页,
TABLENAME.企业基础信息表,
selectParam,
filesList,
manyTableInfo,
page
);
// 查询总数
let dataCount = await selectManyTableData(
OPERATIONALDATATYPE.多表联查,
TABLENAME.企业基础信息表,
selectParam,
filesList,
manyTableInfo
);
// let dataCount = await selectManyTableData(OPERATIONALDATATYPE.查询数据量, TABLENAME.企业基础信息表, selectParam, null);
let dataCount = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
let dataList = [];
resInfo.forEach(info => {
let {eId, enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases, enterprise_fuhuas} = info;
let leasesTime = '-'
if (enterprise_leases[0].startTime){
for (let info of resInfo) {
const {
eId,
enterpriseName,
uscc,
logonTime,
logonAddress,
qiYeGuiMo,
enterprise_leases,
enterprise_fuhuas
} = info;
let leasesTime = '-';
if (enterprise_leases[0]?.startTime) {
leasesTime = `${moment(enterprise_leases[0].startTime).format("YYYY-MM-DD")}${moment(enterprise_leases[0].endTime).format("YYYY-MM-DD")}`;
}
let fuhuaTime = '-';
if (enterprise_fuhuas[0].startTime) {
if (enterprise_fuhuas[0]?.startTime) {
fuhuaTime = `${moment(enterprise_fuhuas[0].startTime).format("YYYY-MM-DD")}${moment(enterprise_fuhuas[0].endTime).format("YYYY-MM-DD")}`;
}
let dataInfo = {
dataList.push({
eId,
enterpriseName, //企业名称
uscc, //统一信用代码
logonTime:moment(logonTime).format("YYYY-MM-DD"), //注册日期
logonAddress:changeAdd(JSON.parse(logonAddress)), //注册地址
qiYeGuiMo,//企业规模
fuhuaTime,//孵化时间
leasesTime,//租赁时间
area:enterprise_leases[0].area+"㎡",//租赁面积
building:enterprise_leases[0].building,//楼栋
roomNumber:enterprise_leases[0].roomNumber,//室号
};
dataList.push(dataInfo);
})
enterpriseName, // 企业名称
uscc, // 统一信用代码
logonTime: moment(logonTime).format("YYYY-MM-DD"), // 注册日期
logonAddress: changeAdd(JSON.parse(logonAddress)), // 注册地址
qiYeGuiMo, // 企业规模
fuhuaTime, // 孵化时间
leasesTime, // 租赁时间
area: enterprise_leases[0]?.area ? `${enterprise_leases[0].area}㎡` : '-',
// building: enterprise_leases[0]?.building || '-',
building:changeEnumValue(enumConfig.BUILDING, enterprise_leases[0]?.building),
roomNumber: enterprise_leases[0]?.roomNumber || '-'
});
}
return {dataList, dataCount:dataCount.length};
return { dataList, dataCount: dataCount.length };
}
......@@ -119,7 +235,7 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber"], where:{} };
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType"], where: { state:enumConfig.FUHUASTATE.迁出 } };
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType", "startTime", "endTime"], where: { state:enumConfig.FUHUASTATE.迁出 } };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page);
......@@ -632,7 +748,7 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
if (subInfo == "startTime") subList.push(fuhuaTime);//孵化时间
if (subInfo == "startTime") subList.push(leasesTime);//租赁时间
if (subInfo == "area") subList.push(enterprise_leases[0].area+"㎡");//租赁面积
if (subInfo == "building") subList.push(enterprise_leases[0].building);//
if (subInfo == "building") subList.push(enterprise_leases[0].building);//
if (subInfo == "roomNumber") subList.push(enterprise_leases[0].roomNumber);//室号
});
......@@ -670,15 +786,18 @@ export async function dwBasicInformation(eId:string) {
{key:"注册时间",value:"logonTime"},
{key:"注册地址",value:"logonAddress"},
{key:"企业规模",value:"qiYeGuiMo"},
{key:"孵化时间",value:"startTime"},//孵化时间
{key:"租赁时间",value: "startTime"},
{key:"租赁面积",value:"area",},
{key:"楼号",value:"building"},//楼号
{key:"室号",value:"roomNumber"},
];
let selectParam:any = {eId};
let filesList = ["enterpriseName", "uscc", "logonTime", "logonAddress", "qiYeGuiMo"];
let manyTableInfo:any = {};
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber"], where:{}};
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber","building"], where:{}};
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["startTime", "endTime"], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
......@@ -710,6 +829,7 @@ export async function dwBasicInformation(eId:string) {
if (subInfo == "startTime") subList.push(fuhuaTime);//孵化时间
if (subInfo == "startTime") subList.push(leasesTime);//租赁时间
if (subInfo == "area") subList.push(enterprise_leases[0].area+"㎡");//租赁面积
if (subInfo == "building") subList.push(enterprise_leases[0].building);//楼号
if (subInfo == "roomNumber") subList.push(enterprise_leases[0].roomNumber);//室号
});
......@@ -989,7 +1109,7 @@ export async function dwEnterpriseOutTable(enterpriseName: string, type: number,
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber" ,"building"], where:{} };
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType"], where: { state:enumConfig.FUHUASTATE.迁出 } };
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType", "startTime", "endTime"], where: { state:enumConfig.FUHUASTATE.迁出 } };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
......
......@@ -10,62 +10,76 @@ import { getMySqlMs, randomId } from "../tools/system";
import { BizError } from "../util/bizError";
import { eccFormParam } from "../util/verificationParam";
import { PolicyUpdateConfig } from "../config/eccParam/enterprise";
import { POLICYTYPE } from "../config/enum/enum";
import { changeEnumValue } from "../util/verificationEnum";
export async function enterprisePolicyList(keywords:string, state:number, page:number) {
let selectParam:any = {};
/**
* 政策列表
* @param keywords 模糊搜索关键词
* @param state 筛选状态: 1=进行中 2=往期 其他=全部
* @param policyType 筛选政策类型: 1=财政补贴 2=资质申报 3=政策扶持
* @param page 页码
*/
export async function enterprisePolicyList(keywords:string, state:number, policyType:number, page:number) {
let selectParam:any = {};
if (keywords) selectParam.title = {"%like%":keywords};
let filesList = ["poId", "title", "source", "createTimeMs", "closeTimeMs", "isPermanent","coverImg"];
if (policyType) selectParam.policyType = policyType;//政策类型
let filesList = ["poId", "title", "source", "createTimeMs", "closeTimeMs", "isPermanent","coverImg" ,"policyType"];
let resList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.政策表, selectParam, filesList, page);
let dataCount = await selectData(OPERATIONALDATATYPE.查询数据量, TABLENAME.政策表, selectParam, null);
let dataList = [];
const now = moment().valueOf(); // 获取当前时间戳
resList.forEach(info => {
let closeTimeMs = info.closeTimeMs;
if (info.isPermanent == 1) closeTimeMs = '永久有效';
if (!info.closeTimeMs) closeTimeMs = "-";
// 格式化日期前检查closeTimeMs是否为'永久有效'或'-'
let formattedCloseTimeMs = closeTimeMs === '永久有效' || closeTimeMs === '-' ? closeTimeMs : moment(closeTimeMs).format("YYYY-MM-DD");
// 判断是否为永久有效政策
let formattedCreateTime = "-";
if (info.isPermanent == 1) formattedCreateTime = "永久有效";
else formattedCreateTime = moment(info.closeTimeMs).format("YYYY-MM-DD");
// 判断政策是进行中还是往期
let status = '';
if (info.isPermanent == 1) {
status = '进行中';
} else if (closeTimeMs === '-') {
status = '进行中';
status = '正在进行';
} else {
const policyEndTime = moment(closeTimeMs).valueOf();
status = policyEndTime >= now ? '进行中' : '往期';
if (info.closeTimeMs > getMySqlMs()) {
status = '正在进行';
}
if (getMySqlMs() > info.closeTimeMs) {
status = '已结束';
}
}
if (state == 1) {
if (info.isPermanent == 1 || closeTimeMs > getMySqlMs()) {
if (info.isPermanent == 1 || info.closeTimeMs > getMySqlMs()) {
dataList.push({
poId:info.poId,
title:info.title,
source:info.source,
createTimeMs: info.createTimeMs ? moment(info.createTimeMs).format("YYYY-MM-DD") : "-",
closeTimeMs:formattedCloseTimeMs,
closeTimeMs:formattedCreateTime,
isPermanent: info.isPermanent,
policyType: changeEnumValue(POLICYTYPE, info.policyType),//政策类型
//图片
coverImg:JSON.parse(info.coverImg),
//coverImg:info.coverImg ? JSON.parse(info.coverImg) : [],
status, // 发布状态
});
}
} else if (state == 2) {
if (info.isPermanent == 0 && getMySqlMs() > closeTimeMs) {
if (info.isPermanent == 0 && getMySqlMs() > info.closeTimeMs) {
dataList.push({
poId:info.poId,
title:info.title,
source:info.source,
createTimeMs: info.createTimeMs ? moment(info.createTimeMs).format("YYYY-MM-DD") : "-",
closeTimeMs:formattedCloseTimeMs,
closeTimeMs:formattedCreateTime,
isPermanent: info.isPermanent,
policyType: changeEnumValue(POLICYTYPE, info.policyType),//政策类型
//图片
coverImg:JSON.parse(info.coverImg),
//coverImg:info.coverImg ? JSON.parse(info.coverImg) : [],
status, // 发布状态
});
}
} else {
......@@ -74,24 +88,36 @@ export async function enterprisePolicyList(keywords:string, state:number, page:n
title:info.title,
source:info.source,
createTimeMs: info.createTimeMs ? moment(info.createTimeMs).format("YYYY-MM-DD") : "-",
closeTimeMs:formattedCloseTimeMs,
closeTimeMs:formattedCreateTime,
isPermanent: info.isPermanent,
policyType: changeEnumValue(POLICYTYPE, info.policyType),//政策类型
//图片
coverImg:JSON.parse(info.coverImg),
//coverImg:info.coverImg ? JSON.parse(info.coverImg) : [],
status, // 发布状态
});
}
});
return {dataList, dataCount};
}
export async function enterprisePolicyInfo(poId:string) {
let filesList = ["poId", "title", "source", "createTimeMs", "closeTimeMs", "isPermanent", "coverImg", "desc"];
let filesList = ["poId", "title", "source", "createTimeMs", "closeTimeMs", "isPermanent", "coverImg", "desc", "policyType"];
let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.政策表, {poId}, filesList);
let status = '';
if (resInfo.isPermanent == 1) {
status = '正在进行';
} else if (resInfo.closeTimeMs > getMySqlMs()) {
status = '正在进行';
} else {
status = '已结束';
}
let dataInfo = {
title:resInfo.title,
source:resInfo.source,
......@@ -99,9 +125,13 @@ export async function enterprisePolicyInfo(poId:string) {
coverImg:resInfo.coverImg ? JSON.parse(resInfo.coverImg) : [],
// closeTimeMs:new Date(resInfo.closeTimeMs).valueOf(),
closeTimeMs: resInfo.closeTimeMs ? new Date(resInfo.closeTimeMs).valueOf() : null,
isPermanent:resInfo.isPermanent
isPermanent:resInfo.isPermanent,
policyType:resInfo.policyType,//政策类型
// policyType: changeEnumValue(POLICYTYPE, resInfo.policyType),
status, // 发布状态
};
return {dataInfo};
}
......@@ -125,6 +155,8 @@ export async function enterprisePolicyUpdate(poId:string, param) {
if (!param.coverImg) param.coverImg = '[]';
else param.coverImg = JSON.stringify(param.coverImg);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.政策表, param, {poId});
return {isSuccess:true};
......@@ -140,6 +172,7 @@ export async function enterprisePolicyAdd( param) {
else param.coverImg = JSON.stringify(param.coverImg);
param.poId = randomId(TABLEID.政策表);
param.createTimeMs = getMySqlMs();
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.政策表, param, {});
return {isSuccess:true};
......
......@@ -21,7 +21,8 @@ export const PolicyUpdateConfig = {
source:{type:"String"},// 来源
coverImg:{type:"[String]"},// 图片
closeTimeMs:{type:"Number"},// 关闭时间
isPermanent:{type:"Number"}//是否永久有效
isPermanent:{type:"Number"},//是否永久有效
policyType:{type:"Number"},// 政策类型
}
......@@ -61,31 +62,24 @@ export const RegisterUpdateConfig = {
}
export const AdminRegisterAddConfig = {
// enterpriseName:{type:"String"},//企业名称
// uscc:{type:"String"},//统一信用代码
// logonTime:{type:"Number"},//注册日期
// logonAddress:{type:"String"},//注册地址
// fuHuaTimeStart:{type:"Number"},//孵化开始时间
// fuHuaTimeEndTime:{type:"Number"},//孵化结束时间
// area:{type:"Number"},//面积
enterpriseName:{type:"String"},//企业名称
uscc:{type:"String"},//信用代码
logonTime:{type:"Number"},//注册时间
logonAddress:{type:"String"},//注册地址
fuHuaTimeStart:{type:"Number"},//孵化开始时间
fuHuaTimeEndTime:{type:"Number"},//孵化结束时间
area:{type:"Number"},//面积
enterpriseName:{type:"String",required: true, message: '企业名称不能为空'},//企业名称
uscc:{type:"String",required: true, message: '统一信用代码不能为空'},//信用代码
logonTime:{type:"Number",required: true, message: '注册时间不能为空'},//注册时间
logonAddress:{type:"String",required: true, message: '注册地址不能为空'},//注册地址
fuHuaTimeStart:{type:"Number",required: true, message: '孵化开始时间不能为空'},//孵化开始时间
fuHuaTimeEndTime:{type:"Number",required: true, message: '孵化结束时间不能为空'},//孵化结束时间
area:{type:"Number", required: false},//面积非必填
// unitPrice:{type:"Number"},//单价
roomNumber:{type:"String"},//室号
rent:{type:"Number"},//每月租金
buillding: { type: 'string', required: false }, // 租赁楼号非必填
roomNumber:{type:"String", required: false},//室号非必填
rent:{type:"Number",required: true, message: '每月租金不能为空'},//每月租金
// totalPrice:{type:"Number"},//总价
pwd:{type:"String"},
phone:{type:"String"},
userName:{type:"String"},
pwd:{type:"String",required: true, message: '密码不能为空'},
phone:{type:"String",required: true, message: '手机号码不能为空'},
userName:{type:"String",required: true, message: '用户名不能为空'},
leaseStartTime: { type: 'string', required: true, message: '租赁开始时间不能为空' },
leaseEndTime: { type: 'string', required: true, message: '租赁结束时间不能为空' },
email: { type: 'string', required: true, message: '邮箱地址不能为空' },
buillding: { type: 'string', required: false }, // 租赁楼号非必填
}
......@@ -109,15 +103,17 @@ export const YuYiBaseDataUpdateConfig = {
personCharge:{type:"String"},//负责人
phone:{type:"String"},//手机号码
synopsis:{type:"String"},//简介
totalArea:{type:"String"},//总面积
totalArea:{type:"String"},//孵化器总面积
zaifuArea:{type:"String"},//在孵面积
ziyonArea:{type:"String"},//自用面积
parkArea:{type:"String"},//新增
industrialScale:{type:"String"},
enterpriseNum:{type:"Number"},
totalAssetInvestmentAmount:{type:"String"},
numberOfInstitutionsIntroduced:{type:"String"},
introduceInstitutionalInvestment:{type:"String"}
rentRate:{type:"String"},//出租率
uscc:{type:"String"},//统一信用代码
// ziyonArea:{type:"String"},//自用面积
// parkArea:{type:"String"},//新增
// industrialScale:{type:"String"},
// enterpriseNum:{type:"Number"},
// totalAssetInvestmentAmount:{type:"String"},
// numberOfInstitutionsIntroduced:{type:"String"},
// introduceInstitutionalInvestment:{type:"String"}
}
......@@ -129,7 +125,7 @@ export const UserRegisterAddConfig = {
logonAddress:{type:"String", required: true, message: '注册地址不能为空'},//注册地址
fuHuaTimeStart:{type:"Number", required: true, message: '孵化开始时间不能为空'},//孵化开始时间
fuHuaTimeEndTime:{type:"Number", required: true, message: '孵化结束时间不能为空'},//孵化结束时间
rent:{type:"Number", required: true, message: '每月租金不能为空'},//每月租金1
rent:{type:"Number", required: true, message: '每月租金不能为空'},//每月租金
leaseStartTime: { type: 'string', required: true, message: '租赁开始时间不能为空' },
leaseEndTime: { type: 'string', required: true, message: '租赁结束时间不能为空' },
email: { type: 'string', required: true, message: '邮箱地址不能为空' },
......
......@@ -161,6 +161,25 @@ export enum FINANCINGROUNDS {
}
/**
* 政策类型
*/
export enum POLICYTYPE {
财政补贴 = 1,
资质申报 = 2,
政策扶持 = 3
}
/**
* 园区楼号
*/
export enum BUILDING {
一号楼 = 1,
三号楼 = 3,
四号楼 = 4,
}
export enum OUTCOME {
未解决 = 0,
已解决
......
......@@ -7,8 +7,10 @@ export enum ENTERPRISEBASE {
注册时间 = "logonTime",
注册地址 = "logonAddress",
企业规模 = "qiYeGuiMo",
孵化时间 = "fuHuaTime",
租赁时间 = "startTime",
租赁面积 = "area",
楼号 = "building",
室号 = "roomNumber"
}
......@@ -59,8 +61,11 @@ export enum ENTERPRISEBASEMOVEOUT {
迁出类型 = "moveOutType",
注册地址 = "logonAddress",
企业规模 = "qiYeGuiMo",
孵化时间 = "fuHuaTime",
租赁时间 = "startTime",
租赁面积 = "area"
租赁面积 = "area",
楼号 = "building",
室号 = "roomNumber"
}
......@@ -235,8 +235,8 @@ async function enterpriseLogout(req, res) {
*/
async function policyList(req, res) {
const UserInfo = req.userInfo;
let {keywords, state, page } = req.body
let result = await zhengCeBiz.enterprisePolicyList(keywords, state, page);
let {keywords ,state ,policyType ,page } = req.body
let result = await zhengCeBiz.enterprisePolicyList(keywords ,state ,policyType ,page);
res.success(result);
}
......@@ -333,8 +333,8 @@ async function outPutTalentList(req, res) {
*/
async function enterpriseList(req, res) {
const UserInfo = req.userInfo;
let {enterpriseName, page } = req.body
let result = await zaiFuBiz.enterpriseList(enterpriseName, page);
let {enterpriseName, page ,logonStartTime, logonEndTime ,startTime, endTime ,building } = req.body
let result = await zaiFuBiz.enterpriseList(enterpriseName, page, logonStartTime, logonEndTime, startTime, endTime, building);
res.success(result);
}
......
......@@ -25,6 +25,9 @@ const config = {
"/public/output/enterprisemoveout":outputEnumConfig.ENTERPRISEBASEMOVEOUT,
"/public/iprtypeclientqt":enumConfig.IPRTYPECLIENTQT,// 新增知识产权类型
"/public/iprtypeclientzl":enumConfig.IPRTYPECLIENTZL,// 新增知识产权专利
"/public/policytype":enumConfig.POLICYTYPE,// 政策文件类型
"/public/building":enumConfig.BUILDING,// 园区楼号
// "/public/output/basedata":outputEnumConfig.BASEDATA,
......
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