Commit 6868e98e by Zllgogo

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

# Conflicts:
#	src/biz/ruFu.ts
parents 309134f9 6562ac3e
......@@ -96,8 +96,8 @@ export async function 获取规模(uscc) {
export async function qccData() {
// test();
统计();
return
// 统计();
// return
let iMap = await 领域补充();
let 企业名单 = onceSheetBecomeOfblockData('在孵企业导入1210.xlsx', "Sheet1");
let dataList = 企业名单[0].blockData;
......@@ -107,7 +107,7 @@ export async function qccData() {
let uscc = dataList[i][6];
if (!iMap[uscc]) console.log(dataList[i][0]);
continue;
// continue;
await awaitData(uscc);
console.log(`${dataList[i][1]} 同步成功, 下标 ${i}`);
}
......@@ -144,19 +144,19 @@ async function addManyData(tableName, dataList) {
async function awaitData(uscc:string) {
await 工商信息(uscc);
await 软件著作(uscc);
// await 主要人员(uscc);
// await 分支机构(uscc);
// await 行政许可核查(uscc);
// await 空壳扫描(uscc);
// await 准入尽职调查(uscc);
// await 融资信息核查(uscc);
await 主要人员(uscc);
await 分支机构(uscc);
await 行政许可核查(uscc);
await 空壳扫描(uscc);
await 准入尽职调查(uscc);
await 融资信息核查(uscc);
await 国际专利(uscc);
// await 科创分(uscc);
// await 资质证书(uscc);
// await 专利查询(uscc);
// await 失信核查(uscc);
// await 严重违法核查(uscc);
// await 企业对外投资核查(uscc);
await 科创分(uscc);
await 资质证书(uscc);
await 专利查询(uscc);
await 失信核查(uscc);
await 严重违法核查(uscc);
await 企业对外投资核查(uscc);
console.log("企查查数据同步成功");
}
......
......@@ -44,7 +44,7 @@ import { changeEnumValue } from "../util/verificationEnum";
logonAddress:JSON.stringify(["", "", "", param.logonAddress]),
mail:param.mail,//邮箱地址
state:0,
register:0
register:enumConfig.CHANGESTATE.未审核
};
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {});
......@@ -102,8 +102,8 @@ import { changeEnumValue } from "../util/verificationEnum";
* @returns
*/
export async function settleInEnterpriseList(page:number, enterpriseName:string) {
// let selectParam:any = {register:enumConfig.REGISTER.否, "%or%":[{"state":enumConfig.RUFICAILIAOSTATE.已驳回}, {"state":enumConfig.RUFICAILIAOSTATE.否}]};
let selectParam:any = {register:enumConfig.STATE., state:enumConfig.STATE.};
let selectParam:any = {state:enumConfig.CHANGESTATE.未审核, "%or%":[{register:enumConfig.CHANGESTATE.未审核}, {register:enumConfig.CHANGESTATE.已驳回}]};
// let selectParam:any = {register:enumConfig.CHANGESTATE.未审核, state:enumConfig.CHANGESTATE.未审核};
if (enterpriseName) selectParam.enterpriseName = {"%like%":enterpriseName};
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "mail"];
......@@ -118,7 +118,6 @@ export async function settleInEnterpriseList(page:number, enterpriseName:string)
let dataList = [];
resList.forEach(info => {
dataList.push({
eId:info.eId,
enterpriseName:info.enterpriseName,//企业名称
......@@ -144,10 +143,9 @@ export async function settleInEnterpriseList(page:number, enterpriseName:string)
mail:info.mail,//邮箱地址
uId:info.enterprise_users[0].uId,
// totalPrice: info.enterprise_leases[0].totalPrice, // 添加年总价字段——暂时没用
// status: info.approval_historys.changeState === enumConfig.CHANGESTATE.已驳回 ? "已驳回" : "未审核" // 状态映射 todo
status: info.register === enumConfig.CHANGESTATE.已驳回 ? "已驳回" : "未审核" // 状态映射
});
});
return {dataList, dataCount:allResList.length};
......@@ -169,7 +167,7 @@ export async function settleInEnterprisePass(eId:string) {
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
let updateInfo = {
register:enumConfig.STATE.,
register:enumConfig.CHANGESTATE.已通过,
randomCode:randomCode()
}
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
......@@ -188,43 +186,47 @@ export async function settleInEnterprisePass(eId:string) {
/**
* 入孵材料回显
* 入孵申请回显
* @param eId
* @returns
*/
export async function getRuFu(eId:string) {
let filesList = ["eId", "uscc", "enterpriseName", "logonAddress", "logonTime"];
let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
export async function settleInEnterpriseById(eId:string) {
let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, []);
if (!enterpriseUserInfo || !enterpriseUserInfo.eId) {
throw new BizError(ERRORENUM.请先申请入孵);
}
let leaseFilesList = ["leaseId", "area", "leaseContract", "entryPlan", "businessLicense", "agreement"];
let leaseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.租赁信息, {eId}, leaseFilesList);
enterpriseUserInfo.logonAddress = JSON.parse(enterpriseUserInfo.logonAddress);
let zaifuList = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业孵化信息, {eId}, ["startTime", "endTime"]);
let dataInfo:any = extractData(EnterpriseApplyForConfig, enterpriseUserInfo);
dataInfo.logonTime = moment(enterpriseUserInfo.logonTime).format("YYYY-MM-DD");
if (zaifuList.startTime) dataInfo.startTime = new Date(zaifuList.startTime).valueOf(); //孵化开始时间
else dataInfo.startTime = "";
if (zaifuList.endTime) dataInfo.endTime = new Date(zaifuList.endTime).valueOf(); //孵化结束时间
else dataInfo.endTime = "";
dataInfo.area = leaseInfo.area;
// dataInfo.leaseContract = leaseInfo.leaseContract;
// dataInfo.entryPlan = leaseInfo.entryPlan;
// dataInfo.businessLicense = leaseInfo.businessLicense;
// dataInfo.agreement = leaseInfo.agreement;
dataInfo.leaseContract = getFileNameAndFormat(leaseInfo.leaseContract);
dataInfo.entryPlan = getFileNameAndFormat(leaseInfo.entryPlan);
dataInfo.businessLicense = getFileNameAndFormat(leaseInfo.businessLicense);
dataInfo.agreement = getFileNameAndFormat(leaseInfo.agreement);
dataInfo.leaseContractModelUrl = "/yuyi/files/房屋租赁合同模板.docx";
dataInfo.entryPlanModelUrl = "/yuyi/files/孵化企业入驻计划.xlsx";
dataInfo.businessLicenseUrl = "/yuyi/files/营业执照复印件.docx";
dataInfo.agreementModelUrl = "/yuyi/files/孵化协议模板.docx";
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress", "mail"];
let manyTableInfo:any = {}
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "building", "roomNumber", "rent", "startTime", "endTime"], where:{} };
manyTableInfo[TABLENAME.企业孵化信息] = {column:["state", "startTime", "endTime"], where:{} };
manyTableInfo[TABLENAME.企业用户表] = {column:["userName", "pwd", "phone", "uId"], where:{} };
let resList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业基础信息表, {eId}, filesList, manyTableInfo );
let dataInfo = {};
resList.forEach(info => {
dataInfo = {
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")}`,
fuHuaTimeStart:info.enterprise_fuhuas[0].startTime||0, //孵化开始时间
fuHuaTimeEnd:info.enterprise_fuhuas[0].endTime||0, //孵化结束时间
leaseStartTime:info.enterprise_leases[0].startTime || 0, //租赁开始时间
leaseEndTime:info.enterprise_leases[0].endTime || 0, //租赁结束时间
rent:info.enterprise_leases[0].rent,//月租金
area:info.enterprise_leases[0].area,//租赁面积
building: info.enterprise_leases[0].building || "",// 园区楼号
roomNumber: info.enterprise_leases[0].roomNumber || "",// 室号
logonAddress:changeAdd(JSON.parse(info.logonAddress)),//注册地址
userName:info.enterprise_users[0].userName,//联系人
pwd:info.enterprise_users[0].pwd,//登录密码
phone:info.enterprise_users[0].phone,//登录手机号
mail:info.mail,//邮箱地址
uId:info.enterprise_users[0].uId,
};
});
return {dataInfo};
}
......@@ -270,14 +272,8 @@ export async function settleInEnterpriseUpdate(eId:string, param) {
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, //租赁结束日期
startTime:param.leaseStartTimeStart,
endTime:param.leaseEndTime,
building:param.building,
......@@ -316,7 +312,7 @@ export async function settleInEnterpriseOut(eId:string) {
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.租赁信息, {}, {eId});
// await operationalData(OPERATIONALDATATYPE.删除, TABLENAME.企业基础信息表, {}, {eId});
await operationalData( OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, {register: enumConfig.STATE. }, { eId });
await operationalData( OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, {register: enumConfig.CHANGESTATE.已驳回 }, { eId });
let addInfo = {
approvalId: randomId(TABLEID.入孵申请审批表),
......@@ -340,9 +336,8 @@ export async function settleInEnterpriseOut(eId:string) {
* @returns
*/
export async function enterpriseRegisterExamineList(enterpriseName, page) {
let selectParam:any = {register:enumConfig.CHANGESTATE.已通过, "%or%":[{state:enumConfig.CHANGESTATE.未审核}, {state:enumConfig.CHANGESTATE.已驳回}]};
// let selectParam:any = {register:enumConfig.STATE.是, state:enumConfig.STATE.否};
// let selectParam:any = {register:enumConfig.STATE.是, "%or%":[{"state":enumConfig.RUFICAILIAOSTATE.已驳回}, {"state":enumConfig.RUFICAILIAOSTATE.否}]};
let selectParam:any = {register:enumConfig.STATE., state:enumConfig.STATE.};
if (enterpriseName) selectParam.enterpriseName = {"%like%":enterpriseName};
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "randomCode", "state"];
......@@ -368,33 +363,57 @@ export async function enterpriseRegisterExamineList(enterpriseName, page) {
entryPlan: getFileNameAndFormat(info.enterprise_leases[0].entryPlan),
businessLicense: getFileNameAndFormat(info.enterprise_leases[0].businessLicense),
agreement: getFileNameAndFormat(info.enterprise_leases[0].agreement),
// status: info.approval_historys.changeState === enumConfig.CHANGESTATE.已驳回 ? "已驳回" : "未审核" // 状态映射 todo
status: info.state === enumConfig.CHANGESTATE.已驳回 ? "已驳回" : "未审核" // 状态映射
});
});
return {dataList, dataCount:allResList.length};
}
// 辅助函数:获取文件名和格式
// function getFileNameAndFormat(fileName: string | null | undefined): string {
// if (fileName === null || fileName === undefined || fileName === "未提交") {
// return "未提交";
// }
// // 提取文件名(去掉路径)
// const basename = fileName.split('/').pop() || fileName;
// // 分割文件名和格式
// const parts = basename.split('.');
// if (parts.length < 2) {
// return basename; // 如果没有找到 . 则直接返回原字符串
// }
// const name = parts.slice(0, -1).join('.');
// const format = parts.pop();
// return `${name}.${format}`;
// }
/**
* 入孵材料回显
* @param eId
* @returns
*/
export async function getRuFu(eId:string) {
let filesList = ["eId", "uscc", "enterpriseName", "logonAddress", "logonTime"];
let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
if (!enterpriseUserInfo || !enterpriseUserInfo.eId) {
throw new BizError(ERRORENUM.请先申请入孵);
}
let leaseFilesList = ["leaseId", "area", "leaseContract", "entryPlan", "businessLicense", "agreement"];
let leaseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.租赁信息, {eId}, leaseFilesList);
enterpriseUserInfo.logonAddress = JSON.parse(enterpriseUserInfo.logonAddress);
let zaifuList = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业孵化信息, {eId}, ["startTime", "endTime"]);
let dataInfo:any = extractData(EnterpriseApplyForConfig, enterpriseUserInfo);
dataInfo.logonTime = moment(enterpriseUserInfo.logonTime).format("YYYY-MM-DD");
if (zaifuList.startTime) dataInfo.startTime = new Date(zaifuList.startTime).valueOf(); //孵化开始时间
else dataInfo.startTime = "";
if (zaifuList.endTime) dataInfo.endTime = new Date(zaifuList.endTime).valueOf(); //孵化结束时间
else dataInfo.endTime = "";
dataInfo.area = leaseInfo.area;
// dataInfo.leaseContract = leaseInfo.leaseContract;
// dataInfo.entryPlan = leaseInfo.entryPlan;
// dataInfo.businessLicense = leaseInfo.businessLicense;
// dataInfo.agreement = leaseInfo.agreement;
dataInfo.leaseContract = getFileNameAndFormat(leaseInfo.leaseContract);
dataInfo.entryPlan = getFileNameAndFormat(leaseInfo.entryPlan);
dataInfo.businessLicense = getFileNameAndFormat(leaseInfo.businessLicense);
dataInfo.agreement = getFileNameAndFormat(leaseInfo.agreement);
dataInfo.leaseContractModelUrl = "/yuyi/files/房屋租赁合同模板.docx";
dataInfo.entryPlanModelUrl = "/yuyi/files/孵化企业入驻计划.xlsx";
dataInfo.businessLicenseUrl = "/yuyi/files/营业执照复印件.docx";
dataInfo.agreementModelUrl = "/yuyi/files/孵化协议模板.docx";
return {dataInfo};
}
function getFileNameAndFormat(fileName: string | null | undefined): string {
if (fileName === null || fileName === undefined || fileName === "未提交") {
return "未提交";
......@@ -427,26 +446,26 @@ export async function enterpriseRegisterExaminePass(eId:string) {
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "state"];
manyTableInfo[TABLENAME.租赁信息] = {column:["leaseContract", "entryPlan", "businessLicense", "agreement"], where:{} };
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表单个, TABLENAME.企业基础信息表, {eId}, filesList, manyTableInfo);
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId}, filesList);
if (!resInfo || !resInfo.eId) {
throw new BizError(ERRORENUM.数据不存在);
}
if (!resInfo || !resInfo.eId) throw new BizError(ERRORENUM.数据不存在);
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.该企业已通过审核);
let updateInfo = {
state:enumConfig.STATE.
};
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, updateInfo, {eId});
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, {state:enumConfig.CHANGESTATE.已通过}, {eId});
let updateFuHuaInfo = {
state:enumConfig.FUHUASTATE.实体孵化
};
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业孵化信息, updateFuHuaInfo, {eId});
let addInfo = {
approvalId: randomId(TABLEID.入孵申请审批表),
eId,
changeType: enumConfig.CHANGETYPE.入孵材料审批,
changeState: enumConfig.CHANGESTATE.已通过,
createTimeMs: getMySqlMs()
}
await operationalData( OPERATIONALDATATYPE.增加, TABLENAME.入孵申请审批表, addInfo, {} );
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业孵化信息, { state:enumConfig.FUHUASTATE.实体孵化 }, {eId});
/**同步修改入孵企业面积 */
......@@ -479,9 +498,7 @@ 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 || !resInfo.eId) throw new BizError(ERRORENUM.数据不存在);
// if (resInfo.state) throw new BizError(ERRORENUM.该企业已通过审核);
let updateLeaseInfo = {
......@@ -492,7 +509,16 @@ export async function enterpriseRegisterExamineOut(eId:string) {
}
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.租赁信息, updateLeaseInfo, {eId});
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, {state:enumConfig.STATE.}, {eId});
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业基础信息表, {state:enumConfig.CHANGESTATE.已驳回}, {eId});
let addInfo = {
approvalId: randomId(TABLEID.入孵申请审批表),
eId,
changeType: enumConfig.CHANGETYPE.入孵材料审批,
changeState: enumConfig.CHANGESTATE.已驳回,
createTimeMs: getMySqlMs()
}
await operationalData( OPERATIONALDATATYPE.增加, TABLENAME.入孵申请审批表, addInfo, {} );
return {isSuccess:true};
}
......@@ -544,7 +570,7 @@ export async function enterpriseRegister(param) {
uscc:param.uscc,
logonTime:getMySqlMs(param.logonTime),
state:0,
register:0,
register:enumConfig.CHANGESTATE.未审核,
rent: param.rent,
// randomCode: randomCode() // 在企业注册时生成 randomCode
};
......
......@@ -12,7 +12,7 @@ import { ERRORENUM } from "../config/enum/errorEnum";
import { getMySqlMs, getToken, randomId } from "../tools/system";
import { extractData } from "../util/piecemeal";
import { EnterpriseApplyForConfig } from "../config/splitResult/enterprise";
import { FUHUASTATE, RUFUSTATE, STATE } from "../config/enum/enum";
import { CHANGESTATE, CHANGETYPE, FUHUASTATE, RUFUSTATE, STATE } from "../config/enum/enum";
/**
......@@ -80,18 +80,40 @@ export async function getRuFuState(uId) {
let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业用户表, {uId}, ["uId", "phone", "pwd", "eId"]);
let ruFuState = 0;
//没有eId数据代表未填写过入孵申请
if (!enterpriseUserInfo.eId) {
ruFuState = RUFUSTATE.信息填写;
ruFuState = RUFUSTATE.入孵申请信息填写;
} else {
let enterpriseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {eId:enterpriseUserInfo.eId}, ["enterpriseName", "eId", "state", "register"]);
if (enterpriseInfo.state == STATE. && enterpriseInfo.register == STATE.) ruFuState = RUFUSTATE.信息审核中;
if (enterpriseInfo.state == STATE. && enterpriseInfo.register == STATE.) {
if (enterpriseInfo.state == CHANGESTATE.未审核 && enterpriseInfo.register == CHANGESTATE.未审核) {
ruFuState = RUFUSTATE.入孵申请信息审核中;
}
if (enterpriseInfo.state == CHANGESTATE.未审核 && enterpriseInfo.register == CHANGESTATE.已驳回) {
ruFuState = RUFUSTATE.入孵申请信息驳回; //需要回显
}
if (enterpriseInfo.state == CHANGESTATE.未审核 && enterpriseInfo.register == CHANGESTATE.已通过) {
let leaseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.租赁信息, {eId:enterpriseUserInfo.eId}, []);
if (!leaseInfo.leaseContract && !leaseInfo.entryPlan || !leaseInfo.businessLicense || !leaseInfo.agreement) ruFuState = RUFUSTATE.补充材料;
else ruFuState = RUFUSTATE.材料已提交;
//如果入孵申请已通过,并且入孵材料还未上传,进入材料上传界面
if (!leaseInfo.leaseContract && !leaseInfo.entryPlan || !leaseInfo.businessLicense || !leaseInfo.agreement) {
ruFuState = RUFUSTATE.入孵材料填写;
} else {
ruFuState = RUFUSTATE.入孵材料审核中;
}
}
// if (enterpriseInfo.register == 2) ruFuState = RUFUSTATE.材料审核驳回;
if (enterpriseInfo.state == STATE. && enterpriseInfo.register == STATE.) ruFuState = RUFUSTATE.材料审核完成;
if (enterpriseInfo.state == CHANGESTATE.已驳回 && enterpriseInfo.register == CHANGESTATE.已通过) {
ruFuState = RUFUSTATE.入孵材料驳回; //需要回显
}
if (enterpriseInfo.state == CHANGESTATE.已通过 && enterpriseInfo.register == CHANGESTATE.已通过) ruFuState = RUFUSTATE.入孵材料审核成功;
// if (enterpriseInfo.state == STATE.否 && enterpriseInfo.register == STATE.否) ruFuState = RUFUSTATE.信息审核中;
// if (enterpriseInfo.state == STATE.否 && enterpriseInfo.register == STATE.是) {
// let leaseInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.租赁信息, {eId:enterpriseUserInfo.eId}, []);
// if (!leaseInfo.leaseContract && !leaseInfo.entryPlan || !leaseInfo.businessLicense || !leaseInfo.agreement) ruFuState = RUFUSTATE.补充材料;
// else ruFuState = RUFUSTATE.材料已提交;
// }
// // if (enterpriseInfo.register == 2) ruFuState = RUFUSTATE.材料审核驳回;
// if (enterpriseInfo.state == STATE.是 && enterpriseInfo.register == STATE.是) ruFuState = RUFUSTATE.材料审核完成;
}
return {ruFuState};
......@@ -119,11 +141,10 @@ export async function createRuFu(uId, param) {
logonTime:getMySqlMs(param.logonTime),
logonAddress:JSON.stringify(["", "", "", param.logonAddress]),
mail:param.mail,//邮箱地址
state:0,
register:0
state:CHANGESTATE.未审核,
register:CHANGESTATE.未审核
};
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {});
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业用户表, {eId:addEInfo.eId}, {uId});
......@@ -153,6 +174,15 @@ export async function createRuFu(uId, param) {
}
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.租赁信息, leaseInfo, {});
let addInfo = {
approvalId: randomId(TABLEID.入孵申请审批表),
eId:addEInfo.eId,
changeType: CHANGETYPE.入孵申请,
changeState: CHANGESTATE.未审核,
createTimeMs: getMySqlMs()
}
await operationalData( OPERATIONALDATATYPE.增加, TABLENAME.入孵申请审批表, addInfo, {} );
// let addUInfo = {
// eId:addEInfo.eId,
// uId:randomId(TABLEID.企业用户表),
......
......@@ -42,17 +42,17 @@ export const SettleInForUpdateConfig = {
fuHuaTimeEndTime:{type:"Number"},//孵化结束时间
leaseStartTime:{type:"Number"},//租赁开始时间
leaseEndTime:{type:"Number"},//租赁结束时间
uId:{type:"String"},
userName:{type:"String"},
phone:{type:"String"},
pwd:{type:"String"},
mail:{type:"String"},//邮箱
area:{type:"Number"},//面积
// unitPrice:{type:"Number"},//单价
rent:{type:"Number"},//每月租金
building:{type:"String"},//楼号
roomNumber:{type:"String"},//室号
rent:{type:"Number"},//每月租金
// unitPrice:{type:"Number"},//单价
// totalPrice:{type:"Number"},//总价
pwd:{type:"String"},
phone:{type:"String"},
userName:{type:"String"},
mail:{type:"String"},//邮箱
uId:{type:"String"}
}
export const RegisterUpdateConfig = {
......@@ -66,24 +66,24 @@ export const RegisterUpdateConfig = {
}
export const AdminRegisterAddConfig = {
// unitPrice:{type:"Number"},//单价
// totalPrice:{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"},//单价
building: { type: 'string', required: false }, // 租赁楼号非必填
roomNumber:{type:"String", required: false},//室号非必填
rent:{type:"Number",required: true, message: '每月租金不能为空'},//每月租金
// totalPrice:{type:"Number"},//总价
pwd:{type:"String",required: true, message: '密码不能为空'},
phone:{type:"String",required: true, message: '手机号码不能为空'},
userName:{type:"String",required: true, message: '用户名不能为空'},
leaseStartTime: { type: 'Number', required: true, message: '租赁开始时间不能为空' },
leaseEndTime: { type: 'Number', required: true, message: '租赁结束时间不能为空' },
userName:{type:"String",required: true, message: '用户名不能为空'},
phone:{type:"String",required: true, message: '手机号码不能为空'},
pwd:{type:"String",required: true, message: '密码不能为空'},
mail: { type: 'string', required: true, message: '邮箱地址不能为空' },
rent:{type:"Number",required: true, message: '每月租金不能为空'},//每月租金
area:{type:"Number", required: false},//面积非必填
building: { type: 'string', required: false }, // 租赁楼号非必填
roomNumber:{type:"String", required: false},//室号非必填
}
......@@ -142,7 +142,7 @@ export const UserRegisterAddConfig = {
building: { type: 'string', required: false }, // 租赁楼号非必填
roomNumber: { type: 'string', required: false }, // 租赁室号非必填
area: { type: 'number', required: false }, // 租赁面积非必填
}
}
/**
* 备份
......
......@@ -223,9 +223,9 @@ export enum STATE {
*/
export enum CHANGESTATE {
未审核 = 0,//未审核
通过 = 1,//已通过
已驳回 = 2,
重新提交
驳回 = 1,//已通过
// 重新提交 = 2,
已通过
}
......@@ -285,14 +285,24 @@ export enum IPRTYPECLIENTZL {
export enum RUFUSTATE {
信息填写 = 1,
信息审核中 = 2,
信息审核成功 = 3,
信息审核失败 = 4,
补充材料 = 5,
材料已提交 = 6,
// 材料审核驳回 = 7,
材料审核完成 = 7
/**步骤1 */
入孵申请信息填写 = 1,
入孵申请信息驳回 = 2,
入孵申请信息审核中 = 3,
入孵申请信息审核成功 = 4,
/**步骤2 */
入孵材料填写 = 5,
入孵材料驳回 = 6,
入孵材料审核中 = 7,
入孵材料审核成功 = 8
// 信息填写 = 1,
// 信息审核中 = 2,
// 信息审核成功 = 3,
// 信息审核失败 = 4,
// 补充材料 = 5,
// 材料已提交 = 6,
// 材料审核完成 = 7
}
export enum RISKTYPE {
......
......@@ -9,7 +9,7 @@ async function lanuch() {
await initConfig();
httpServer.createServer(systemConfig.port);
console.log('This indicates that the server is started successfully.');
await qccData();
// await qccData();
}
......
......@@ -22,6 +22,7 @@ export function setRouter(httpServer) {
// //新入孵企业
httpServer.post('/admin/enterprise/settlein/list', checkUser, asyncHandler(settleIn));
httpServer.post('/admin/enterprise/settlein/pass', checkUser, asyncHandler(settleInPass));
httpServer.post('/admin/enterprise/settlein/info', checkUser, asyncHandler(settleInById));
httpServer.post('/admin/enterprise/settlein/update', checkUser, asyncHandler(settleUpdate));
httpServer.post('/admin/enterprise/settlein/out', checkUser, asyncHandler(settleInOut));
httpServer.post('/admin/fuhua/rufu/add', checkUser, asyncHandler(addRuFu));
......@@ -758,6 +759,20 @@ async function settleInPass(req, res) {
* @param req
* @param res
*/
async function settleInById(req, res) {
const UserInfo = req.userInfo;
let { eId } = req.body
let result = await ruFuBiz.settleInEnterpriseById(eId);
res.success(result);
}
/**
*
* @param req
* @param res
*/
async function settleInOut(req, res) {
const UserInfo = req.userInfo;
let { eId } = req.body
......
......@@ -42,7 +42,7 @@ export function setRouter(httpServer) {
/**
* 登录
* 获取入孵流程状态
* @param req
* @param res
*/
......
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