Commit 5962551f by chenjinjing

no message

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