Commit 8a5753f5 by Zllgogo

no message

parent f278103d
......@@ -365,6 +365,7 @@ export async function getWorthDate() {
uscc:param.uscc,
logonTime:getMySqlMs(param.logonTime),
logonAddress:JSON.stringify(["", "", "", param.logonAddress]),
mail:param.mail,//邮箱
state:0,
register:0
};
......@@ -394,9 +395,12 @@ export async function getWorthDate() {
leaseId:randomId(TABLEID.租赁信息),
area:param.area,
unitPrice:param.unitPrice,
buillding: param.building|| null, // 楼号
roomNumber:param.roomNumber,
startTime:getMySqlMs(param.fuHuaTimeStart), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化开始时间
endTime:getMySqlMs(param.fuHuaTimeEndTime), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化结束时间
// startTime:getMySqlMs(param.fuHuaTimeStart), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化开始时间
// endTime:getMySqlMs(param.fuHuaTimeEndTime), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化结束时间
startTime: getMySqlMs(param.leaseStartTime), // 租赁开始时间
endTime: getMySqlMs(param.leaseEndTime), // 租赁结束时间
rent:param.rent,
}
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.租赁信息, leaseInfo, {});
......
......@@ -17,9 +17,16 @@ import { changeEnumValue } from "../util/verificationEnum";
//=======================================================新入孵企业
export async function settleInEnterpriseList(page:number, enterpriseName:string) {
let selectParam:any = {state:enumConfig.STATE., register:enumConfig.STATE.};
/**
* 入孵申请
* @param page
* @param enterpriseName
* @returns
*/
export async function settleInEnterpriseList(page:number, enterpriseName:string) {
// "%or%":[{"register":enumConfig.REGISTER.是}, {"register":enumConfig.REGISTER.否}]
let selectParam:any = {register:enumConfig.REGISTER., "%or%":[{"state":enumConfig.RUFICAILIAOSTATE.已驳回}, {"state":enumConfig.RUFICAILIAOSTATE.}]};
if (enterpriseName) selectParam.enterpriseName = {"%like%":enterpriseName};
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress"];
......@@ -39,20 +46,26 @@ export async function settleInEnterpriseList(page:number, enterpriseName:string)
uscc:info.uscc,
logonTime:moment(info.logonTime).format("YYYY-MM-DD"),
leaseTime:`${moment(info.enterprise_leases[0].startTime).format("YYYY-MM-DD")}${moment(info.enterprise_leases[0].endTime).format("YYYY-MM-DD")}`,
leaseTimeStart:info.enterprise_leases[0].startTime || 0,
leaseTimeEnd:info.enterprise_leases[0].endTime || 0,
// leaseTimeStart:info.enterprise_leases[0].startTime || 0,
// leaseTimeEnd:info.enterprise_leases[0].endTime || 0,
leaseStart: moment(info.enterprise_leases[0].startTime).format("YYYY-MM-DD"),
leaseEnd: moment(info.enterprise_leases[0].endTime).format("YYYY-MM-DD"),
fuHuaTimeStart:info.enterprise_fuhuas[0].startTime||0,
fuHuaTimeEnd:info.enterprise_fuhuas[0].endTime||0,
area:info.enterprise_leases[0].area,
unitPrice:info.enterprise_leases[0].unitPrice,
roomNumber:info.enterprise_leases[0].roomNumber,
// roomNumber:info.enterprise_leases[0].roomNumber,
building: info.enterprise_leases[0].building || "",// 园区楼号
roomNumber: info.enterprise_leases[0].roomNumber || "",// 室号
rent:info.enterprise_leases[0].rent,
logonAddress:changeAdd(JSON.parse(info.logonAddress)),
userName:info.enterprise_users[0].userName,
pwd:info.enterprise_users[0].pwd,
phone:info.enterprise_users[0].phone,
uId:info.enterprise_users[0].uId,
totalPrice: info.enterprise_leases[0].totalPrice // 添加年总价字段
totalPrice: info.enterprise_leases[0].totalPrice, // 添加年总价字段
status: info.register === enumConfig.REGISTER.已驳回 ? "已驳回" : "未审核" // 状态映射
});
});
......@@ -66,7 +79,7 @@ export async function settleInEnterprisePass(eId:string) {
if (!resInfo || !resInfo.eId) {
throw new BizError(ERRORENUM.数据不存在);
}
if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
let updateInfo = {
register:enumConfig.STATE.,
......@@ -137,23 +150,37 @@ export async function settleInEnterpriseOut(eId:string) {
if (!resInfo || !resInfo.eId) {
throw new BizError(ERRORENUM.数据不存在);
}
if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业用户表, {}, {eId});//
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业孵化信息, {}, {eId});
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.租赁信息, {}, {eId});
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业基础信息表, {}, {eId});
await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业用户表, {}, {eId});//
await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业孵化信息, {}, {eId});
await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.租赁信息, {}, {eId});
await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业基础信息表, {}, {eId});
await operationalData(
OPERATIONALDATATYPE.修改,
TABLENAME.企业基础信息表,
{ register: enumConfig.STATE., state: enumConfig.REGISTER.已驳回 },
{ eId }
);
return {isSuccess:true};
}
//入孵信息审核
/**
* 入孵材料审核
* @param enterpriseName
* @param page
* @returns
*/
export async function enterpriseRegisterExamineList(enterpriseName, page) {
let selectParam:any = {register:enumConfig.STATE., state:enumConfig.STATE.};
// let selectParam:any = {register:enumConfig.STATE.是, state:enumConfig.STATE.否};
let selectParam:any = {register:enumConfig.REGISTER., "%or%":[{"state":enumConfig.RUFICAILIAOSTATE.已驳回}, {"state":enumConfig.RUFICAILIAOSTATE.}]};
if (enterpriseName) selectParam.enterpriseName = {"%like%":enterpriseName};
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "randomCode"];
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "randomCode", "state"];
let manyTableInfo:any = {}
manyTableInfo[TABLENAME.租赁信息] = {column:["leaseContract", "entryPlan", "businessLicense", "agreement"], where:{} };
......@@ -170,10 +197,13 @@ export async function enterpriseRegisterExamineList(enterpriseName, page) {
leaseContract:info.enterprise_leases[0].leaseContract || "未提交",
entryPlan:info.enterprise_leases[0].entryPlan || "未提交",
businessLicense:info.enterprise_leases[0].businessLicense || "未提交",
agreement:info.enterprise_leases[0].agreement || "未提交"
agreement:info.enterprise_leases[0].agreement || "未提交",
status: info.register === enumConfig.REGISTER.已驳回 ? "已驳回" : "未审核" // 状态映射
});
});
return {dataList, dataCount:allResList.length};
}
......@@ -191,7 +221,7 @@ export async function enterpriseRegisterExaminePass(eId:string) {
if (!resInfo.enterprise_leases[0].leaseContract || !resInfo.enterprise_leases[0].entryPlan || !resInfo.enterprise_leases[0].businessLicense || !resInfo.enterprise_leases[0].agreement) {
throw new BizError(ERRORENUM.请上传所有入孵材料);
}
if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
let updateInfo = {
state:enumConfig.STATE.
......@@ -237,7 +267,7 @@ export async function enterpriseRegisterExamineOut(eId:string) {
if (!resInfo || !resInfo.eId) {
throw new BizError(ERRORENUM.数据不存在);
}
if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
let updateLeaseInfo = {
leaseContract:null,
......@@ -248,7 +278,8 @@ export async function enterpriseRegisterExamineOut(eId:string) {
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.租赁信息, updateLeaseInfo, {eId});
let updateInfo = {
register:enumConfig.STATE.
register:enumConfig.REGISTER.,
state:enumConfig.RUFICAILIAOSTATE.已驳回,
// register:2
}
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
......@@ -300,3 +331,272 @@ export async function enterpriseRegister(param) {
return {isSuccess:true};
}
/**
* 备份
*/
// /**
// * 新入孵
// */
// import { ApplyForUpdateConfig, GardenNoticeUpdateConfig, PolicyUpdateConfig, RegisterUpdateConfig, SettleInForUpdateConfig } from "../config/eccParam/enterprise";
// import { OPERATIONALDATATYPE, TABLEID, TABLENAME } from "../config/enum/dbEnum";
// import * as enumConfig from "../config/enum/enum";
// import { operationalData, selectData, selectManyTableData } from "../data/operationalData";
// import { BizError } from "../util/bizError";
// import { eccFormParam } from "../util/verificationParam";
// import { ERRORENUM } from "../config/enum/errorEnum";
// import { getMySqlMs, getToken, md5PwdStr, randomCode, randomId } from "../tools/system";
// import moment = require("moment");
// import { changeAdd, extractData } from "../util/piecemeal";
// import { EnterpriseApplyForConfig } from "../config/splitResult/enterprise";
// import { changeEnumValue } from "../util/verificationEnum";
// //=======================================================新入孵企业
// export async function settleInEnterpriseList(page:number, enterpriseName:string) {
// let selectParam:any = {state:enumConfig.STATE.否, register:enumConfig.STATE.否};
// if (enterpriseName) selectParam.enterpriseName = {"%like%":enterpriseName};
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress"];
// let manyTableInfo:any = {}
// manyTableInfo[TABLENAME.租赁信息] = {column:["area", "unitPrice", "roomNumber", "rent", "totalPrice"], where:{} };
// manyTableInfo[TABLENAME.企业孵化信息] = {column:["state", "startTime", "endTime"], where:{} };
// manyTableInfo[TABLENAME.企业用户表] = {column:["userName", "pwd", "phone", "uId"], where:{} };
// let resList = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page );
// let allResList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId"], manyTableInfo );
// let dataList = [];
// resList.forEach(info => {
// dataList.push({
// eId:info.eId,
// enterpriseName:info.enterpriseName,
// uscc:info.uscc,
// logonTime:moment(info.logonTime).format("YYYY-MM-DD"),
// leaseTime:`${moment(info.enterprise_leases[0].startTime).format("YYYY-MM-DD")}至${moment(info.enterprise_leases[0].endTime).format("YYYY-MM-DD")}`,
// leaseTimeStart:info.enterprise_leases[0].startTime || 0,
// leaseTimeEnd:info.enterprise_leases[0].endTime || 0,
// fuHuaTimeStart:info.enterprise_fuhuas[0].startTime||0,
// fuHuaTimeEnd:info.enterprise_fuhuas[0].endTime||0,
// area:info.enterprise_leases[0].area,
// unitPrice:info.enterprise_leases[0].unitPrice,
// roomNumber:info.enterprise_leases[0].roomNumber,
// rent:info.enterprise_leases[0].rent,
// logonAddress:changeAdd(JSON.parse(info.logonAddress)),
// userName:info.enterprise_users[0].userName,
// pwd:info.enterprise_users[0].pwd,
// phone:info.enterprise_users[0].phone,
// uId:info.enterprise_users[0].uId,
// totalPrice: info.enterprise_leases[0].totalPrice // 添加年总价字段
// });
// });
// return {dataList, dataCount:allResList.length};
// }
// export async function settleInEnterprisePass(eId:string) {
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "state"];
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
// if (!resInfo || !resInfo.eId) {
// throw new BizError(ERRORENUM.数据不存在);
// }
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// let updateInfo = {
// register:enumConfig.STATE.是,
// randomCode:randomCode()
// }
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
// return {isSuccess:true};
// }
// export async function settleInEnterpriseUpdate(eId:string, param) {
// const FuncName = "修改入驻信息";
// eccFormParam(FuncName, SettleInForUpdateConfig, param );
// let userInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业用户表, {phone:param.phone}, ["uId"]);
// if (userInfo && userInfo.uId && userInfo.uId != param.uId) throw new BizError(ERRORENUM.手机号码重复);
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "state"];
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
// if (!resInfo || !resInfo.eId) {
// throw new BizError(ERRORENUM.数据不存在);
// }
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// let updateInfo = {
// enterpriseName:param.enterpriseName,
// uscc:param.uscc,
// logonTime:param.logonTime,
// logonAddress:JSON.stringify(["", "", "", param.logonAddress]),
// };
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
// let fuHuaInfo = {
// startTime:param.fuHuaTimeStart,
// endTime:param.fuHuaTimeEndTime,
// };
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业孵化信息, fuHuaInfo, {eId});
// let leaseInfo = {
// area:param.area,
// // unitPrice:param.unitPrice,
// // unitPrice:param.rent / param.area,// 计算单价
// //如果 param.rent 和 param.area 都存在且不为零,则计算 unitPrice 为 param.rent 除以 param.area;否则,直接使用 param.unitPrice。
// unitPrice: param.rent && param.area ? param.rent / param.area : param.unitPrice,
// rent:param.rent,
// startTime: param.fuHuaTimeStart, //租赁开始日期
// endTime: param.fuHuaTimeEndTime, //租赁结束日期
// }
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.租赁信息, leaseInfo, {eId});
// let addUInfo = {
// phone:param.phone,
// pwd:param.pwd,
// userName:param.userName
// };
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业用户表, addUInfo, {eId, uId:param.uId});
// return {isSuccess:true};
// }
// export async function settleInEnterpriseOut(eId:string) {
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "state"];
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
// if (!resInfo || !resInfo.eId) {
// throw new BizError(ERRORENUM.数据不存在);
// }
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业用户表, {}, {eId});//
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业孵化信息, {}, {eId});
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.租赁信息, {}, {eId});
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业基础信息表, {}, {eId});
// return {isSuccess:true};
// }
// //入孵信息审核
// export async function enterpriseRegisterExamineList(enterpriseName, page) {
// let selectParam:any = {register:enumConfig.STATE.是, state:enumConfig.STATE.否};
// if (enterpriseName) selectParam.enterpriseName = {"%like%":enterpriseName};
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "randomCode"];
// let manyTableInfo:any = {}
// manyTableInfo[TABLENAME.租赁信息] = {column:["leaseContract", "entryPlan", "businessLicense", "agreement"], where:{} };
// manyTableInfo[TABLENAME.企业孵化信息] = {column:["state", "startTime", "endTime"], where:{} };
// let resList = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page );
// let allResList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, ["eId"], manyTableInfo );
// let dataList = [];
// resList.forEach(info => {
// dataList.push({
// eId:info.eId,
// enterpriseName:info.enterpriseName,
// randomCode:info.randomCode,
// leaseContract:info.enterprise_leases[0].leaseContract || "未提交",
// entryPlan:info.enterprise_leases[0].entryPlan || "未提交",
// businessLicense:info.enterprise_leases[0].businessLicense || "未提交",
// agreement:info.enterprise_leases[0].agreement || "未提交"
// });
// });
// return {dataList, dataCount:allResList.length};
// }
// export async function enterpriseRegisterExaminePass(eId:string) {
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "state"];
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
// if (!resInfo || !resInfo.eId) {
// throw new BizError(ERRORENUM.数据不存在);
// }
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// let updateInfo = {
// state:enumConfig.STATE.是
// };
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
// let updateFuHuaInfo = {
// state:enumConfig.FUHUASTATE.实体孵化
// };
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业孵化信息, updateFuHuaInfo, {eId});
// return {isSuccess:true};
// }
// export async function enterpriseRegisterExamineOut(eId:string) {
// let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "state"];
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
// if (!resInfo || !resInfo.eId) {
// throw new BizError(ERRORENUM.数据不存在);
// }
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
// let updateInfo = {
// register:2
// }
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
// return {isSuccess:true};
// }
// export async function enterpriseRegister(param) {
// const FuncName = "企业注册"
// eccFormParam(FuncName, RegisterUpdateConfig, param );
// let filesList = ["eId", ];
// let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {uscc:param.uscc}, filesList);
// if (enterpriseUserInfo && enterpriseUserInfo.eId) {
// throw new BizError(ERRORENUM.企业已存在);
// }
// let addEInfo = {
// eId:randomId(TABLEID.企业基础信息表),
// enterpriseName:param.enterpriseName,
// logonAddress:JSON.stringify(["", "", "", param.logonAddress]),
// uscc:param.uscc,
// logonTime:getMySqlMs(param.logonTime),
// state:0,
// register:0,
// rent: param.rent
// };
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {});
// let fuHuaInfo = {
// eId:addEInfo.eId,
// fId:randomId(TABLEID.企业孵化信息)
// };
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业孵化信息, fuHuaInfo, {});
// let leaseInfo = {
// eId:addEInfo.eId,
// leaseId:randomId(TABLEID.租赁信息),
// startTime:getMySqlMs(param.leaseTimeStart),
// endTime:getMySqlMs(param.leaseTimeEnd),
// area:param.area
// }
// await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.租赁信息, leaseInfo, {});
// return {isSuccess:true};
// }
......@@ -118,6 +118,7 @@ export async function createRuFu(uId, param) {
uscc:param.uscc,
logonTime:getMySqlMs(param.logonTime),
logonAddress:JSON.stringify(["", "", "", param.logonAddress]),
mail:param.mail,//邮箱地址
state:0,
register:0
};
......@@ -137,15 +138,29 @@ export async function createRuFu(uId, param) {
let leaseInfo = {
eId:addEInfo.eId,
leaseId:randomId(TABLEID.租赁信息),
area:param.area,
// area:param.area,
area: param.area || null, // 可为空
unitPrice:param.unitPrice,
roomNumber:param.roomNumber,
startTime:getMySqlMs(param.fuHuaTimeStart), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化开始时间
endTime:getMySqlMs(param.fuHuaTimeEndTime), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化结束时间
// roomNumber:param.roomNumber,
buillding: param.building|| null, // 楼号
roomNumber: param.roomNumber || null,// 室号
// startTime:getMySqlMs(param.fuHuaTimeStart), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化开始时间
// endTime:getMySqlMs(param.fuHuaTimeEndTime), //小程序和管理后台没有填写租赁时间的位置,直接使用孵化结束时间
startTime: getMySqlMs(param.leaseStartTime), // 租赁开始时间
endTime: getMySqlMs(param.leaseEndTime), // 租赁结束时间
rent:param.rent,
}
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.租赁信息, leaseInfo, {});
let addUInfo = {
eId:addEInfo.eId,
uId:randomId(TABLEID.企业用户表),
phone:param.phone,
pwd:param.pwd,
userName:param.userName
};
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业用户表, addUInfo, {});
return {eId:addEInfo.eId};
}
......
......@@ -23,7 +23,7 @@ export async function enterpriseList(enterpriseName:string, page:number) {
let manyTableInfo:any = {};
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "startTime", "endTime", "roomNumber"], where:{} };
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType"], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType","startTime" ,"endTime"], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page);
......@@ -32,12 +32,17 @@ export async function enterpriseList(enterpriseName:string, page:number) {
let dataList = [];
resInfo.forEach(info => {
let {eId, enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases} = 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, //企业名称
......@@ -45,8 +50,10 @@ export async function enterpriseList(enterpriseName:string, page:number) {
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);
......@@ -138,6 +145,11 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
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, //企业名称
......@@ -148,7 +160,9 @@ export async function enterpriseMigrateList(enterpriseName:string, page:number)
moveOutType:formattedMoveOutTypeName,//新增迁出类型
qiYeGuiMo,//企业规模
leasesTime,//租赁时间
fuhuaTime,//孵化时间
area:enterprise_leases[0].area+"㎡",//租赁面积
building:enterprise_leases[0].building,//楼号
roomNumber:enterprise_leases[0].roomNumber,//室号
};
dataList.push(dataInfo);
......@@ -582,9 +596,9 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
let filesList = ["eId", "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:{} };
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType"], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType", "startTime", "endTime",], where: { state:{"%ne%": enumConfig.FUHUASTATE.迁出} } };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo);
......@@ -597,11 +611,17 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
});
dataList.push(titleList);
resInfo.forEach(info => {
let {enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases} = info;
let {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 subList = [];
valueList.forEach(subInfo => {
if (subInfo == "enterpriseName") subList.push(enterpriseName);//企业名称
......@@ -609,8 +629,10 @@ export async function dwEnterpriseTable(enterpriseName:string, type:number, file
if (subInfo == "logonTime") subList.push(moment(logonTime).format("YYYY-MM-DD"));//注册日期
if (subInfo == "logonAddress") subList.push(changeAdd(JSON.parse(logonAddress)));//注册地址
if (subInfo == "qiYeGuiMo") subList.push(qiYeGuiMo);//企业规模
if (subInfo == "startTime") subList.push(leasesTime);//孵化时间
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);//室号
});
......@@ -669,11 +691,15 @@ export async function dwBasicInformation(eId:string) {
});
dataList.push(titleList);
resInfo.forEach(info => {
let {enterpriseName, uscc, logonTime, logonAddress, qiYeGuiMo, enterprise_leases} = info;
let {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 subList = [];
valueList.forEach(subInfo => {
if (subInfo == "enterpriseName") subList.push(enterpriseName);//企业名称
......@@ -681,7 +707,8 @@ export async function dwBasicInformation(eId:string) {
if (subInfo == "logonTime") subList.push(moment(logonTime).format("YYYY-MM-DD"));//注册日期
if (subInfo == "logonAddress") subList.push(changeAdd(JSON.parse(logonAddress)));//注册地址
if (subInfo == "qiYeGuiMo") subList.push(qiYeGuiMo);//企业规模
if (subInfo == "startTime") subList.push(leasesTime);//孵化时间
if (subInfo == "startTime") subList.push(fuhuaTime);//孵化时间
if (subInfo == "startTime") subList.push(leasesTime);//租赁时间
if (subInfo == "area") subList.push(enterprise_leases[0].area+"㎡");//租赁面积
if (subInfo == "roomNumber") subList.push(enterprise_leases[0].roomNumber);//室号
});
......@@ -959,7 +986,7 @@ export async function dwEnterpriseOutTable(enterpriseName: string, type: number,
let filesList = ["eId", "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:{} };
// 关联企业孵化信息表,获取 moveOutTime 字段
manyTableInfo[TABLENAME.企业孵化信息] = { column: ["moveOutTime","moveOutType"], where: { state:enumConfig.FUHUASTATE.迁出 } };
......@@ -991,6 +1018,10 @@ export async function dwEnterpriseOutTable(enterpriseName: string, type: number,
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 subList = [];
valueList.forEach(subInfo => {
......@@ -999,8 +1030,10 @@ export async function dwEnterpriseOutTable(enterpriseName: string, type: number,
if (subInfo == "logonTime") subList.push(moment(logonTime).format("YYYY-MM-DD")); //注册日期
if (subInfo == "logonAddress") subList.push(changeAdd(JSON.parse(logonAddress))); //注册地址
if (subInfo == "qiYeGuiMo") subList.push(qiYeGuiMo); //企业规模
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); //室号
if (subInfo == "moveOutTime") subList.push(formattedMoveOutTime); //迁出时间
if (subInfo == "moveOutType") subList.push(formattedMoveOutTypeName); //迁出类型
......
......@@ -68,7 +68,7 @@ export const AdminRegisterAddConfig = {
// fuHuaTimeStart:{type:"Number"},//孵化开始时间
// fuHuaTimeEndTime:{type:"Number"},//孵化结束时间
// area:{type:"Number"},//面积
enterpriseName:{type:"String"},
enterpriseName:{type:"String"},//企业名称
uscc:{type:"String"},//信用代码
logonTime:{type:"Number"},//注册时间
logonAddress:{type:"String"},//注册地址
......@@ -81,7 +81,11 @@ export const AdminRegisterAddConfig = {
// totalPrice:{type:"Number"},//总价
pwd:{type:"String"},
phone:{type:"String"},
userName:{type:"String"}
userName:{type:"String"},
leaseStartTime: { type: 'string', required: true, message: '租赁开始时间不能为空' },
leaseEndTime: { type: 'string', required: true, message: '租赁结束时间不能为空' },
email: { type: 'string', required: true, message: '邮箱地址不能为空' },
buillding: { type: 'string', required: false }, // 租赁楼号非必填
}
......@@ -119,14 +123,35 @@ export const YuYiBaseDataUpdateConfig = {
export const UserRegisterAddConfig = {
enterpriseName:{type:"String"},
uscc:{type:"String"},//信用代码
logonTime:{type:"Number"},//注册时间
logonAddress:{type:"String"},//注册地址
fuHuaTimeStart:{type:"Number"},//孵化开始时间
fuHuaTimeEndTime:{type:"Number"},//孵化结束时间
area:{type:"Number"},//面积
roomNumber:{type:"String"},//室号
rent:{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: '孵化结束时间不能为空'},//孵化结束时间
rent:{type:"Number", required: true, message: '每月租金不能为空'},//每月租金1
leaseStartTime: { type: 'string', required: true, message: '租赁开始时间不能为空' },
leaseEndTime: { type: 'string', required: true, message: '租赁结束时间不能为空' },
email: { type: 'string', required: true, message: '邮箱地址不能为空' },
userName: { type: 'string', required: true, message: '联系人不能为空' },
phone: { type: 'string', required: true, message: '登录手机号码不能为空' },
pwd: { type: 'string', required: true, message: '登录密码不能为空' },
buillding: { type: 'string', required: false }, // 租赁楼号非必填
roomNumber: { type: 'string', required: false }, // 租赁室号非必填
area: { type: 'number', required: false }, // 租赁面积非必填
}
/**
* 备份
*/
// export const UserRegisterAddConfig = {
// enterpriseName:{type:"String"},
// uscc:{type:"String"},//信用代码
// logonTime:{type:"Number"},//注册时间
// logonAddress:{type:"String"},//注册地址
// fuHuaTimeStart:{type:"Number"},//孵化开始时间
// fuHuaTimeEndTime:{type:"Number"},//孵化结束时间
// area:{type:"Number"},//面积
// roomNumber:{type:"String"},//室号
// rent:{type:"Number"},//每月租金
// }
\ No newline at end of file
......@@ -169,7 +169,27 @@ export enum OUTCOME {
export enum STATE {
= 0,
,
}
/**
* 入孵申请
*/
export enum REGISTER {
= 0,//未审核
= 1,//已通过
已驳回 = 2
}
/**
* 入孵材料审核
*/
export enum RUFICAILIAOSTATE {
= 0,
,
已驳回,
}
......
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