Commit b3f19756 by zhangzhencai

no message

parent 19338dd5
<config> <config>
<port>9098</port> <port>9098</port>
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign> <sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
<dbServer>http://192.168.0.105:40012</dbServer> <dbServer>http://127.0.0.1:9096</dbServer>
<imgUrl>http://127.0.0.1:9098</imgUrl>
<imgFileUrl>http://192.168.0.189:9097</imgFileUrl>
</config> </config>
\ No newline at end of file
...@@ -338,8 +338,11 @@ export async function getWorthDate() { ...@@ -338,8 +338,11 @@ export async function getWorthDate() {
if (userInfo && userInfo.uId) throw new BizError(ERRORENUM.手机号码重复); if (userInfo && userInfo.uId) throw new BizError(ERRORENUM.手机号码重复);
let filesList = ["eId"]; // let filesList = ["eId"];
let filesList = ["eId", "uscc"];
let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {uscc:param.uscc}, filesList); let enterpriseUserInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业基础信息表, {uscc:param.uscc}, filesList);
// console.log("查询结果:", enterpriseUserInfo); // 添加日志
if (enterpriseUserInfo && enterpriseUserInfo.eId) { if (enterpriseUserInfo && enterpriseUserInfo.eId) {
throw new BizError(ERRORENUM.企业已存在); throw new BizError(ERRORENUM.企业已存在);
} }
......
...@@ -25,7 +25,7 @@ export async function settleInEnterpriseList(page:number, entepriseName:string) ...@@ -25,7 +25,7 @@ export async function settleInEnterpriseList(page:number, entepriseName:string)
let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress"]; let filesList = ["eId", "enterpriseName", "uscc", "logonTime", "logonAddress"];
let manyTableInfo:any = {} let manyTableInfo:any = {}
manyTableInfo[TABLENAME.租赁信息] = {column:["area", "unitPrice", "roomNumber", "rent"], where:{} }; manyTableInfo[TABLENAME.租赁信息] = {column:["area", "unitPrice", "roomNumber", "rent", "totalPrice"], where:{} };
manyTableInfo[TABLENAME.企业孵化信息] = {column:["state", "startTime", "endTime"], where:{} }; manyTableInfo[TABLENAME.企业孵化信息] = {column:["state", "startTime", "endTime"], where:{} };
manyTableInfo[TABLENAME.企业用户表] = {column:["userName", "pwd", "phone", "uId"], where:{} }; manyTableInfo[TABLENAME.企业用户表] = {column:["userName", "pwd", "phone", "uId"], where:{} };
let resList = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page ); let resList = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业基础信息表, selectParam, filesList, manyTableInfo, page );
...@@ -52,6 +52,7 @@ export async function settleInEnterpriseList(page:number, entepriseName:string) ...@@ -52,6 +52,7 @@ export async function settleInEnterpriseList(page:number, entepriseName:string)
pwd:info.enterprise_users[0].pwd, pwd:info.enterprise_users[0].pwd,
phone:info.enterprise_users[0].phone, phone:info.enterprise_users[0].phone,
uId:info.enterprise_users[0].uId, uId:info.enterprise_users[0].uId,
totalPrice: info.enterprise_leases[0].totalPrice // 添加年总价字段
}); });
}); });
...@@ -107,8 +108,11 @@ export async function settleInEnterpriseUpdate(eId:string, param) { ...@@ -107,8 +108,11 @@ export async function settleInEnterpriseUpdate(eId:string, param) {
let leaseInfo = { let leaseInfo = {
area:param.area, area:param.area,
unitPrice:param.unitPrice, // unitPrice:param.unitPrice,
roomNumber:param.roomNumber, // 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, rent:param.rent,
} }
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.租赁信息, leaseInfo, {eId}); await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.租赁信息, leaseInfo, {eId});
...@@ -229,7 +233,8 @@ export async function enterpriseRegister(param) { ...@@ -229,7 +233,8 @@ export async function enterpriseRegister(param) {
uscc:param.uscc, uscc:param.uscc,
logonTime:getMySqlMs(param.logonTime), logonTime:getMySqlMs(param.logonTime),
state:0, state:0,
register:0 register:0,
rent: param.rent
}; };
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {}); await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.企业基础信息表, addEInfo, {});
...@@ -245,6 +250,7 @@ export async function enterpriseRegister(param) { ...@@ -245,6 +250,7 @@ export async function enterpriseRegister(param) {
startTime:getMySqlMs(param.leaseTimeStart), startTime:getMySqlMs(param.leaseTimeStart),
endTime:getMySqlMs(param.leaseTimeEnd), endTime:getMySqlMs(param.leaseTimeEnd),
area:param.area area:param.area
} }
await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.租赁信息, leaseInfo, {}); await operationalData(OPERATIONALDATATYPE.增加, TABLENAME.租赁信息, leaseInfo, {});
......
...@@ -15,19 +15,41 @@ import { PolicyUpdateConfig } from "../config/eccParam/enterprise"; ...@@ -15,19 +15,41 @@ import { PolicyUpdateConfig } from "../config/eccParam/enterprise";
export async function enterprisePolicyList(keywords:string, page:number) { export async function enterprisePolicyList(keywords:string, page:number) {
let selectParam:any = {}; let selectParam:any = {};
if (keywords) selectParam.desc = {"%like%":keywords}; if (keywords) selectParam.desc = {"%like%":keywords};
let filesList = ["poId", "title", "source", "createTimeMs", "closeTimeMs", "isPermanent"]; let filesList = ["poId", "title", "source", "createTimeMs", "closeTimeMs", "isPermanent","coverImg"];
let resList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.政策表, selectParam, filesList, page); let resList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.政策表, selectParam, filesList, page);
let dataCount = await selectData(OPERATIONALDATATYPE.查询数据量, TABLENAME.政策表, selectParam, null); let dataCount = await selectData(OPERATIONALDATATYPE.查询数据量, TABLENAME.政策表, selectParam, null);
let dataList = []; let dataList = [];