Commit 5750a96d by chenjinjing

no message

parent d4a237dd
......@@ -84,14 +84,16 @@ export async function updateEnterpriseApplyFor(eId:string, param) {
export async function enterpriseExamineList(year:number, entepriseName:string, page:number) {
let selectParam:any = {};
if (year) selectParam = {annual:getMySqlMs(year)};
let filesList = [ "mId", "annual", "BI", "TXP", "RD", "state"];
let manyTableInfo:any = {};
manyTableInfo[TABLENAME.企业基础信息表] = {column:["enterpriseName"], where:{} };
if (entepriseName) {
manyTableInfo[TABLENAME.企业基础信息表].where["enterpriseName"] = {"%like%":entepriseName}
}
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业经营信息, {annual:getMySqlMs(year)}, filesList, manyTableInfo, page);
let dataCount = await selectData(OPERATIONALDATATYPE.查询数据量, TABLENAME.企业经营信息, {annual:getMySqlMs(year)}, null);
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业经营信息, selectParam, filesList, manyTableInfo, page);
let dataCount = await selectData(OPERATIONALDATATYPE.查询数据量, TABLENAME.企业经营信息, selectParam, null);
let dataList = [];
resInfo.forEach(info => {
......@@ -107,6 +109,9 @@ export async function enterpriseExamineList(year:number, entepriseName:string, p
dataList.push(dataInfo);
})
dataList.sort( (a, b) => {
return b.annual - a.annual;
})
return {dataList, dataCount};
}
......@@ -180,7 +185,7 @@ export async function enterpriseManageList(entepriseName:string, year:number, pa
let manyTableInfo:any = {};
manyTableInfo[TABLENAME.企业基础信息表] = {column: ["enterpriseName", "uscc"], where:{} };
if (entepriseName) {
manyTableInfo[TABLENAME.企业经营信息].where["enterpriseName"] = {"%like%":entepriseName}
manyTableInfo[TABLENAME.企业基础信息表].where["enterpriseName"] = {"%like%":entepriseName}
}
let resInfo = await selectManyTableData(OPERATIONALDATATYPE.多表分页, TABLENAME.企业经营信息, selectParam, ["mId", "BI", "TXP", "RD", "annual", "state"], manyTableInfo, page);
let dataCountList = await selectManyTableData(OPERATIONALDATATYPE.多表联查, TABLENAME.企业经营信息, selectParam, ["eId"], manyTableInfo);
......
......@@ -29,7 +29,6 @@ export async function adminLogin(loginId:string, pwd:string) {
};
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.管理后台用户, updateUserInfo, {aId:adminUserInfo.aId});
let userInfo = {
userId:adminUserInfo.aId,
userName:adminUserInfo.name,
......
......@@ -42,6 +42,12 @@ export function setRouter(httpServer) {
//企业库信息
httpServer.post('/admin/library/enterprise/list', checkUser, asyncHandler(enterpriseList));
httpServer.post('/admin/library/enterprise/details', checkUser, asyncHandler(enterpriseDetails));
// httpServer.post('/admin/library/enterprise/details', checkUser, asyncHandler(enterpriseById));
// httpServer.post('/admin/library/manage/details', checkUser, asyncHandler(manageById));
// httpServer.post('/admin/library/financing/details', checkUser, asyncHandler(financingById));
// httpServer.post('/admin/library/talent/details', checkUser, asyncHandler(talentById));
// httpServer.post('/admin/library/service/details', checkUser, asyncHandler(serviceById));
httpServer.post('/admin/library/dw/enterprise/list', checkUser, asyncHandler(dwEnterpriseList));
httpServer.post('/admin/library/manage/list', checkUser, asyncHandler(manageList));
httpServer.post('/admin/library/dw/manage/list', checkUser, asyncHandler(outPutManageList));
......@@ -315,6 +321,61 @@ async function enterpriseList(req, res) {
res.success(result);
}
async function enterpriseDetails(req, res) {
const UserInfo = req.userInfo;
let {eId } = req.body
let result = await zaiFuBiz.getDetails(eId);
res.success(result);
}
// async function enterpriseById(req, res) {
// const UserInfo = req.userInfo;
// let {eId } = req.body
// let result = await zaiFuBiz.enterpriseById(eId);
// res.success(result);
// }
// async function manageById(req, res) {
// const UserInfo = req.userInfo;
// let {eId } = req.body
// let result = await zaiFuBiz.enterpriseManageById(eId);
// res.success(result);
// }
// async function financingById(req, res) {
// const UserInfo = req.userInfo;
// let {eId } = req.body
// let result = await zaiFuBiz.enterpriseFinancingById(eId);
// res.success(result);
// }
// async function talentById(req, res) {
// const UserInfo = req.userInfo;
// let {eId } = req.body
// let result = await zaiFuBiz.enterpriseTalentById(eId);
// res.success(result);
// }
// async function serviceById(req, res) {
// const UserInfo = req.userInfo;
// let {eId } = req.body
// let result = await zaiFuBiz.enterpriseServiceById(eId);
// res.success(result);
// }
/**
*
* @param req
......
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