测试问题修改

This commit is contained in:
tqzhang 2025-01-17 17:23:45 +08:00
parent 4ecaf291a7
commit ed487edfd2
7 changed files with 20 additions and 4 deletions

View File

@ -296,4 +296,6 @@ public interface TestQuestLibraryMapper {
* @return int 结果 * @return int 结果
*/ */
int addQuestionOption(@Param("list") List<QuestionAnswerVo> list,@Param("id") Integer id); int addQuestionOption(@Param("list") List<QuestionAnswerVo> list,@Param("id") Integer id);
void updateQuestionNum(@Param("questionsLibraryId") Integer questionsLibraryId,@Param("size") int size);
} }

View File

@ -288,6 +288,7 @@ public class TestQuestLibraryServiceImpl implements TestQuestLibraryService {
mapper.addQuestionContent(questionsImportVo); mapper.addQuestionContent(questionsImportVo);
mapper.addQuestionOption(questionsImportVo.getQuestionAnswerVoList(), questionsImportVo.getId()); mapper.addQuestionOption(questionsImportVo.getQuestionAnswerVoList(), questionsImportVo.getId());
}); });
mapper.updateQuestionNum(questionsExamVoList.get(0).getQuestionsLibraryId(), questionsExamVoList.size());
} catch (Exception e) { } catch (Exception e) {
log.error(e.toString(),e); log.error(e.toString(),e);
throw e; throw e;

View File

@ -142,6 +142,10 @@
<update id="delQuestionsExam"> <update id="delQuestionsExam">
UPDATE edu_questions_exam SET is_active = '0' WHERE question_id = #{questionId} UPDATE edu_questions_exam SET is_active = '0' WHERE question_id = #{questionId}
</update> </update>
<update id="updateQuestionNum">
UPDATE edu_questions_library SET question_num = question_num + #{size} WHERE questions_library_id =
#{questionsLibraryId}
</update>
<!--试题库列表--> <!--试题库列表-->
<select id="getTestQuestLibrarys" resultType="com.bonus.common.exam.vo.TestQuestLibraryVo"> <select id="getTestQuestLibrarys" resultType="com.bonus.common.exam.vo.TestQuestLibraryVo">
SELECT questions_library_id AS questionsLibraryId, SELECT questions_library_id AS questionsLibraryId,

View File

@ -846,12 +846,12 @@ public class BusinessServiceImpl implements BusinessService {
if(userId != null){ if(userId != null){
for (ConfigurationVo bb:finalList) { for (ConfigurationVo bb:finalList) {
String users = bb.getUserId(); String users = bb.getUserId();
if(users !=null && users.contains(userId)){ if(users !=null && Arrays.asList(users.split(",")).contains(userId)){
bb.setIsActive("1"); bb.setIsActive("1");
} }
} }
}else{
finalList.get(0).setIsActive("10");
} }
return finalList; return finalList;
} }

View File

@ -48,6 +48,9 @@ public class ProMaterialManagement {
@Excel(name = "日常资料数量", type = Excel.Type.EXPORT) @Excel(name = "日常资料数量", type = Excel.Type.EXPORT)
private String rcMaterialNum; private String rcMaterialNum;
@Excel(name = "其他资料数量", type = Excel.Type.EXPORT)
private String otherMaterialNum;
/** 资料名称 */ /** 资料名称 */
@Excel(name = "资料名称", type = Excel.Type.EXPORT) @Excel(name = "资料名称", type = Excel.Type.EXPORT)
private String materialName; private String materialName;

View File

@ -23,7 +23,9 @@
ppi.plan_start_time as startDate, ppi.plan_start_time as startDate,
ppi.plan_end_time as endDate, ppi.plan_end_time as endDate,
IFNULL(ppm.jdMaterialNum, 0) as jdMaterialNum, IFNULL(ppm.jdMaterialNum, 0) as jdMaterialNum,
IFNULL(ppm.rcMaterialNum, 0) as rcMaterialNum IFNULL(ppm.rcMaterialNum, 0) as rcMaterialNum,
IFNULL(ppm.otherMaterialNum, 0) as otherMaterialNum
from (select @rowNum := 0) r,pt_project_info ppi from (select @rowNum := 0) r,pt_project_info ppi
left join sys_dict_data sdd on sdd.dict_value = ppi.pro_type and sdd.dict_type = 'sys_pro_type' and left join sys_dict_data sdd on sdd.dict_value = ppi.pro_type and sdd.dict_type = 'sys_pro_type' and
sdd.status = '0' sdd.status = '0'
@ -33,6 +35,7 @@
SELECT SELECT
sum( IF ( material_type = 1, 1, 0 )) AS jdMaterialNum, sum( IF ( material_type = 1, 1, 0 )) AS jdMaterialNum,
sum( IF ( material_type = 2, 1, 0 )) AS rcMaterialNum, sum( IF ( material_type = 2, 1, 0 )) AS rcMaterialNum,
sum( IF ( material_type = 3, 1, 0 )) AS otherMaterialNum,
pro_id pro_id
FROM FROM
pt_pro_material pt_pro_material

View File

@ -116,6 +116,9 @@
where u.del_flag = '0' where u.del_flag = '0'
<if test="userType != null and userType != ''"> <if test="userType != null and userType != ''">
<if test="userType == '00'">
AND (u.user_type = '00' or u.user_type = '0')
</if>
<if test="userType == '01'"> <if test="userType == '01'">
AND (u.user_type = '01' or u.user_type = '05') AND (u.user_type = '01' or u.user_type = '05')
</if> </if>