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