Commit 5962551f by chenjinjing

no message

parent 137dd952
......@@ -5,5 +5,6 @@
/public
/logs
/video
/files
*test*
*.logs
......@@ -226,14 +226,14 @@ function getActivityStatus(activityStartTime:number, activityEndTime:number) {
let status;
if (underway) {
status = "正在进行";
}
if (nowTime < activityStartTime) {
status = "即将开展";
}
if (nowTime > activityStartTime) {
status = "已经开展";
} else {
if (nowTime < activityStartTime) {
status = "即将开展";
}
if (nowTime > activityStartTime) {
status = "已经开展";
}
}
return status;
......
......@@ -24,7 +24,14 @@ import { BizError } from '../../../util/bizError';
*/
export async function getPartyVanguard(honorName:string, branchName) {
let selectParam = {};
if (honorName) selectParam["honorName"] = honorName;
// selectParam["honorName"] = honorName;
if (honorName) {
selectParam["honorName"] = {$in: honorName };
let modelType = verificationEnumTools.changeEnumValue(configEnum.MODELTYPE, honorName);
selectParam["modelType"] = {$in: modelType};
}
selectParam["branchName"] = {$in: branchName};
let partyVanguardInfo = await partyVanguardData.findPartyVanguardeList(selectParam);
let vanguardList = [];
......
......@@ -101,6 +101,7 @@ export const UpdateActivityFormConfig = {
administrativePosition:{type:"Number", notMustHave:true},//行政职务
partyPositions:{type:"[Number]", notMustHave:true},//党内职务
department:{type:"[Number]", notMustHave:true},//所属科室 2.0
askForTime: {type:"Number", notMustHave:true}, //申请入党时间
talkTime:{type:"Number", notMustHave:true},//谈话时间
remarks:{type:"String", notMustHave:true},//备注
loginId:{type:"String", notMustHave:true},//登录账号
......
......@@ -6,7 +6,6 @@ import { initBasicData } from "./tools/dataInit";
import { getPwdMd5, getToken, md5PwdStr } from "./tools/system";
async function lanuch() {
// test();
/**初始化配置解析 */
await initConfig();
/**初始化数据库 */
......@@ -16,17 +15,34 @@ async function lanuch() {
/**创建http服务 */
httpServer.createServer(systemConfig.port);
console.log('This indicates that the server is started successfully.');
await test();
}
const fs = require("fs");
// const url = path.join(__dirname.substring(0,__dirname.indexOf("out")), "files/docx/党建资讯");
function test() {
let time = moment(560016000000).format("YYYY-MM-DD");
let p = md5PwdStr("946885");
let pwd = getPwdMd5("15821946885", "bdcb05781f14e7bf275a7b51d554f045");
let token = getToken("946885");
// let time = moment(560016000000).format("YYYY-MM-DD");
// let p = md5PwdStr("946885");
// let pwd = getPwdMd5("15821946885", "bdcb05781f14e7bf275a7b51d554f045");
// let token = getToken("946885");
fs.readdir('./files/docx/党建资讯',(err,files)=>{
if (err) {
console.log(err);
} else{
// console.log(files); //返回的文件是个数组,可以用forEach循环输出文件名
files.forEach((file)=>{
console.log('http://123.207.147.179:7079/docx/党建资讯/'+ file);
})
}
})
console.log();
}
lanuch();
let a = [
// "36dea1f3c44ab89798d3b3f7fb14667d",
// "f7be11973c1671079e702ae0adb661f1",
......
......@@ -28,6 +28,7 @@ export class httpServer {
});
httpServer.use(express.static(path.join(__dirname, "../../img")) );
httpServer.use(express.static(path.join(__dirname, "../../files")) );
const root = path.join(__dirname, "../../public");
httpServer.use(express.static(root));
httpServer.use(fallback('index.html', { root }));
......
......@@ -211,7 +211,7 @@ const HonorLevelConfig = {
*/
async function initPartyVanguard() {
let count = await groupFindPartyVanguardCount({});
if (count > 1) {
if (count >= 1) {
console.log("***** 党建先锋数据 无需初始化 *****");
return;
}
......@@ -293,7 +293,7 @@ async function initPartyVanguard() {
*/
async function initOrganizationalLife() {
let count = await groupFindActivityCount({});
if (count > 1) {
if (count >= 1) {
console.log("***** 组织生活数据 无需初始化 *****");
return;
}
......@@ -399,7 +399,7 @@ async function initOrganizationalLife() {
*/
async function initBranchSystem() {
let count = await groupFindBranchSystemCount({});
if (count > 1) {
if (count >= 1) {
console.log("***** 支部制度数据 无需初始化 *****");
return;
}
......@@ -458,7 +458,7 @@ async function initBranchSystem() {
*/
async function initInforMation() {
let count = await groupFindpartyInformationCount({});
if (count > 1) {
if (count >= 1) {
console.log("***** 党建资讯数据 无需初始化 *****");
return;
}
......
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