Commit 6fe23631 by chenjinjing

no message

parent 31e46a3d
......@@ -81,9 +81,9 @@
}
},
"@babel/runtime": {
"version": "7.22.15",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.15.tgz",
"integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==",
"version": "7.22.10",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.10.tgz",
"integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==",
"requires": {
"regenerator-runtime": "^0.14.0"
},
......@@ -118,6 +118,29 @@
"printj": "~1.1.0"
}
},
"agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"requires": {
"debug": "4"
},
"dependencies": {
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz",
......@@ -185,9 +208,9 @@
}
},
"bignumber.js": {
"version": "9.1.2",
"resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.2.tgz",
"integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug=="
"version": "9.1.1",
"resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.1.tgz",
"integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig=="
},
"body-parser": {
"version": "1.20.1",
......@@ -596,6 +619,11 @@
"mime-types": "^2.1.12"
}
},
"formidable": {
"version": "1.2.6",
"resolved": "https://registry.npmmirror.com/formidable/-/formidable-1.2.6.tgz",
"integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ=="
},
"forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
......@@ -637,6 +665,11 @@
"has-symbols": "^1.0.3"
}
},
"get-stream": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz",
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz",
......@@ -704,6 +737,30 @@
"sshpk": "^1.7.0"
}
},
"https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"requires": {
"agent-base": "6",
"debug": "4"
},
"dependencies": {
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"httpx": {
"version": "2.2.7",
"resolved": "https://registry.npmmirror.com/httpx/-/httpx-2.2.7.tgz",
......@@ -714,9 +771,9 @@
},
"dependencies": {
"@types/node": {
"version": "14.18.58",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-14.18.58.tgz",
"integrity": "sha512-Y8ETZc8afYf6lQ/mVp096phIVsgD/GmDxtm3YaPcc+71jmi/J6zdwbwaUU4JvS56mq6aSfbpkcKhQ5WugrWFPw=="
"version": "14.18.54",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-14.18.54.tgz",
"integrity": "sha512-uq7O52wvo2Lggsx1x21tKZgqkJpvwCseBBPtX/nKQfpVlEsLOb11zZ1CRsWUKvJF0+lzuA9jwvA7Pr2Wt7i3xw=="
},
"debug": {
"version": "4.3.4",
......@@ -756,6 +813,11 @@
"resolved": "https://registry.npmmirror.com/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz",
"integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz",
......@@ -912,6 +974,14 @@
"resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
},
"node-fetch": {
"version": "2.6.12",
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.6.12.tgz",
"integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"node-xlsx": {
"version": "0.16.2",
"resolved": "https://registry.npmmirror.com/node-xlsx/-/node-xlsx-0.16.2.tgz",
......@@ -922,6 +992,11 @@
"xlsx": "^0.17.0"
}
},
"nodemailer": {
"version": "6.9.4",
"resolved": "https://registry.npmmirror.com/nodemailer/-/nodemailer-6.9.4.tgz",
"integrity": "sha512-CXjQvrQZV4+6X5wP6ZIgdehJamI63MFoYFGGPtHudWym9qaEHDNdPzaj5bfMCvxG1vhAileSWW90q7nL0N36mA=="
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz",
......@@ -1212,6 +1287,31 @@
"opentype.js": "^0.7.3"
}
},
"tencentcloud-sdk-nodejs": {
"version": "4.0.667",
"resolved": "https://registry.npmmirror.com/tencentcloud-sdk-nodejs/-/tencentcloud-sdk-nodejs-4.0.667.tgz",
"integrity": "sha512-JBLHSlZuz/FRIVtOszvbEE90zG8UmslBLwGrKYq0mKvKiNLiidaSpFcRZjvnJ5Y0YcOuQ7WceLb9FPxvEF11ww==",
"requires": {
"form-data": "^3.0.0",
"get-stream": "^6.0.0",
"https-proxy-agent": "^5.0.0",
"is-stream": "^2.0.0",
"node-fetch": "^2.2.0",
"tslib": "1.13.0"
},
"dependencies": {
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"tiny-inflate": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz",
......@@ -1231,6 +1331,16 @@
"punycode": "^2.1.1"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"tslib": {
"version": "1.13.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
......@@ -1296,6 +1406,20 @@
"extsprintf": "^1.2.0"
}
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/wmf/-/wmf-1.0.2.tgz",
......
......@@ -10,14 +10,17 @@
"express": "^4.17.1",
"express-async-handler": "^1.1.4",
"express-history-api-fallback": "^2.2.1",
"formidable": "^1.2.1",
"log4js": "^6.6.1",
"lru-cache": "^4.1.5",
"md5": "^2.2.1",
"moment": "^2.24.0",
"node-xlsx": "^0.16.1",
"nodemailer": "^6.1.1",
"qs": "^6.11.0",
"request": "^2.88.0",
"svg-captcha": "^1.3.12",
"tencentcloud-sdk-nodejs": "^4.0.562",
"ws": "^5.2.2",
"xml2js": "^0.4.23"
},
......
......@@ -19,11 +19,10 @@ export async function getOrganization() {
let column = ["name", "bId", "partyPositionsName"];
let memberList = await selectData(OPERATIONALDATATYPE.查询多个, TABLENAME.党员基础信息表, {}, column);
let branchMap = {};// 支部名称:{ ordinary:[], manager:[{title:"", name:"" }] }
let branchMap = {};// 支部名称:{ ordinary:[], manager:[{title:"", name:"" }] }
memberList.forEach(info => {
let {name, bId, partyPositionsName} = info;
let bName = changeEnumValue(BRANCHNAME, bId);
if ( !branchMap[bName] ) branchMap[bName] = {ordinary:[], manager:[]};
if ( !branchMap[bId] ) branchMap[bId] = {ordinary:[], manager:[]};
let partyPositionsList = JSON.parse(partyPositionsName);
let inOrdinary = true;
......@@ -36,23 +35,40 @@ export async function getOrganization() {
if (pId < PARTYPOSITIONS.支部书记) { /**总支干部 */
organizationInfo.manager.push(managerInfo);
} else {/**支部干部 */
branchMap[bName].manager.push(managerInfo);
branchMap[bId].manager.push(managerInfo);
}
});
if (inOrdinary) {
branchMap[bName].ordinary.push(name);
branchMap[bId].ordinary.push(name);
}
});
let subList = [];
for (let title in branchMap) {
let {ordinary, manager} = branchMap[title];
organizationInfo.subList.push({
subList.push({
title,
ordinary,
manager
});
}
subList.sort((a, b)=>{
return a.title - b.title;
})
subList.forEach(item => {
let {title, ordinary, manager} = item;
let bName = changeEnumValue(BRANCHNAME, parseInt(title));
organizationInfo.subList.push({
title: bName,
ordinary,
manager
})
})
return {organizationInfo};
}
\ No newline at end of file
......@@ -29,14 +29,17 @@ export async function formalList(branch:number, name:string, pageNumber:number)
dataServerList.forEach(info => {
let itemInfo = JSON.parse(JSON.stringify(info));
itemInfo.administrativePositionName = changeEnumValue(ADMINISTRATIVEPOSITION, info.administrativePositionName);
itemInfo.partyPositionsName = changeEnumValue(PARTYPOSITIONS, info.partyPositionsName);
if (!itemInfo.partyPositionsName || itemInfo.partyPositionsName=='undefined') itemInfo.partyPositionsName = "党员";
itemInfo.departmentName = changeEnumValue(DEDPARTMENT, info.departmentName);
itemInfo.branchName = changeEnumValue(BRANCHNAME, itemInfo.bId);
itemInfo.sex = changeEnumValue(SEX, info.sex);
itemInfo.levelOfEducation = changeEnumValue(DEGREE, info.levelOfEducation);
itemInfo.partyJoiningTime = datechangeToStr(itemInfo.partyJoiningTime);
itemInfo.birthDate = datechangeToStr(itemInfo.birthDate);
if (info.partyJoiningTime) itemInfo.partyJoiningTime = datechangeToStr(itemInfo.partyJoiningTime);
if (info.birthDate) itemInfo.birthDate = datechangeToStr(itemInfo.birthDate);
dataList.push(itemInfo);
});
......@@ -71,9 +74,9 @@ export async function activistsList(branch:number, name:string, pageNumber:numbe
itemInfo.levelOfEducation = changeEnumValue(DEGREE, info.levelOfEducation);
itemInfo.sex = changeEnumValue(SEX, info.sex);
itemInfo.askForTime = datechangeToStr(info.askForTime);
itemInfo.listedAsActivistsTime = datechangeToStr(info.listedAsActivistsTime);
itemInfo.birthDate = datechangeToStr(info.birthDate);
if (info.askForTime) itemInfo.askForTime = datechangeToStr(info.askForTime);
if (info.listedAsActivistsTime) itemInfo.listedAsActivistsTime = datechangeToStr(info.listedAsActivistsTime);
if (info.birthDate) itemInfo.birthDate = datechangeToStr(info.birthDate);
dataList.push(itemInfo);
});
......@@ -109,9 +112,9 @@ export async function candidateList(branch:number, name:string, pageNumber:numbe
itemInfo.branchName = changeEnumValue(BRANCHNAME, itemInfo.bId);
itemInfo.levelOfEducation = changeEnumValue(DEGREE, info.levelOfEducation);
itemInfo.askForTime = datechangeToStr(itemInfo.askForTime);
itemInfo.talkTime = datechangeToStr(itemInfo.talkTime);
itemInfo.birthDate = datechangeToStr(itemInfo.birthDate);
if (info.askForTime) itemInfo.askForTime = datechangeToStr(itemInfo.askForTime);
if (info.talkTime) itemInfo.talkTime = datechangeToStr(itemInfo.talkTime);
if (info.birthDate) itemInfo.birthDate = datechangeToStr(itemInfo.birthDate);
dataList.push(itemInfo);
});
......
......@@ -104,13 +104,15 @@ export async function indicatorsList() {
if (isNaN(anyKey)) {
let value:any = SECONDARYINDICATORS[key];
let firstIndex = Math.floor(value/10);
map[firstIndex].subList.push({key, value});
let keyStr = changeEnumValue(SECONDARYINDICATORS, value);
map[firstIndex].subList.push({key:keyStr, value});
}
}
return {dataList:Object.values(map)};
}
export async function updateQuality(userInfo, tlId:number, primaryIndicators:number, secondaryIndicators:number, thirdLevelContent:string, thirdLevelScore:number ) {
const FuncName = `修改党建质量三级指标`;
if (!userInfo.isSuperAdmin) {
......@@ -193,11 +195,11 @@ export async function updateQualityScoreInfo(userInfo, tlId:number, currentScore
if (!userInfo.isSuperAdmin) {
throw new BizError(ERRORENUM.权限不足, FuncName, `${userInfo.userId}`);
}
let column = ["tlId", "bId", "lock"];
let column = ["tlId", "bId", "lock", "thirdLevelScore"];
let qualityBase = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.党建质量, {tlId}, column );
if (!qualityBase || !qualityBase.tlId) throw new BizError(ERRORENUM.目标数据不存在, FuncName, `${tlId}不存在`);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.党建质量, {currentScore}, {tlId});
let completionProgress = Math.ceil(currentScore/qualityBase.thirdLevelScore*100);
await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.党建质量, {currentScore, completionProgress}, {tlId});
return {isSuccess:true};
}
......
......@@ -40,7 +40,7 @@ export async function getThematicActivitiesList(userInfo, month:number, title:st
selectParam.theme = {"%like%":title};
}
let column = ["taId", "theme", "dataMonth", "uploadTime"];
let column = ["taId", "theme", "dataMonth", "fileType", "uploadTime"];
let dbList = await selectData(OPERATIONALDATATYPE.分页查询, TABLENAME.专题活动表, selectParam, column, pageNumber, 10);
let dataCount = await selectData(OPERATIONALDATATYPE.查询数据量, TABLENAME.专题活动表, selectParam, null);
......
......@@ -35,11 +35,11 @@ export function changeEnumValue(enumConf, value:any) {
if ( typeof value == 'number' ) {
let str = enumConf[value];
/**特化处理 */
if(/_dou/.test(str)) str = str.replace(/_dou/, ",");
if(/_zyh/.test(str)) str = str.replace(/_zyh/, "“");
if(/_yyh/.test(str)) str = str.replace(/_yyh/, "”");
if(/_dun/.test(str)) str = str.replace(/_dun/, "、");
if(/_ju/.test(str)) str = str.replace(/_ju/, "。");
if(/_dou/.test(str)) str = str.replace(/_dou/gm, ",");
if(/_zyh/.test(str)) str = str.replace(/_zyh/gm, "“");
if(/_yyh/.test(str)) str = str.replace(/_yyh/gm, "”");
if(/_dun/.test(str)) str = str.replace(/_dun/gm, "、");
if(/_ju/.test(str)) str = str.replace(/_ju/gm, "。");
return str
} else if (typeof value == 'string') {
......@@ -53,11 +53,11 @@ export function changeEnumValue(enumConf, value:any) {
value.forEach((item, index) => {
let subStr = enumConf[item];
/**特化处理 */
if(/_dou/.test(subStr)) subStr = subStr.replace(/_dou/, ",");
if(/_zyh/.test(subStr)) subStr = subStr.replace(/_zyh/, "“");
if(/_yyh/.test(subStr)) subStr = subStr.replace(/_yyh/, "”");
if(/_dun/.test(subStr)) subStr = subStr.replace(/_dun/, "、");
if(/_ju/.test(subStr)) subStr = subStr.replace(/_ju/, "。");
if(/_dou/.test(subStr)) subStr = subStr.replace(/_dou/gm, ",");
if(/_zyh/.test(subStr)) subStr = subStr.replace(/_zyh/gm, "“");
if(/_yyh/.test(subStr)) subStr = subStr.replace(/_yyh/gm, "”");
if(/_dun/.test(subStr)) subStr = subStr.replace(/_dun/gm, "、");
if(/_ju/.test(subStr)) subStr = subStr.replace(/_ju/gm, "。");
str += subStr;
if (index == value.length-1) str+="";
else str += ","
......
......@@ -11,7 +11,7 @@ export function getUserToken(loginId:string) {
export function getMySqlMs(time?) {
time = time || new Date().valueOf();
time += (8*3600*1000);
// time += (8*3600*1000);
return moment(time).format("YYYY-MM-DD HH:mm:ss");
}
......
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