Commit 4c6fb6cc by chenjinjing

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

# Conflicts:
#	res/标记企业12_10.xlsx
parents 7a328c83 f1d42a77
......@@ -940,13 +940,16 @@ export async function activityList(selectTitle:string, startTime:number, endTime
dataBaseList.forEach(info => {
let {aId, title, startTime, endTime, location, type, releaseTime} = info;
let status = "进行中";
if(startTime > new Date().valueOf() ) status = "未进行";
if(endTime < new Date().valueOf() ) status = "已结束";
dataList.push({
aId,
title,
activityTime:`${moment(startTime).format("YYYY/MM/DD")}-${moment(endTime).format("YYYY/MM/DD")}`,
type:changeEnumValue(ACTIVITYTYPECLIENT, type),
location,
status:"测试",
status,
createTime:moment(releaseTime).format("YYYY-MM-DD")
});
});
......@@ -1103,7 +1106,7 @@ export async function activityPreviewList(selectTitle:string, startTime:number,
* 政策列表
* @returns
*/
export async function policyMatchList(selectTitle:string, status:number, type:number, page:number) {
export async function policyMatchList(selectTitle:string, createTime:number, type:number, page:number) {
const FunName = "政策列表";
let selectParam:any = {};
......@@ -1111,23 +1114,26 @@ export async function policyMatchList(selectTitle:string, status:number, type:nu
eccEnumValue(FunName, "type", POLICYTYPE, type);
selectParam.type = type;
}
// if (createTime) {
// let endTime = moment(createTime).endOf("month").valueOf();
// selectParam.createTime = {"$gt":createTime, "$lt":endTime};
// }
if (selectTitle) {
selectParam.title = {"$regex":selectTitle};
}
if (createTime) {
let endTime = moment(createTime).endOf("month").valueOf();
selectParam.createTime = {"$gt":createTime, "$lt":endTime};
}
let dataBaseList = await policyData.findDataToPage(selectParam, page);
let dataCount = await policyData.findDataCount(selectParam);
let dataList = [];
dataBaseList.forEach(info => {
let {title, createTimeMs, source, pId, type} = info;
let {title, createTime, source, pId, type} = info;
dataList.push({
pId,
title,
type:changeEnumValue(POLICYTYPE, type),
createTime:moment(createTimeMs).format("YYYY-MM-DD"),
createTime:moment(createTime).format("YYYY-MM-DD"),
source
});
});
......
......@@ -573,9 +573,12 @@ export async function addEnterpriseBusinessData(uscc:string, param) {
eccFormParam(FunName, addEnterpriseBusinesConfig, param);
let businessInfo = await businessData.findOnceBusinessDataByParam({uscc, year:param.year});
let enterpriseInfo = await enterpriseData.findEnterpriseByUscc(uscc);
if (!businessInfo || !businessInfo.year) {
let addItem = {
uscc,
name:enterpriseInfo.name,
year:param.year,
startTimeMs:param.startTimeMs,
endTimeMs:param.endTimeMs,
......
......@@ -186,7 +186,6 @@ export enum ACTIVITYTYPECLIENT {
*/
export enum ACTIVITYTYPESTATISCLIENT {
全部 = 0,
本周新发布,
重大活动,
交流活动,
公益活动
......
......@@ -2,7 +2,7 @@ import { getAiDoc } from "./biz/ai";
import { dataOut } from "./biz/dataOut";
import { out20251031 } from "./biz/dataSync/data";
import { initData, test111 } from "./biz/dataSync/dataInit";
import { initEnterpriseData, test111222 } from "./biz/dataSync/newDataInit";
import { initEnterpriseData, test111222, test33333 } from "./biz/dataSync/newDataInit";
import { initQueue } from "./biz/labelEnterpriseList";
import { initConfig, systemConfig} from "./config/serverConfig";
import { initDB } from "./db/mongo/dbInit";
......@@ -21,10 +21,11 @@ async function lanuch() {
/**创建http服务 */
httpServer.createServer(systemConfig.port);
console.log('This indicates that the server is started successfully.');
// await initEnterpriseData();
await initEnterpriseData();
// await out20251031();
// await dataOut();
await test111222();
// await test111222();
await test33333();
}
......
......@@ -292,7 +292,7 @@ async function enterprise_daily_resolvedynamics_list(req, res) {
//政策
async function policy_list(req, res) {
let reqConf = {
page:"Number", createTime:"Number", type:"Number"
page:"Number", createTime:"Number", type:"Number", selectTitle:"String"
};
const NotMustHaveKeys = ["selectTitle", "createTime", "type"];
let { selectTitle, createTime, type, page } = eccReqParamater(reqConf, req.body, NotMustHaveKeys);
......
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