Commit 0c546391 by 孙香冬

no message

parent 67cb5281
......@@ -6,9 +6,10 @@
import { ERRORENUM } from "../../config/errorEnum";
import { BizError } from "../../util/bizError";
import * as monthData from "../../data/fuHuaQi/monthTable";
import { getTaskId } from "../../util/tools";
import { extractData, getTaskId } from "../../util/tools";
import moment = require("moment");
import { findAllFuHuaQiOperationNameMap, getFuHuaQiCreateDataTimeMap } from "../../data/fuHuaQi/fuhuaqi";
import { MonthListConfig } from "../../config/ojbectResultKeyConfig";
/**
* 新添加孵化器月度填报
......@@ -122,4 +123,18 @@ async function getCompleted(selectParam, page) {
dataList.push(onceInfo);
});
return {count, dataList}
}
/**
* 根据uscc查询任务信息
* @param uscc 企业统一信用代码
*/
export async function getMonthByUscc(uscc:string) {
const TaskId = getTaskId(uscc);
let dataBaseInfo = await monthData.findmonthTableByTaskId(TaskId);
if (!dataBaseInfo || !dataBaseInfo.taskId) throw new BizError(ERRORENUM.未找到数据, `未找到${uscc}的月度报表` );
let data = extractData(MonthListConfig, dataBaseInfo);
return {data};
}
\ No newline at end of file
......@@ -107,9 +107,9 @@ export const FuHuaQiListConfig = {
/**
* 孵化器任务信息 参数转换配置
* 孵化器月度报表 参数转换配置
*/
export const TaskListConfig = {
export const MonthListConfig = {
name:{key:"任务名称"},
fuHuaQiUscc:{key:"任务所属孵化器id"},
occupancyRate:{key:"出租率"},
......
......@@ -22,11 +22,12 @@ export function setRouter(httpServer) {
/**任务 */
httpServer.post('/fuhuaqi/task/list', checkFuHuaQiToken, asyncHandler(taskList));
httpServer.post('/fuhuaqi/task/submit', checkFuHuaQiToken, asyncHandler(submitTask));
httpServer.post('/fuhuaqi/task/select', checkFuHuaQiToken, asyncHandler(selectTaskInfo));
/**月度报表 */
httpServer.post('/fuhuaqi/month/addreport', checkFuHuaQiToken, asyncHandler(addReport));
httpServer.post('/fuhuaqi/month/updatereport', checkFuHuaQiToken, asyncHandler(updateReport));
httpServer.post('/fuhuaqi/month/deletereport', checkFuHuaQiToken, asyncHandler(deleteReport));
httpServer.post('/fuhuaqi/month/select', checkFuHuaQiToken, asyncHandler(selectMonthInfo));
/**融资企业填报 */
httpServer.post('/fuhuaqi/financing/create', checkFuHuaQiToken, asyncHandler(createFinancingInfo));
......@@ -319,20 +320,6 @@ async function submitTask(req, res) {
/**
* 查询迁入企业登记信息或新建企业登录信息
* @param req
* @param res
*/
async function selectTaskInfo(req, res) {
let reqConf = {uscc: 'String' };
let { uscc } = checkReqParam(reqConf, req.body);
let result = await taskBiz.getTaskByUscc(uscc);
res.success(result);
}
/**
* 更新基础数据
* @param req
* @param res
......@@ -372,6 +359,21 @@ async function deleteReport(req, res) {
res.success(monthInfo);
}
/**
* 查询迁入企业登记信息或新建企业登录信息
* @param req
* @param res
*/
async function selectMonthInfo(req, res) {
let reqConf = {uscc: 'String' };
let { uscc } = checkReqParam(reqConf, req.body);
let result = await monthBiz.getMonthByUscc(uscc);
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