Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yafangsuo_applet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yafangsuo_applet
Commits
13f67369
Commit
13f67369
authored
Oct 08, 2023
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
c8ee483b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
18 deletions
+22
-18
serverConfig.xml
serverConfig.xml
+1
-1
main.ts
src/main.ts
+2
-1
public.ts
src/routers/public.ts
+9
-9
dataInit.ts
src/tools/dataInit.ts
+10
-7
No files found.
serverConfig.xml
View file @
13f67369
<config>
<port>
40003
</port>
<db>
<url>
http://1
92.168.0.105
:40002
</url>
<url>
http://1
27.0.0.1
:40002
</url>
<sign>
xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas
</sign>
</db>
<imgUrl>
http://123.207.147.179:40003/
</imgUrl>
...
...
src/main.ts
View file @
13f67369
import
{
initConfig
,
systemConfig
}
from
"./config/systemConfig"
;
import
{
httpServer
}
from
"./net/http_server"
;
import
{
initBasicData
}
from
"./tools/dataInit"
;
import
{
md5PwdStr
}
from
"./tools/system"
;
async
function
lanuch
()
{
/**初始化配置解析 */
await
initConfig
();
/**初始化底表数据 */
//
await initBasicData();
await
initBasicData
();
/**创建http服务 */
httpServer
.
createServer
(
systemConfig
.
port
);
console
.
log
(
'This indicates that the server is started successfully.'
);
...
...
src/routers/public.ts
View file @
13f67369
...
...
@@ -8,15 +8,15 @@ import * as clientConfigEnum from "../config/clientEnum";
import
moment
=
require
(
'moment'
);
export
function
setRouter
(
httpServer
)
{
httpServer
.
post
(
'/public/partypositions'
,
asyncHandler
(
partyPositions
));
httpServer
.
post
(
'/public/type'
,
asyncHandler
(
type
));
httpServer
.
post
(
'/public/entrytype'
,
asyncHandler
(
entryType
));
httpServer
.
post
(
'/public/sex'
,
asyncHandler
(
sexType
));
httpServer
.
post
(
'/public/degree'
,
asyncHandler
(
degreeType
));
httpServer
.
post
(
'/public/administrativeposition'
,
asyncHandler
(
administrativePosition
));
httpServer
.
post
(
'/public/department'
,
asyncHandler
(
department
));
httpServer
.
post
(
'/public/degreetype'
,
asyncHandler
(
degreeType
));
httpServer
.
post
(
'/public/honortype'
,
asyncHandler
(
honorType
));
httpServer
.
post
(
'/
yfs/applet/
public/partypositions'
,
asyncHandler
(
partyPositions
));
httpServer
.
post
(
'/
yfs/applet/
public/type'
,
asyncHandler
(
type
));
httpServer
.
post
(
'/
yfs/applet/
public/entrytype'
,
asyncHandler
(
entryType
));
httpServer
.
post
(
'/
yfs/applet/
public/sex'
,
asyncHandler
(
sexType
));
httpServer
.
post
(
'/
yfs/applet/
public/degree'
,
asyncHandler
(
degreeType
));
httpServer
.
post
(
'/
yfs/applet/
public/administrativeposition'
,
asyncHandler
(
administrativePosition
));
httpServer
.
post
(
'/
yfs/applet/
public/department'
,
asyncHandler
(
department
));
httpServer
.
post
(
'/
yfs/applet/
public/degreetype'
,
asyncHandler
(
degreeType
));
httpServer
.
post
(
'/
yfs/applet/
public/honortype'
,
asyncHandler
(
honorType
));
httpServer
.
post
(
'/yfs/applet/public/themetype'
,
asyncHandler
(
themeType
));
httpServer
.
post
(
'/yfs/applet/public/paytype'
,
asyncHandler
(
payType
));
httpServer
.
post
(
'/yfs/applet/public/paytime'
,
asyncHandler
(
getPayTime
));
...
...
src/tools/dataInit.ts
View file @
13f67369
...
...
@@ -69,9 +69,9 @@ const DepartmentConfig = {
}
export
async
function
initBasicData
()
{
//
await initPartyMember();
//
await initLearningPower();
await
initOrganizationalLife
();
await
initPartyMember
();
await
initLearningPower
();
//
await initOrganizationalLife();
// await initPartyVanguard();
// await initBranchSystem();
// await initInforMation();
...
...
@@ -248,10 +248,10 @@ async function initLearningPower() {
bId
:
null
,
dayIntegral
:
null
,
totalIntegral
:
null
,
data
Time
:
null
,
fileName
:
"学习强国时长排名1693526400000.xlsx"
,
fileType
:
6
,
uploadTime
:
moment
(
new
Date
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)
data
Year
:
null
,
dataMonth
:
null
,
dataDay
:
null
,
dataTime
:
null
}
for
(
let
i
=
0
;
i
<=
3
;
i
++
)
{
...
...
@@ -270,6 +270,9 @@ async function initLearningPower() {
}
if
(
value
||
value
==
0
)
addDataInfo
[
key
]
=
value
;
}
addDataInfo
[
"dataYear"
]
=
2023
;
addDataInfo
[
"dataMonth"
]
=
moment
(
"2023."
+
sheepKey
).
month
()
+
1
;
addDataInfo
[
"dataDay"
]
=
moment
(
"2023."
+
sheepKey
).
date
();
addDataInfo
[
"dataTime"
]
=
moment
(
"2023."
+
sheepKey
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
if
(
addDataInfo
.
pmId
)
addList
.
push
(
addDataInfo
);
id
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment