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
608a0a9d
Commit
608a0a9d
authored
Oct 15, 2023
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
a12ef574
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
serverConfig.xml
serverConfig.xml
+2
-1
memberLearning.ts
src/biz/memberLearning.ts
+6
-3
No files found.
serverConfig.xml
View file @
608a0a9d
...
...
@@ -5,6 +5,6 @@
<sign>
xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas
</sign>
</db>
<imgUrl>
http://123.207.147.179:40003/
</imgUrl>
<fileIP>
http://
192.168.0.105
:40004
</fileIP>
<fileIP>
http://
218.78.62.29
:40004
</fileIP>
</config>
\ No newline at end of file
src/biz/memberLearning.ts
View file @
608a0a9d
...
...
@@ -152,6 +152,7 @@ export async function updateRateOfLearning(rlId:number, rateOfLearning:number) {
let
learningInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
学习进度表
,
{
rlId
},
[
"rateOfLearning"
]);
if
(
learningInfo
.
rateOfLearning
<
rateOfLearning
)
{
let
row
=
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
学习进度表
,
{
rateOfLearning
,
learningCompleted
},
{
rlId
});
console
.
log
(
row
);
}
return
{
isSuccess
:
true
};
...
...
@@ -162,9 +163,10 @@ export async function updateDocRateOfLearning(rlId:number, fileName:string) {
let
rateLearningInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
学习进度表
,
{
rlId
},
[
"pmId"
,
"rlId"
,
"textSchedule"
]);
if
(
!
rateLearningInfo
||
!
rateLearningInfo
.
rlId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
,
`更新学习进度:rlid:
${
rlId
}
`
);
let
{
pmId
}
=
rateLearningInfo
;
let
learningInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
学习进度表
,
{
pmId
},
[
"
fileName"
,
"pmId"
,
"courseEntryType
"
]);
let
learningInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
学习进度表
,
{
pmId
},
[
"
pmId"
,
"mlId
"
]);
if
(
!
learningInfo
||
!
learningInfo
.
pmId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
,
`更新学习进度:pmId:
${
pmId
}
`
);
if
(
learningInfo
.
courseEntryType
!=
2
)
throw
new
BizError
(
ERRORENUM
.
该进度不是文字学习
,
`
${
pmId
}
`
);
let
mlInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
党员学习表
,
{
mlId
:
learningInfo
.
mlId
},
[
"courseEntryType"
]);
if
(
mlInfo
.
courseEntryType
!=
2
)
throw
new
BizError
(
ERRORENUM
.
该进度不是文字学习
,
`
${
pmId
}
`
);
let
textSchedule
=
!
rateLearningInfo
.
textSchedule
?
[]
:
JSON
.
parse
(
rateLearningInfo
.
textSchedule
);
...
...
@@ -175,7 +177,8 @@ export async function updateDocRateOfLearning(rlId:number, fileName:string) {
}
if
(
isUpdate
)
{
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
学习进度表
,
{
textSchedule
:
JSON
.
stringify
(
textSchedule
)},
{
rlId
});
let
row
=
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
学习进度表
,
{
textSchedule
:
JSON
.
stringify
(
textSchedule
)},
{
rlId
});
console
.
log
();
}
return
{
isSuccess
:
true
};
...
...
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