Commit 608a0a9d by chenjinjing

no message

parent a12ef574
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign> <sign>xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas</sign>
</db> </db>
<imgUrl>http://123.207.147.179:40003/</imgUrl> <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> </config>
\ No newline at end of file
...@@ -152,6 +152,7 @@ export async function updateRateOfLearning(rlId:number, rateOfLearning:number) { ...@@ -152,6 +152,7 @@ export async function updateRateOfLearning(rlId:number, rateOfLearning:number) {
let learningInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.学习进度表, {rlId}, ["rateOfLearning"]); let learningInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.学习进度表, {rlId}, ["rateOfLearning"]);
if (learningInfo.rateOfLearning < rateOfLearning) { if (learningInfo.rateOfLearning < rateOfLearning) {
let row = await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.学习进度表, {rateOfLearning, learningCompleted}, {rlId}); let row = await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.学习进度表, {rateOfLearning, learningCompleted}, {rlId});
console.log(row);
} }
return {isSuccess:true}; return {isSuccess:true};
...@@ -162,9 +163,10 @@ export async function updateDocRateOfLearning(rlId:number, fileName:string) { ...@@ -162,9 +163,10 @@ export async function updateDocRateOfLearning(rlId:number, fileName:string) {
let rateLearningInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.学习进度表, {rlId}, ["pmId", "rlId", "textSchedule"]); let rateLearningInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.学习进度表, {rlId}, ["pmId", "rlId", "textSchedule"]);
if (!rateLearningInfo || !rateLearningInfo.rlId) throw new BizError(ERRORENUM.目标数据不存在, `更新学习进度:rlid:${rlId}`); if (!rateLearningInfo || !rateLearningInfo.rlId) throw new BizError(ERRORENUM.目标数据不存在, `更新学习进度:rlid:${rlId}`);
let {pmId} = rateLearningInfo; 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 || !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); let textSchedule = !rateLearningInfo.textSchedule ? [] : JSON.parse( rateLearningInfo.textSchedule);
...@@ -175,7 +177,8 @@ export async function updateDocRateOfLearning(rlId:number, fileName:string) { ...@@ -175,7 +177,8 @@ export async function updateDocRateOfLearning(rlId:number, fileName:string) {
} }
if (isUpdate) { 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}; return {isSuccess:true};
......
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