diff --git a/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseScoreWeightDao.java b/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseScoreWeightDao.java new file mode 100644 index 00000000..49457654 --- /dev/null +++ b/web/src/main/java/com/ibeetl/jlw/dao/TeacherOpenCourseScoreWeightDao.java @@ -0,0 +1,27 @@ +package com.ibeetl.jlw.dao; + +import java.util.List; +import java.util.Map; + +import com.ibeetl.jlw.entity.*; +import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreWeightQuery; + +import org.beetl.sql.mapper.annotation.SqlResource; +import org.beetl.sql.mapper.BaseMapper; +import org.beetl.sql.core.engine.PageQuery; +import org.beetl.sql.mapper.annotation.Update; + +/** + * 成绩权重 Dao + */ +@SqlResource("jlw.teacherOpenCourseScoreWeight") +public interface TeacherOpenCourseScoreWeightDao extends BaseMapper{ + PageQuery queryByCondition(PageQuery query); + PageQuery queryByConditionQuery(PageQuery query); + @Update + void deleteTeacherOpenCourseScoreWeightByIds(String ids); + @Update + int updateGivenByIds(TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery); + List getByIds(String ids); + List getValuesByQuery(TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery); +} diff --git a/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScoreWeight.java b/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScoreWeight.java new file mode 100644 index 00000000..7d3ba35e --- /dev/null +++ b/web/src/main/java/com/ibeetl/jlw/entity/TeacherOpenCourseScoreWeight.java @@ -0,0 +1,555 @@ +package com.ibeetl.jlw.entity; + +import javax.validation.constraints.NotNull; + +import com.ibeetl.admin.core.entity.BaseEntity; +import org.beetl.sql.annotation.entity.*; + +import com.ibeetl.admin.core.util.ValidateConfig; + +import com.ibeetl.admin.core.annotation.Dict; + +import java.math.BigDecimal; +import java.util.Date; + +/* +* 教师-我的课程-成绩权重 +* gen by Spring Boot2 Admin 2022-09-30 +*/ +public class TeacherOpenCourseScoreWeight extends BaseEntity{ + + //课程id + @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class) + // @SeqID(name = ORACLE_CORE_SEQ_NAME) + @AssignID(value = "maskAutoID",param = "com.ibeetl.jlw.entity.TeacherOpenCourseScoreWeight") + + private Long teacherOpenCourseId ; + + //老师id + + private Long teacherId ; + + //签到成绩(权重) + + private String signInResult ; + + //章节联系成绩(权重) + + private String chapterContactResult ; + + //课程实操成绩(权重) + + private String coursePracticeResult ; + + //作业成绩(权重) + + private String homeworkResult ; + + //考试成绩(权重) + + private String examinationResult ; + + //互动成绩(权重) + + private String interactionResult ; + + //签到成绩设置1签到次数2到课到率 + + private String signInResultSetting ; + + //签到次数_每签到一次分数 + + private String signInScore ; + + //章节联系设置1正确率积分2平均完成度计分 + + private String chapterContactResultSetting ; + + //课程实操成绩设置1平均分2平均完成进度 + + private String coursePracticeResultSetting ; + + //作业成绩设置1平均分(默认1) + + private String homeworkResultSetting ; + + //考试成绩设置1平均分(默认1) + + private String examinationResultSetting ; + + //互动成绩设置1留言2提问3回答 + + private String interactionResultSetting ; + + //互动成绩留言得分 + + private String interactionResultMessageScore ; + + //互动成绩提问得分 + + private String interactionResultQuestionScore ; + + //互动成绩回答得分 + + private String interactionResultAnswerScore ; + + //成绩状态设置1二分法2等级法3字母法 + + private String resultStatusSetting ; + + //二分法分数 + + private String dichotomyScore ; + + //等级法优秀分数 + + private String excellentScore ; + + //等级法良好分数 + + private String goodScore ; + + //等级法中等分数 + + private String secondaryScore ; + + //等级法及格分数 + + private String passScore ; + + //字母法A分数 + + private String letteraScore ; + + //字母法B分数 + + private String letterbScore ; + + //字母法C分数 + + private String lettercScore ; + + //字母法D分数 + + private String letterdScore ; + + //组织ID + + private Long orgId ; + + //用户ID + + private Long userId ; + + //创建时间 + + private Long createTime ; + + public TeacherOpenCourseScoreWeight(){ + } + + /**课程id + *@return + */ + public Long getTeacherOpenCourseId(){ + return teacherOpenCourseId; + } + /**课程id + *@param teacherOpenCourseId + */ + public void setTeacherOpenCourseId(Long teacherOpenCourseId){ + this.teacherOpenCourseId = teacherOpenCourseId; + } + + /**老师id + *@return + */ + public Long getTeacherId(){ + return teacherId; + } + /**老师id + *@param teacherId + */ + public void setTeacherId(Long teacherId){ + this.teacherId = teacherId; + } + + /**签到成绩(权重) + *@return + */ + public String getSignInResult(){ + return signInResult; + } + /**签到成绩(权重) + *@param signInResult + */ + public void setSignInResult(String signInResult){ + this.signInResult = signInResult; + } + + /**章节联系成绩(权重) + *@return + */ + public String getChapterContactResult(){ + return chapterContactResult; + } + /**章节联系成绩(权重) + *@param chapterContactResult + */ + public void setChapterContactResult(String chapterContactResult){ + this.chapterContactResult = chapterContactResult; + } + + /**课程实操成绩(权重) + *@return + */ + public String getCoursePracticeResult(){ + return coursePracticeResult; + } + /**课程实操成绩(权重) + *@param coursePracticeResult + */ + public void setCoursePracticeResult(String coursePracticeResult){ + this.coursePracticeResult = coursePracticeResult; + } + + /**作业成绩(权重) + *@return + */ + public String getHomeworkResult(){ + return homeworkResult; + } + /**作业成绩(权重) + *@param homeworkResult + */ + public void setHomeworkResult(String homeworkResult){ + this.homeworkResult = homeworkResult; + } + + /**考试成绩(权重) + *@return + */ + public String getExaminationResult(){ + return examinationResult; + } + /**考试成绩(权重) + *@param examinationResult + */ + public void setExaminationResult(String examinationResult){ + this.examinationResult = examinationResult; + } + + /**互动成绩(权重) + *@return + */ + public String getInteractionResult(){ + return interactionResult; + } + /**互动成绩(权重) + *@param interactionResult + */ + public void setInteractionResult(String interactionResult){ + this.interactionResult = interactionResult; + } + + /**签到成绩设置1签到次数2到课到率 + *@return + */ + public String getSignInResultSetting(){ + return signInResultSetting; + } + /**签到成绩设置1签到次数2到课到率 + *@param signInResultSetting + */ + public void setSignInResultSetting(String signInResultSetting){ + this.signInResultSetting = signInResultSetting; + } + + /**签到次数_每签到一次分数 + *@return + */ + public String getSignInScore(){ + return signInScore; + } + /**签到次数_每签到一次分数 + *@param signInScore + */ + public void setSignInScore(String signInScore){ + this.signInScore = signInScore; + } + + /**章节联系设置1正确率积分2平均完成度计分 + *@return + */ + public String getChapterContactResultSetting(){ + return chapterContactResultSetting; + } + /**章节联系设置1正确率积分2平均完成度计分 + *@param chapterContactResultSetting + */ + public void setChapterContactResultSetting(String chapterContactResultSetting){ + this.chapterContactResultSetting = chapterContactResultSetting; + } + + /**课程实操成绩设置1平均分2平均完成进度 + *@return + */ + public String getCoursePracticeResultSetting(){ + return coursePracticeResultSetting; + } + /**课程实操成绩设置1平均分2平均完成进度 + *@param coursePracticeResultSetting + */ + public void setCoursePracticeResultSetting(String coursePracticeResultSetting){ + this.coursePracticeResultSetting = coursePracticeResultSetting; + } + + /**作业成绩设置1平均分(默认1) + *@return + */ + public String getHomeworkResultSetting(){ + return homeworkResultSetting; + } + /**作业成绩设置1平均分(默认1) + *@param homeworkResultSetting + */ + public void setHomeworkResultSetting(String homeworkResultSetting){ + this.homeworkResultSetting = homeworkResultSetting; + } + + /**考试成绩设置1平均分(默认1) + *@return + */ + public String getExaminationResultSetting(){ + return examinationResultSetting; + } + /**考试成绩设置1平均分(默认1) + *@param examinationResultSetting + */ + public void setExaminationResultSetting(String examinationResultSetting){ + this.examinationResultSetting = examinationResultSetting; + } + + /**互动成绩设置1留言2提问3回答 + *@return + */ + public String getInteractionResultSetting(){ + return interactionResultSetting; + } + /**互动成绩设置1留言2提问3回答 + *@param interactionResultSetting + */ + public void setInteractionResultSetting(String interactionResultSetting){ + this.interactionResultSetting = interactionResultSetting; + } + + /**互动成绩留言得分 + *@return + */ + public String getInteractionResultMessageScore(){ + return interactionResultMessageScore; + } + /**互动成绩留言得分 + *@param interactionResultMessageScore + */ + public void setInteractionResultMessageScore(String interactionResultMessageScore){ + this.interactionResultMessageScore = interactionResultMessageScore; + } + + /**互动成绩提问得分 + *@return + */ + public String getInteractionResultQuestionScore(){ + return interactionResultQuestionScore; + } + /**互动成绩提问得分 + *@param interactionResultQuestionScore + */ + public void setInteractionResultQuestionScore(String interactionResultQuestionScore){ + this.interactionResultQuestionScore = interactionResultQuestionScore; + } + + /**互动成绩回答得分 + *@return + */ + public String getInteractionResultAnswerScore(){ + return interactionResultAnswerScore; + } + /**互动成绩回答得分 + *@param interactionResultAnswerScore + */ + public void setInteractionResultAnswerScore(String interactionResultAnswerScore){ + this.interactionResultAnswerScore = interactionResultAnswerScore; + } + + /**成绩状态设置1二分法2等级法3字母法 + *@return + */ + public String getResultStatusSetting(){ + return resultStatusSetting; + } + /**成绩状态设置1二分法2等级法3字母法 + *@param resultStatusSetting + */ + public void setResultStatusSetting(String resultStatusSetting){ + this.resultStatusSetting = resultStatusSetting; + } + + /**二分法分数 + *@return + */ + public String getDichotomyScore(){ + return dichotomyScore; + } + /**二分法分数 + *@param dichotomyScore + */ + public void setDichotomyScore(String dichotomyScore){ + this.dichotomyScore = dichotomyScore; + } + + /**等级法优秀分数 + *@return + */ + public String getExcellentScore(){ + return excellentScore; + } + /**等级法优秀分数 + *@param excellentScore + */ + public void setExcellentScore(String excellentScore){ + this.excellentScore = excellentScore; + } + + /**等级法良好分数 + *@return + */ + public String getGoodScore(){ + return goodScore; + } + /**等级法良好分数 + *@param goodScore + */ + public void setGoodScore(String goodScore){ + this.goodScore = goodScore; + } + + /**等级法中等分数 + *@return + */ + public String getSecondaryScore(){ + return secondaryScore; + } + /**等级法中等分数 + *@param secondaryScore + */ + public void setSecondaryScore(String secondaryScore){ + this.secondaryScore = secondaryScore; + } + + /**等级法及格分数 + *@return + */ + public String getPassScore(){ + return passScore; + } + /**等级法及格分数 + *@param passScore + */ + public void setPassScore(String passScore){ + this.passScore = passScore; + } + + /**字母法A分数 + *@return + */ + public String getLetteraScore(){ + return letteraScore; + } + /**字母法A分数 + *@param letteraScore + */ + public void setLetteraScore(String letteraScore){ + this.letteraScore = letteraScore; + } + + /**字母法B分数 + *@return + */ + public String getLetterbScore(){ + return letterbScore; + } + /**字母法B分数 + *@param letterbScore + */ + public void setLetterbScore(String letterbScore){ + this.letterbScore = letterbScore; + } + + /**字母法C分数 + *@return + */ + public String getLettercScore(){ + return lettercScore; + } + /**字母法C分数 + *@param lettercScore + */ + public void setLettercScore(String lettercScore){ + this.lettercScore = lettercScore; + } + + /**字母法D分数 + *@return + */ + public String getLetterdScore(){ + return letterdScore; + } + /**字母法D分数 + *@param letterdScore + */ + public void setLetterdScore(String letterdScore){ + this.letterdScore = letterdScore; + } + + /**组织ID + *@return + */ + public Long getOrgId(){ + return orgId; + } + /**组织ID + *@param orgId + */ + public void setOrgId(Long orgId){ + this.orgId = orgId; + } + + /**用户ID + *@return + */ + public Long getUserId(){ + return userId; + } + /**用户ID + *@param userId + */ + public void setUserId(Long userId){ + this.userId = userId; + } + + /**创建时间 + *@return + */ + public Long getCreateTime(){ + return createTime; + } + /**创建时间 + *@param createTime + */ + public void setCreateTime(Long createTime){ + this.createTime = createTime; + } + + +} diff --git a/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseScoreWeightService.java b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseScoreWeightService.java new file mode 100644 index 00000000..ceb14f94 --- /dev/null +++ b/web/src/main/java/com/ibeetl/jlw/service/TeacherOpenCourseScoreWeightService.java @@ -0,0 +1,163 @@ +package com.ibeetl.jlw.service; + +import java.io.*; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.math.BigDecimal; + +import cn.jlw.util.ToolUtils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.ibeetl.admin.core.entity.CoreUser; +import com.ibeetl.admin.core.util.TimeTool; +import com.ibeetl.admin.core.web.JsonResult; +import com.ibeetl.admin.core.web.JsonReturnCode; +import com.ibeetl.jlw.dao.TeacherOpenCourseScoreWeightDao; +import com.ibeetl.jlw.entity.TeacherOpenCourseScoreWeight; +import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreWeightQuery; +import com.ibeetl.jlw.entity.FileEntity; + +import com.ibeetl.admin.core.service.CoreBaseService; +import com.ibeetl.admin.core.util.PlatformException; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.beetl.sql.core.engine.PageQuery; +import org.beetl.sql.core.SqlId; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; + +/** + * 成绩权重 Service + * 当分布式ID开启后请勿使用insert(*,true) + */ + +@Service +@Transactional +public class TeacherOpenCourseScoreWeightService extends CoreBaseService{ + + @Resource private TeacherOpenCourseScoreWeightDao teacherOpenCourseScoreWeightDao; + + public PageQueryqueryByCondition(PageQuery query){ + PageQuery ret = teacherOpenCourseScoreWeightDao.queryByCondition(query); + queryListAfter(ret.getList()); + return ret; + } + + public PageQueryqueryByConditionQuery(PageQuery query){ + PageQuery ret = teacherOpenCourseScoreWeightDao.queryByConditionQuery(query); + queryListAfter(ret.getList()); + return ret; + } + + public void deleteByList(List list){ + String ids = ""; + ToolUtils.deleteNullList(list); + for(int i=0;null != list && i teacherOpenCourseScoreWeightList = new ArrayList<>(); + try { + teacherOpenCourseScoreWeightList = JSON.parseArray(teacherOpenCourseScoreWeightQuery.getTeacherOpenCourseScoreWeightJsonStr(), TeacherOpenCourseScoreWeight.class); + } catch (Exception e) { + try { + teacherOpenCourseScoreWeightList.add(JSONObject.parseObject(teacherOpenCourseScoreWeightQuery.getTeacherOpenCourseScoreWeightJsonStr(), TeacherOpenCourseScoreWeight.class)); + } catch (Exception e1) {} + } + ToolUtils.deleteNullList(teacherOpenCourseScoreWeightList); + if(null != teacherOpenCourseScoreWeightList && teacherOpenCourseScoreWeightList.size()>0){ + for(int i=0;i 0; + if(!flag){ + msg = "更新指定参数失败"; + } + }else{ + msg = "指定参数为空"; + } + return msg; + } + + public List getValues (Object paras){ + return sqlManager.select(SqlId.of("jlw.teacherOpenCourseScoreWeight.getTeacherOpenCourseScoreWeightValues"), TeacherOpenCourseScoreWeight.class, paras); + } + + public List getValuesByQuery (TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery){ + return teacherOpenCourseScoreWeightDao.getValuesByQuery(teacherOpenCourseScoreWeightQuery); + } + + public TeacherOpenCourseScoreWeight getInfo (Long teacherOpenCourseId){ + TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery = new TeacherOpenCourseScoreWeightQuery(); + teacherOpenCourseScoreWeightQuery.setTeacherOpenCourseId(teacherOpenCourseId); + List list = teacherOpenCourseScoreWeightDao.getValuesByQuery(teacherOpenCourseScoreWeightQuery); + if(null != list && list.size()>0){ + return list.get(0); + }else{ + return null; + } + } + + public TeacherOpenCourseScoreWeight getInfo (TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery){ + List list = teacherOpenCourseScoreWeightDao.getValuesByQuery(teacherOpenCourseScoreWeightQuery); + if(null != list && list.size()>0){ + return list.get(0); + }else{ + return null; + } + } + +} diff --git a/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseScoreWeightController.java b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseScoreWeightController.java new file mode 100644 index 00000000..78348394 --- /dev/null +++ b/web/src/main/java/com/ibeetl/jlw/web/TeacherOpenCourseScoreWeightController.java @@ -0,0 +1,223 @@ +package com.ibeetl.jlw.web; + +import cn.jlw.Interceptor.RFile; +import cn.jlw.Interceptor.SCoreUser; +import cn.jlw.Interceptor.GetFile; +import cn.jlw.util.ToolUtils; +import cn.jlw.validate.ValidateConfig; +import com.ibeetl.admin.core.entity.CoreUser; +import com.ibeetl.admin.core.file.FileService; +import com.ibeetl.admin.core.util.ConvertUtil; +import com.ibeetl.admin.core.util.PlatformException; +import com.ibeetl.admin.core.util.TimeTool; +import com.ibeetl.admin.core.web.JsonResult; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.beetl.sql.core.engine.PageQuery; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.validation.annotation.Validated; + +import com.ibeetl.admin.console.web.dto.DictExcelImportData; +import com.ibeetl.admin.console.web.query.UserQuery; +import com.ibeetl.admin.core.annotation.Function; +import com.ibeetl.jlw.entity.*; +import com.ibeetl.jlw.service.*; +import com.ibeetl.jlw.web.query.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.math.BigDecimal; + +import javax.annotation.Resource; + +/** + * 成绩权重 教师-我的课程-成绩权重 接口 + * 切记不要对非线程安全的静态变量进行写操作 + */ + +@RestController +public class TeacherOpenCourseScoreWeightController{ + + private final Log log = LogFactory.getLog(this.getClass()); + private static final String MODEL = "/jlw/teacherOpenCourseScoreWeight"; + private static final String API = "/api/teacherOpenCourseScoreWeight"; + + + @Resource private TeacherOpenCourseScoreWeightService teacherOpenCourseScoreWeightService; + + @Resource FileService fileService; + + /* 前端接口 */ + + @PostMapping(API + "/getPageList.do") + public JsonResult getPageList(TeacherOpenCourseScoreWeightQuery condition,@SCoreUser CoreUser coreUser){ + if(null == coreUser){ + return JsonResult.failMessage("请登录后再操作"); + }else{ + PageQuery page = condition.getPageQuery(); + teacherOpenCourseScoreWeightService.queryByConditionQuery(page); + return JsonResult.success(page); + } + } + + + @GetMapping(API + "/getInfo.do") + public JsonResultgetInfo(TeacherOpenCourseScoreWeightQuery param,@SCoreUser CoreUser coreUser) { + if(null == coreUser){ + return JsonResult.failMessage("请登录后再操作"); + }else{ + TeacherOpenCourseScoreWeight teacherOpenCourseScoreWeight = teacherOpenCourseScoreWeightService.getInfo(param); + return JsonResult.success(teacherOpenCourseScoreWeight); + } + } + + + @GetMapping(API + "/getList.do") + public JsonResult>getList(TeacherOpenCourseScoreWeightQuery param,@SCoreUser CoreUser coreUser) { + if(null == coreUser){ + return JsonResult.failMessage("请登录后再操作"); + }else{ + Listlist = teacherOpenCourseScoreWeightService.getValuesByQuery(param); + return JsonResult.success(list); + } + } + + + /* 后台页面 */ + + @GetMapping(MODEL + "/index.do") + @Function("teacherOpenCourseScoreWeight.query") + public ModelAndView index() { + ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseScoreWeight/index.html") ; + view.addObject("search", TeacherOpenCourseScoreWeightQuery.class.getName()); + return view; + } + + @GetMapping(MODEL + "/edit.do") + @Function("teacherOpenCourseScoreWeight.edit") + public ModelAndView edit(Long teacherOpenCourseId) { + ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseScoreWeight/edit.html"); + TeacherOpenCourseScoreWeight teacherOpenCourseScoreWeight = teacherOpenCourseScoreWeightService.queryById(teacherOpenCourseId); + view.addObject("teacherOpenCourseScoreWeight", teacherOpenCourseScoreWeight); + return view; + } + + @GetMapping(MODEL + "/add.do") + @Function("teacherOpenCourseScoreWeight.add") + public ModelAndView add(Long teacherOpenCourseId) { + ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseScoreWeight/add.html"); + if(null != teacherOpenCourseId){ + TeacherOpenCourseScoreWeight teacherOpenCourseScoreWeight = teacherOpenCourseScoreWeightService.queryById(teacherOpenCourseId); + view.addObject("teacherOpenCourseScoreWeight", teacherOpenCourseScoreWeight); + }else { + view.addObject("teacherOpenCourseScoreWeight", new TeacherOpenCourseScoreWeight()); + } + return view; + } + + /* 后台接口 */ + + @PostMapping(MODEL + "/list.json") + @Function("teacherOpenCourseScoreWeight.query") + public JsonResult list(TeacherOpenCourseScoreWeightQuery condition){ + PageQuery page = condition.getPageQuery(); + teacherOpenCourseScoreWeightService.queryByCondition(page); + return JsonResult.success(page); + } + + @PostMapping(MODEL + "/addAll.json") + @Function("teacherOpenCourseScoreWeight.add") + public JsonResult addAll(TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery,@SCoreUser CoreUser coreUser){ + if(null == coreUser){ + return JsonResult.failMessage("请登录后再操作"); + }else{ + teacherOpenCourseScoreWeightQuery.setUserId(coreUser.getId()); + teacherOpenCourseScoreWeightQuery.setOrgId(coreUser.getOrgId()); + String msg = teacherOpenCourseScoreWeightService.addAll(teacherOpenCourseScoreWeightQuery); + if (StringUtils.isBlank(msg)) { + return JsonResult.success(); + } else { + return JsonResult.failMessage("新增失败,"+msg); + } + } + } + + @PostMapping(MODEL + "/add.json") + @Function("teacherOpenCourseScoreWeight.add") + public JsonResult add(@Validated(ValidateConfig.ADD.class) TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery, BindingResult result,@SCoreUser CoreUser coreUser){ + if(result.hasErrors()){ + return JsonResult.failMessage(result); + }else{ + teacherOpenCourseScoreWeightQuery.setUserId(coreUser.getId()); + teacherOpenCourseScoreWeightQuery.setOrgId(coreUser.getOrgId()); + return teacherOpenCourseScoreWeightService.add(teacherOpenCourseScoreWeightQuery); + } + } + + @PostMapping(MODEL + "/edit.json") + @Function("teacherOpenCourseScoreWeight.edit") + public JsonResult update(@Validated(ValidateConfig.UPDATE.class) TeacherOpenCourseScoreWeightQuery teacherOpenCourseScoreWeightQuery, BindingResult result) { + if(result.hasErrors()){ + return JsonResult.failMessage(result); + }else { + teacherOpenCourseScoreWeightQuery.setUserId(null); + teacherOpenCourseScoreWeightQuery.setOrgId(null); + String msg = teacherOpenCourseScoreWeightService.edit(teacherOpenCourseScoreWeightQuery); + if (StringUtils.isBlank(msg)) { + return JsonResult.success(); + } else { + return JsonResult.failMessage("更新失败,"+msg); + } + } + } + + + @GetMapping(MODEL + "/view.json") + @Function("teacherOpenCourseScoreWeight.query") + public JsonResultqueryInfo(Long teacherOpenCourseId) { + TeacherOpenCourseScoreWeight teacherOpenCourseScoreWeight = teacherOpenCourseScoreWeightService.queryById( teacherOpenCourseId); + return JsonResult.success(teacherOpenCourseScoreWeight); + } + + @GetMapping(MODEL + "/getValues.json") + @Function("teacherOpenCourseScoreWeight.query") + public JsonResult>getValues(TeacherOpenCourseScoreWeightQuery param) { + Listlist = teacherOpenCourseScoreWeightService.getValuesByQuery(param); + return JsonResult.success(list); + } + + + @PostMapping(MODEL + "/delete.json") + @Function("teacherOpenCourseScoreWeight.delete") + @ResponseBody + public JsonResult delete(String ids) { + teacherOpenCourseScoreWeightService.deleteTeacherOpenCourseScoreWeight(ids); + return JsonResult.success(); + } + + +} diff --git a/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseScoreWeightQuery.java b/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseScoreWeightQuery.java new file mode 100644 index 00000000..7f081107 --- /dev/null +++ b/web/src/main/java/com/ibeetl/jlw/web/query/TeacherOpenCourseScoreWeightQuery.java @@ -0,0 +1,351 @@ +package com.ibeetl.jlw.web.query; + +import cn.jlw.validate.ValidateConfig; +import com.ibeetl.jlw.entity.TeacherOpenCourseScoreWeight; +import org.apache.commons.lang3.StringUtils; +import com.ibeetl.admin.core.annotation.Query; +import com.ibeetl.admin.core.util.Tool; +import com.ibeetl.admin.core.util.enums.CoreDictType; +import com.ibeetl.admin.core.web.query.PageParam; + +import javax.validation.constraints.NotNull; +import java.math.BigDecimal; +import java.util.Date; + +/** + *成绩权重查询 + */ +public class TeacherOpenCourseScoreWeightQuery extends PageParam { + @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class) + @Query(name = "课程id", display = false) + private Long teacherOpenCourseId; + @Query(name = "老师id", display = false) + private Long teacherId; + @Query(name = "签到成绩(权重)", display = false) + private String signInResult; + @Query(name = "章节联系成绩(权重)", display = false) + private String chapterContactResult; + @Query(name = "课程实操成绩(权重)", display = false) + private String coursePracticeResult; + @Query(name = "作业成绩(权重)", display = false) + private String homeworkResult; + @Query(name = "考试成绩(权重)", display = false) + private String examinationResult; + @Query(name = "互动成绩(权重)", display = false) + private String interactionResult; + @Query(name = "签到成绩设置1签到次数2到课到率", display = false) + private String signInResultSetting; + @Query(name = "签到次数_每签到一次分数", display = false) + private String signInScore; + @Query(name = "章节联系设置1正确率积分2平均完成度计分", display = false) + private String chapterContactResultSetting; + @Query(name = "课程实操成绩设置1平均分2平均完成进度", display = false) + private String coursePracticeResultSetting; + @Query(name = "作业成绩设置1平均分(默认1)", display = false) + private String homeworkResultSetting; + @Query(name = "考试成绩设置1平均分(默认1)", display = false) + private String examinationResultSetting; + @Query(name = "互动成绩设置1留言2提问3回答", display = false) + private String interactionResultSetting; + @Query(name = "互动成绩留言得分", display = false) + private String interactionResultMessageScore; + @Query(name = "互动成绩提问得分", display = false) + private String interactionResultQuestionScore; + @Query(name = "互动成绩回答得分", display = false) + private String interactionResultAnswerScore; + @Query(name = "成绩状态设置1二分法2等级法3字母法", display = false) + private String resultStatusSetting; + @Query(name = "二分法分数", display = false) + private String dichotomyScore; + @Query(name = "等级法优秀分数", display = false) + private String excellentScore; + @Query(name = "等级法良好分数", display = false) + private String goodScore; + @Query(name = "等级法中等分数", display = false) + private String secondaryScore; + @Query(name = "等级法及格分数", display = false) + private String passScore; + @Query(name = "字母法A分数", display = false) + private String letteraScore; + @Query(name = "字母法B分数", display = false) + private String letterbScore; + @Query(name = "字母法C分数", display = false) + private String lettercScore; + @Query(name = "字母法D分数", display = false) + private String letterdScore; + @Query(name = "组织ID", display = false) + private Long orgId; + @Query(name = "用户ID", display = false) + private Long userId; + @Query(name = "创建时间", display = false) + private Long createTime; + + private String teacherOpenCourseIdPlural; + private String teacherIdPlural; + private String orgIdPlural; + private String userIdPlural; + + private String teacherOpenCourseScoreWeightJsonStr;//json格式 + + private String _given;//指定更新的特定字段,多个逗号隔开 + + public Long getTeacherOpenCourseId(){ + return teacherOpenCourseId; + } + public void setTeacherOpenCourseId(Long teacherOpenCourseId ){ + this.teacherOpenCourseId = teacherOpenCourseId; + } + public Long getTeacherId(){ + return teacherId; + } + public void setTeacherId(Long teacherId ){ + this.teacherId = teacherId; + } + public String getSignInResult(){ + return signInResult; + } + public void setSignInResult(String signInResult ){ + this.signInResult = signInResult; + } + public String getChapterContactResult(){ + return chapterContactResult; + } + public void setChapterContactResult(String chapterContactResult ){ + this.chapterContactResult = chapterContactResult; + } + public String getCoursePracticeResult(){ + return coursePracticeResult; + } + public void setCoursePracticeResult(String coursePracticeResult ){ + this.coursePracticeResult = coursePracticeResult; + } + public String getHomeworkResult(){ + return homeworkResult; + } + public void setHomeworkResult(String homeworkResult ){ + this.homeworkResult = homeworkResult; + } + public String getExaminationResult(){ + return examinationResult; + } + public void setExaminationResult(String examinationResult ){ + this.examinationResult = examinationResult; + } + public String getInteractionResult(){ + return interactionResult; + } + public void setInteractionResult(String interactionResult ){ + this.interactionResult = interactionResult; + } + public String getSignInResultSetting(){ + return signInResultSetting; + } + public void setSignInResultSetting(String signInResultSetting ){ + this.signInResultSetting = signInResultSetting; + } + public String getSignInScore(){ + return signInScore; + } + public void setSignInScore(String signInScore ){ + this.signInScore = signInScore; + } + public String getChapterContactResultSetting(){ + return chapterContactResultSetting; + } + public void setChapterContactResultSetting(String chapterContactResultSetting ){ + this.chapterContactResultSetting = chapterContactResultSetting; + } + public String getCoursePracticeResultSetting(){ + return coursePracticeResultSetting; + } + public void setCoursePracticeResultSetting(String coursePracticeResultSetting ){ + this.coursePracticeResultSetting = coursePracticeResultSetting; + } + public String getHomeworkResultSetting(){ + return homeworkResultSetting; + } + public void setHomeworkResultSetting(String homeworkResultSetting ){ + this.homeworkResultSetting = homeworkResultSetting; + } + public String getExaminationResultSetting(){ + return examinationResultSetting; + } + public void setExaminationResultSetting(String examinationResultSetting ){ + this.examinationResultSetting = examinationResultSetting; + } + public String getInteractionResultSetting(){ + return interactionResultSetting; + } + public void setInteractionResultSetting(String interactionResultSetting ){ + this.interactionResultSetting = interactionResultSetting; + } + public String getInteractionResultMessageScore(){ + return interactionResultMessageScore; + } + public void setInteractionResultMessageScore(String interactionResultMessageScore ){ + this.interactionResultMessageScore = interactionResultMessageScore; + } + public String getInteractionResultQuestionScore(){ + return interactionResultQuestionScore; + } + public void setInteractionResultQuestionScore(String interactionResultQuestionScore ){ + this.interactionResultQuestionScore = interactionResultQuestionScore; + } + public String getInteractionResultAnswerScore(){ + return interactionResultAnswerScore; + } + public void setInteractionResultAnswerScore(String interactionResultAnswerScore ){ + this.interactionResultAnswerScore = interactionResultAnswerScore; + } + public String getResultStatusSetting(){ + return resultStatusSetting; + } + public void setResultStatusSetting(String resultStatusSetting ){ + this.resultStatusSetting = resultStatusSetting; + } + public String getDichotomyScore(){ + return dichotomyScore; + } + public void setDichotomyScore(String dichotomyScore ){ + this.dichotomyScore = dichotomyScore; + } + public String getExcellentScore(){ + return excellentScore; + } + public void setExcellentScore(String excellentScore ){ + this.excellentScore = excellentScore; + } + public String getGoodScore(){ + return goodScore; + } + public void setGoodScore(String goodScore ){ + this.goodScore = goodScore; + } + public String getSecondaryScore(){ + return secondaryScore; + } + public void setSecondaryScore(String secondaryScore ){ + this.secondaryScore = secondaryScore; + } + public String getPassScore(){ + return passScore; + } + public void setPassScore(String passScore ){ + this.passScore = passScore; + } + public String getLetteraScore(){ + return letteraScore; + } + public void setLetteraScore(String letteraScore ){ + this.letteraScore = letteraScore; + } + public String getLetterbScore(){ + return letterbScore; + } + public void setLetterbScore(String letterbScore ){ + this.letterbScore = letterbScore; + } + public String getLettercScore(){ + return lettercScore; + } + public void setLettercScore(String lettercScore ){ + this.lettercScore = lettercScore; + } + public String getLetterdScore(){ + return letterdScore; + } + public void setLetterdScore(String letterdScore ){ + this.letterdScore = letterdScore; + } + public Long getOrgId(){ + return orgId; + } + public void setOrgId(Long orgId ){ + this.orgId = orgId; + } + public Long getUserId(){ + return userId; + } + public void setUserId(Long userId ){ + this.userId = userId; + } + public Long getCreateTime(){ + return createTime; + } + public void setCreateTime(Long createTime ){ + this.createTime = createTime; + } + + public TeacherOpenCourseScoreWeight pojo(){ + TeacherOpenCourseScoreWeight pojo = new TeacherOpenCourseScoreWeight(); + pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId()); + pojo.setTeacherId(this.getTeacherId()); + pojo.setSignInResult(this.getSignInResult()); + pojo.setChapterContactResult(this.getChapterContactResult()); + pojo.setCoursePracticeResult(this.getCoursePracticeResult()); + pojo.setHomeworkResult(this.getHomeworkResult()); + pojo.setExaminationResult(this.getExaminationResult()); + pojo.setInteractionResult(this.getInteractionResult()); + pojo.setSignInResultSetting(this.getSignInResultSetting()); + pojo.setSignInScore(this.getSignInScore()); + pojo.setChapterContactResultSetting(this.getChapterContactResultSetting()); + pojo.setCoursePracticeResultSetting(this.getCoursePracticeResultSetting()); + pojo.setHomeworkResultSetting(this.getHomeworkResultSetting()); + pojo.setExaminationResultSetting(this.getExaminationResultSetting()); + pojo.setInteractionResultSetting(this.getInteractionResultSetting()); + pojo.setInteractionResultMessageScore(this.getInteractionResultMessageScore()); + pojo.setInteractionResultQuestionScore(this.getInteractionResultQuestionScore()); + pojo.setInteractionResultAnswerScore(this.getInteractionResultAnswerScore()); + pojo.setResultStatusSetting(this.getResultStatusSetting()); + pojo.setDichotomyScore(this.getDichotomyScore()); + pojo.setExcellentScore(this.getExcellentScore()); + pojo.setGoodScore(this.getGoodScore()); + pojo.setSecondaryScore(this.getSecondaryScore()); + pojo.setPassScore(this.getPassScore()); + pojo.setLetteraScore(this.getLetteraScore()); + pojo.setLetterbScore(this.getLetterbScore()); + pojo.setLettercScore(this.getLettercScore()); + pojo.setLetterdScore(this.getLetterdScore()); + pojo.setOrgId(this.getOrgId()); + pojo.setUserId(this.getUserId()); + pojo.setCreateTime(this.getCreateTime()); + return pojo; + } + + public String getTeacherOpenCourseIdPlural(){ + return teacherOpenCourseIdPlural; + } + public void setTeacherOpenCourseIdPlural(String teacherOpenCourseIdPlural){ + this.teacherOpenCourseIdPlural = teacherOpenCourseIdPlural; + } + public String getTeacherIdPlural(){ + return teacherIdPlural; + } + public void setTeacherIdPlural(String teacherIdPlural){ + this.teacherIdPlural = teacherIdPlural; + } + public String getOrgIdPlural(){ + return orgIdPlural; + } + public void setOrgIdPlural(String orgIdPlural){ + this.orgIdPlural = orgIdPlural; + } + public String getUserIdPlural(){ + return userIdPlural; + } + public void setUserIdPlural(String userIdPlural){ + this.userIdPlural = userIdPlural; + } + public String getTeacherOpenCourseScoreWeightJsonStr(){ + return teacherOpenCourseScoreWeightJsonStr; + } + public void setTeacherOpenCourseScoreWeightJsonStr(String teacherOpenCourseScoreWeightJsonStr ){ + this.teacherOpenCourseScoreWeightJsonStr = teacherOpenCourseScoreWeightJsonStr; + } + public String get_given() { + return _given; + } + public void set_given(String _given) { + this._given = _given; + } +} diff --git a/web/src/main/resources/sql/jlw/teacherOpenCourseScoreWeight.md b/web/src/main/resources/sql/jlw/teacherOpenCourseScoreWeight.md new file mode 100644 index 00000000..ba6f177c --- /dev/null +++ b/web/src/main/resources/sql/jlw/teacherOpenCourseScoreWeight.md @@ -0,0 +1,694 @@ +queryByCondition +=== +* 根据不为空的参数进行分页查询 + + select + @pageTag(){ + t.* + @} + from teacher_open_course_score_weight t + where 1=1 + @//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行 + and #function("teacherOpenCourseScoreWeight.query")# + @if(!isEmpty(teacherOpenCourseId)){ + and t.teacher_open_course_id =#teacherOpenCourseId# + @} + @if(!isEmpty(teacherOpenCourseIdPlural)){ + and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) + @} + @if(!isEmpty(teacherId)){ + and t.teacher_id =#teacherId# + @} + @if(!isEmpty(teacherIdPlural)){ + and find_in_set(t.teacher_id,#teacherIdPlural#) + @} + @if(!isEmpty(signInResult)){ + and t.sign_in_result =#signInResult# + @} + @if(!isEmpty(chapterContactResult)){ + and t.chapter_contact_result =#chapterContactResult# + @} + @if(!isEmpty(coursePracticeResult)){ + and t.course_practice_result =#coursePracticeResult# + @} + @if(!isEmpty(homeworkResult)){ + and t.homework_result =#homeworkResult# + @} + @if(!isEmpty(examinationResult)){ + and t.examination_result =#examinationResult# + @} + @if(!isEmpty(interactionResult)){ + and t.interaction_result =#interactionResult# + @} + @if(!isEmpty(signInResultSetting)){ + and t.sign_in_result_setting =#signInResultSetting# + @} + @if(!isEmpty(signInScore)){ + and t.sign_in_score =#signInScore# + @} + @if(!isEmpty(chapterContactResultSetting)){ + and t.chapter_contact_result_setting =#chapterContactResultSetting# + @} + @if(!isEmpty(coursePracticeResultSetting)){ + and t.course_practice_result_setting =#coursePracticeResultSetting# + @} + @if(!isEmpty(homeworkResultSetting)){ + and t.homework_result_setting =#homeworkResultSetting# + @} + @if(!isEmpty(examinationResultSetting)){ + and t.examination_result_setting =#examinationResultSetting# + @} + @if(!isEmpty(interactionResultSetting)){ + and t.interaction_result_setting =#interactionResultSetting# + @} + @if(!isEmpty(interactionResultMessageScore)){ + and t.interaction_result_message_score =#interactionResultMessageScore# + @} + @if(!isEmpty(interactionResultQuestionScore)){ + and t.interaction_result_question_score =#interactionResultQuestionScore# + @} + @if(!isEmpty(interactionResultAnswerScore)){ + and t.interaction_result_answer_score =#interactionResultAnswerScore# + @} + @if(!isEmpty(resultStatusSetting)){ + and t.result_status_setting =#resultStatusSetting# + @} + @if(!isEmpty(dichotomyScore)){ + and t.dichotomy_score =#dichotomyScore# + @} + @if(!isEmpty(excellentScore)){ + and t.excellent_score =#excellentScore# + @} + @if(!isEmpty(goodScore)){ + and t.good_score =#goodScore# + @} + @if(!isEmpty(secondaryScore)){ + and t.secondary_score =#secondaryScore# + @} + @if(!isEmpty(passScore)){ + and t.pass_score =#passScore# + @} + @if(!isEmpty(letteraScore)){ + and t.lettera_score =#letteraScore# + @} + @if(!isEmpty(letterbScore)){ + and t.letterb_score =#letterbScore# + @} + @if(!isEmpty(lettercScore)){ + and t.letterc_score =#lettercScore# + @} + @if(!isEmpty(letterdScore)){ + and t.letterd_score =#letterdScore# + @} + @if(!isEmpty(orgId)){ + and t.org_id =#orgId# + @} + @if(!isEmpty(orgIdPlural)){ + and find_in_set(t.org_id,#orgIdPlural#) + @} + @if(!isEmpty(userId)){ + and t.user_id =#userId# + @} + @if(!isEmpty(userIdPlural)){ + and find_in_set(t.user_id,#userIdPlural#) + @} + @if(!isEmpty(createTime)){ + and t.create_time =#createTime# + @} + + +queryByConditionQuery +=== +* 根据不为空的参数进行分页查询(无权限) + + select + @pageTag(){ + t.* + @} + from teacher_open_course_score_weight t + where 1=1 + @if(!isEmpty(teacherOpenCourseId)){ + and t.teacher_open_course_id =#teacherOpenCourseId# + @} + @if(!isEmpty(teacherOpenCourseIdPlural)){ + and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) + @} + @if(!isEmpty(teacherId)){ + and t.teacher_id =#teacherId# + @} + @if(!isEmpty(teacherIdPlural)){ + and find_in_set(t.teacher_id,#teacherIdPlural#) + @} + @if(!isEmpty(signInResult)){ + and t.sign_in_result =#signInResult# + @} + @if(!isEmpty(chapterContactResult)){ + and t.chapter_contact_result =#chapterContactResult# + @} + @if(!isEmpty(coursePracticeResult)){ + and t.course_practice_result =#coursePracticeResult# + @} + @if(!isEmpty(homeworkResult)){ + and t.homework_result =#homeworkResult# + @} + @if(!isEmpty(examinationResult)){ + and t.examination_result =#examinationResult# + @} + @if(!isEmpty(interactionResult)){ + and t.interaction_result =#interactionResult# + @} + @if(!isEmpty(signInResultSetting)){ + and t.sign_in_result_setting =#signInResultSetting# + @} + @if(!isEmpty(signInScore)){ + and t.sign_in_score =#signInScore# + @} + @if(!isEmpty(chapterContactResultSetting)){ + and t.chapter_contact_result_setting =#chapterContactResultSetting# + @} + @if(!isEmpty(coursePracticeResultSetting)){ + and t.course_practice_result_setting =#coursePracticeResultSetting# + @} + @if(!isEmpty(homeworkResultSetting)){ + and t.homework_result_setting =#homeworkResultSetting# + @} + @if(!isEmpty(examinationResultSetting)){ + and t.examination_result_setting =#examinationResultSetting# + @} + @if(!isEmpty(interactionResultSetting)){ + and t.interaction_result_setting =#interactionResultSetting# + @} + @if(!isEmpty(interactionResultMessageScore)){ + and t.interaction_result_message_score =#interactionResultMessageScore# + @} + @if(!isEmpty(interactionResultQuestionScore)){ + and t.interaction_result_question_score =#interactionResultQuestionScore# + @} + @if(!isEmpty(interactionResultAnswerScore)){ + and t.interaction_result_answer_score =#interactionResultAnswerScore# + @} + @if(!isEmpty(resultStatusSetting)){ + and t.result_status_setting =#resultStatusSetting# + @} + @if(!isEmpty(dichotomyScore)){ + and t.dichotomy_score =#dichotomyScore# + @} + @if(!isEmpty(excellentScore)){ + and t.excellent_score =#excellentScore# + @} + @if(!isEmpty(goodScore)){ + and t.good_score =#goodScore# + @} + @if(!isEmpty(secondaryScore)){ + and t.secondary_score =#secondaryScore# + @} + @if(!isEmpty(passScore)){ + and t.pass_score =#passScore# + @} + @if(!isEmpty(letteraScore)){ + and t.lettera_score =#letteraScore# + @} + @if(!isEmpty(letterbScore)){ + and t.letterb_score =#letterbScore# + @} + @if(!isEmpty(lettercScore)){ + and t.letterc_score =#lettercScore# + @} + @if(!isEmpty(letterdScore)){ + and t.letterd_score =#letterdScore# + @} + @if(!isEmpty(orgId)){ + and t.org_id =#orgId# + @} + @if(!isEmpty(orgIdPlural)){ + and find_in_set(t.org_id,#orgIdPlural#) + @} + @if(!isEmpty(userId)){ + and t.user_id =#userId# + @} + @if(!isEmpty(userIdPlural)){ + and find_in_set(t.user_id,#userIdPlural#) + @} + @if(!isEmpty(createTime)){ + and t.create_time =#createTime# + @} + + + + +deleteTeacherOpenCourseScoreWeightByIds +=== + +* 批量删除 + + delete from teacher_open_course_score_weight where find_in_set(teacher_open_course_id,#ids#) + + + +getByIds +=== + +select * from teacher_open_course_score_weight where find_in_set(teacher_open_course_id,#ids#) + + +updateGivenByIds +=== + +* 批量更新指定字段,无论此字段是否有值 + + update teacher_open_course_score_weight + set + @if(contain("teacherId",_given)){ + @if(isEmpty(teacherId)){ + teacher_id = null , + @}else{ + teacher_id = #teacherId# , + @} + @} + @if(contain("signInResult",_given)){ + @if(isEmpty(signInResult)){ + sign_in_result = null , + @}else{ + sign_in_result = #signInResult# , + @} + @} + @if(contain("chapterContactResult",_given)){ + @if(isEmpty(chapterContactResult)){ + chapter_contact_result = null , + @}else{ + chapter_contact_result = #chapterContactResult# , + @} + @} + @if(contain("coursePracticeResult",_given)){ + @if(isEmpty(coursePracticeResult)){ + course_practice_result = null , + @}else{ + course_practice_result = #coursePracticeResult# , + @} + @} + @if(contain("homeworkResult",_given)){ + @if(isEmpty(homeworkResult)){ + homework_result = null , + @}else{ + homework_result = #homeworkResult# , + @} + @} + @if(contain("examinationResult",_given)){ + @if(isEmpty(examinationResult)){ + examination_result = null , + @}else{ + examination_result = #examinationResult# , + @} + @} + @if(contain("interactionResult",_given)){ + @if(isEmpty(interactionResult)){ + interaction_result = null , + @}else{ + interaction_result = #interactionResult# , + @} + @} + @if(contain("signInResultSetting",_given)){ + @if(isEmpty(signInResultSetting)){ + sign_in_result_setting = null , + @}else{ + sign_in_result_setting = #signInResultSetting# , + @} + @} + @if(contain("signInScore",_given)){ + @if(isEmpty(signInScore)){ + sign_in_score = null , + @}else{ + sign_in_score = #signInScore# , + @} + @} + @if(contain("chapterContactResultSetting",_given)){ + @if(isEmpty(chapterContactResultSetting)){ + chapter_contact_result_setting = null , + @}else{ + chapter_contact_result_setting = #chapterContactResultSetting# , + @} + @} + @if(contain("coursePracticeResultSetting",_given)){ + @if(isEmpty(coursePracticeResultSetting)){ + course_practice_result_setting = null , + @}else{ + course_practice_result_setting = #coursePracticeResultSetting# , + @} + @} + @if(contain("homeworkResultSetting",_given)){ + @if(isEmpty(homeworkResultSetting)){ + homework_result_setting = null , + @}else{ + homework_result_setting = #homeworkResultSetting# , + @} + @} + @if(contain("examinationResultSetting",_given)){ + @if(isEmpty(examinationResultSetting)){ + examination_result_setting = null , + @}else{ + examination_result_setting = #examinationResultSetting# , + @} + @} + @if(contain("interactionResultSetting",_given)){ + @if(isEmpty(interactionResultSetting)){ + interaction_result_setting = null , + @}else{ + interaction_result_setting = #interactionResultSetting# , + @} + @} + @if(contain("interactionResultMessageScore",_given)){ + @if(isEmpty(interactionResultMessageScore)){ + interaction_result_message_score = null , + @}else{ + interaction_result_message_score = #interactionResultMessageScore# , + @} + @} + @if(contain("interactionResultQuestionScore",_given)){ + @if(isEmpty(interactionResultQuestionScore)){ + interaction_result_question_score = null , + @}else{ + interaction_result_question_score = #interactionResultQuestionScore# , + @} + @} + @if(contain("interactionResultAnswerScore",_given)){ + @if(isEmpty(interactionResultAnswerScore)){ + interaction_result_answer_score = null , + @}else{ + interaction_result_answer_score = #interactionResultAnswerScore# , + @} + @} + @if(contain("resultStatusSetting",_given)){ + @if(isEmpty(resultStatusSetting)){ + result_status_setting = null , + @}else{ + result_status_setting = #resultStatusSetting# , + @} + @} + @if(contain("dichotomyScore",_given)){ + @if(isEmpty(dichotomyScore)){ + dichotomy_score = null , + @}else{ + dichotomy_score = #dichotomyScore# , + @} + @} + @if(contain("excellentScore",_given)){ + @if(isEmpty(excellentScore)){ + excellent_score = null , + @}else{ + excellent_score = #excellentScore# , + @} + @} + @if(contain("goodScore",_given)){ + @if(isEmpty(goodScore)){ + good_score = null , + @}else{ + good_score = #goodScore# , + @} + @} + @if(contain("secondaryScore",_given)){ + @if(isEmpty(secondaryScore)){ + secondary_score = null , + @}else{ + secondary_score = #secondaryScore# , + @} + @} + @if(contain("passScore",_given)){ + @if(isEmpty(passScore)){ + pass_score = null , + @}else{ + pass_score = #passScore# , + @} + @} + @if(contain("letteraScore",_given)){ + @if(isEmpty(letteraScore)){ + lettera_score = null , + @}else{ + lettera_score = #letteraScore# , + @} + @} + @if(contain("letterbScore",_given)){ + @if(isEmpty(letterbScore)){ + letterb_score = null , + @}else{ + letterb_score = #letterbScore# , + @} + @} + @if(contain("lettercScore",_given)){ + @if(isEmpty(lettercScore)){ + letterc_score = null , + @}else{ + letterc_score = #lettercScore# , + @} + @} + @if(contain("letterdScore",_given)){ + @if(isEmpty(letterdScore)){ + letterd_score = null , + @}else{ + letterd_score = #letterdScore# , + @} + @} + @if(contain("orgId",_given)){ + @if(isEmpty(orgId)){ + org_id = null , + @}else{ + org_id = #orgId# , + @} + @} + @if(contain("userId",_given)){ + @if(isEmpty(userId)){ + user_id = null , + @}else{ + user_id = #userId# , + @} + @} + @if(contain("createTime",_given)){ + @if(isEmpty(createTime)){ + create_time = null , + @}else{ + create_time = #createTime# , + @} + @} + teacher_open_course_id = teacher_open_course_id + where find_in_set(teacher_open_course_id,#teacherOpenCourseIdPlural#) + + + +getTeacherOpenCourseScoreWeightValues +=== + +* 根据不为空的参数进行查询 + + select t.* + from teacher_open_course_score_weight t + where 1=1 + @if(!isEmpty(teacherOpenCourseId)){ + and t.teacher_open_course_id =#teacherOpenCourseId# + @} + @if(!isEmpty(teacherId)){ + and t.teacher_id =#teacherId# + @} + @if(!isEmpty(signInResult)){ + and t.sign_in_result =#signInResult# + @} + @if(!isEmpty(chapterContactResult)){ + and t.chapter_contact_result =#chapterContactResult# + @} + @if(!isEmpty(coursePracticeResult)){ + and t.course_practice_result =#coursePracticeResult# + @} + @if(!isEmpty(homeworkResult)){ + and t.homework_result =#homeworkResult# + @} + @if(!isEmpty(examinationResult)){ + and t.examination_result =#examinationResult# + @} + @if(!isEmpty(interactionResult)){ + and t.interaction_result =#interactionResult# + @} + @if(!isEmpty(signInResultSetting)){ + and t.sign_in_result_setting =#signInResultSetting# + @} + @if(!isEmpty(signInScore)){ + and t.sign_in_score =#signInScore# + @} + @if(!isEmpty(chapterContactResultSetting)){ + and t.chapter_contact_result_setting =#chapterContactResultSetting# + @} + @if(!isEmpty(coursePracticeResultSetting)){ + and t.course_practice_result_setting =#coursePracticeResultSetting# + @} + @if(!isEmpty(homeworkResultSetting)){ + and t.homework_result_setting =#homeworkResultSetting# + @} + @if(!isEmpty(examinationResultSetting)){ + and t.examination_result_setting =#examinationResultSetting# + @} + @if(!isEmpty(interactionResultSetting)){ + and t.interaction_result_setting =#interactionResultSetting# + @} + @if(!isEmpty(interactionResultMessageScore)){ + and t.interaction_result_message_score =#interactionResultMessageScore# + @} + @if(!isEmpty(interactionResultQuestionScore)){ + and t.interaction_result_question_score =#interactionResultQuestionScore# + @} + @if(!isEmpty(interactionResultAnswerScore)){ + and t.interaction_result_answer_score =#interactionResultAnswerScore# + @} + @if(!isEmpty(resultStatusSetting)){ + and t.result_status_setting =#resultStatusSetting# + @} + @if(!isEmpty(dichotomyScore)){ + and t.dichotomy_score =#dichotomyScore# + @} + @if(!isEmpty(excellentScore)){ + and t.excellent_score =#excellentScore# + @} + @if(!isEmpty(goodScore)){ + and t.good_score =#goodScore# + @} + @if(!isEmpty(secondaryScore)){ + and t.secondary_score =#secondaryScore# + @} + @if(!isEmpty(passScore)){ + and t.pass_score =#passScore# + @} + @if(!isEmpty(letteraScore)){ + and t.lettera_score =#letteraScore# + @} + @if(!isEmpty(letterbScore)){ + and t.letterb_score =#letterbScore# + @} + @if(!isEmpty(lettercScore)){ + and t.letterc_score =#lettercScore# + @} + @if(!isEmpty(letterdScore)){ + and t.letterd_score =#letterdScore# + @} + @if(!isEmpty(orgId)){ + and t.org_id =#orgId# + @} + @if(!isEmpty(userId)){ + and t.user_id =#userId# + @} + @if(!isEmpty(createTime)){ + and t.create_time =#createTime# + @} + + +getValuesByQuery +=== + +* 根据不为空的参数进行查询 + + select t.* + from teacher_open_course_score_weight t + where 1=1 and #function("teacherOpenCourseScoreWeight.query")# + @if(!isEmpty(teacherOpenCourseId)){ + and t.teacher_open_course_id =#teacherOpenCourseId# + @} + @if(!isEmpty(teacherOpenCourseIdPlural)){ + and find_in_set(t.teacher_open_course_id,#teacherOpenCourseIdPlural#) + @} + @if(!isEmpty(teacherId)){ + and t.teacher_id =#teacherId# + @} + @if(!isEmpty(teacherIdPlural)){ + and find_in_set(t.teacher_id,#teacherIdPlural#) + @} + @if(!isEmpty(signInResult)){ + and t.sign_in_result =#signInResult# + @} + @if(!isEmpty(chapterContactResult)){ + and t.chapter_contact_result =#chapterContactResult# + @} + @if(!isEmpty(coursePracticeResult)){ + and t.course_practice_result =#coursePracticeResult# + @} + @if(!isEmpty(homeworkResult)){ + and t.homework_result =#homeworkResult# + @} + @if(!isEmpty(examinationResult)){ + and t.examination_result =#examinationResult# + @} + @if(!isEmpty(interactionResult)){ + and t.interaction_result =#interactionResult# + @} + @if(!isEmpty(signInResultSetting)){ + and t.sign_in_result_setting =#signInResultSetting# + @} + @if(!isEmpty(signInScore)){ + and t.sign_in_score =#signInScore# + @} + @if(!isEmpty(chapterContactResultSetting)){ + and t.chapter_contact_result_setting =#chapterContactResultSetting# + @} + @if(!isEmpty(coursePracticeResultSetting)){ + and t.course_practice_result_setting =#coursePracticeResultSetting# + @} + @if(!isEmpty(homeworkResultSetting)){ + and t.homework_result_setting =#homeworkResultSetting# + @} + @if(!isEmpty(examinationResultSetting)){ + and t.examination_result_setting =#examinationResultSetting# + @} + @if(!isEmpty(interactionResultSetting)){ + and t.interaction_result_setting =#interactionResultSetting# + @} + @if(!isEmpty(interactionResultMessageScore)){ + and t.interaction_result_message_score =#interactionResultMessageScore# + @} + @if(!isEmpty(interactionResultQuestionScore)){ + and t.interaction_result_question_score =#interactionResultQuestionScore# + @} + @if(!isEmpty(interactionResultAnswerScore)){ + and t.interaction_result_answer_score =#interactionResultAnswerScore# + @} + @if(!isEmpty(resultStatusSetting)){ + and t.result_status_setting =#resultStatusSetting# + @} + @if(!isEmpty(dichotomyScore)){ + and t.dichotomy_score =#dichotomyScore# + @} + @if(!isEmpty(excellentScore)){ + and t.excellent_score =#excellentScore# + @} + @if(!isEmpty(goodScore)){ + and t.good_score =#goodScore# + @} + @if(!isEmpty(secondaryScore)){ + and t.secondary_score =#secondaryScore# + @} + @if(!isEmpty(passScore)){ + and t.pass_score =#passScore# + @} + @if(!isEmpty(letteraScore)){ + and t.lettera_score =#letteraScore# + @} + @if(!isEmpty(letterbScore)){ + and t.letterb_score =#letterbScore# + @} + @if(!isEmpty(lettercScore)){ + and t.letterc_score =#lettercScore# + @} + @if(!isEmpty(letterdScore)){ + and t.letterd_score =#letterdScore# + @} + @if(!isEmpty(orgId)){ + and t.org_id =#orgId# + @} + @if(!isEmpty(orgIdPlural)){ + and find_in_set(t.org_id,#orgIdPlural#) + @} + @if(!isEmpty(userId)){ + and t.user_id =#userId# + @} + @if(!isEmpty(userIdPlural)){ + and find_in_set(t.user_id,#userIdPlural#) + @} + @if(!isEmpty(createTime)){ + and t.create_time =#createTime# + @} + + + diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/add.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/add.js new file mode 100644 index 00000000..e86aa322 --- /dev/null +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/add.js @@ -0,0 +1,38 @@ +layui.define([ 'form', 'laydate', 'table','teacherOpenCourseScoreWeightApi'], function(exports) { + var form = layui.form; + var teacherOpenCourseScoreWeightApi = layui.teacherOpenCourseScoreWeightApi; + var index = layui.index; + var view = { + init:function(){ + Lib.initGenrealForm($("#addForm"),form); + this.initSubmit(); + }, + initSubmit:function(){ + $("#addButton").click(function(){ + form.on('submit(form)', function(){ + var teacherOpenCourseId = $("#addForm input[name='teacherOpenCourseId']").val(); + if(!$.isEmpty(teacherOpenCourseId)){ + teacherOpenCourseScoreWeightApi.updateTeacherOpenCourseScoreWeight($('#addForm'),function(){ + parent.window.dataReload(); + Common.info("更新成功"); + Lib.closeFrame(); + }); + }else{ + teacherOpenCourseScoreWeightApi.addTeacherOpenCourseScoreWeight($('#addForm'),function(){ + parent.window.dataReload(); + Common.info("添加成功"); + Lib.closeFrame(); + }); + } + + }); + }); + + $("#addButton-cancel").click(function(){ + Lib.closeFrame(); + }); + } + + } + exports('add',view); +}); diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/del.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/del.js new file mode 100644 index 00000000..e88f9f76 --- /dev/null +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/del.js @@ -0,0 +1,23 @@ +layui.define(['table', 'teacherOpenCourseScoreWeightApi'], function(exports) { + var teacherOpenCourseScoreWeightApi = layui.teacherOpenCourseScoreWeightApi; + var table=layui.table; + var view = { + init:function(){ + }, + delBatch:function(){ + var data = Common.getMoreDataFromTable(table,"teacherOpenCourseScoreWeightTable"); + if(data==null){ + return ; + } + Common.openConfirm("确认要删除这些成绩权重?",function(){ + var ids =Common.concatBatchId(data,"teacherOpenCourseId"); + teacherOpenCourseScoreWeightApi.del(ids,function(){ + Common.info("删除成功"); + dataReload(); + }) + }) + } + } + exports('del',view); + +}); \ No newline at end of file diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/edit.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/edit.js new file mode 100644 index 00000000..a2146aee --- /dev/null +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/edit.js @@ -0,0 +1,28 @@ +layui.define([ 'form', 'laydate', 'table','teacherOpenCourseScoreWeightApi'], function(exports) { + var form = layui.form; + var teacherOpenCourseScoreWeightApi = layui.teacherOpenCourseScoreWeightApi; + var index = layui.index; + var view = { + init:function(){ + Lib.initGenrealForm($("#updateForm"),form); + this.initSubmit(); + }, + initSubmit:function(){ + $("#updateButton").click(function(){ + form.on('submit(form)', function(){ + teacherOpenCourseScoreWeightApi.updateTeacherOpenCourseScoreWeight($('#updateForm'),function(){ + parent.window.dataReload(); + Common.info("更新成功"); + Lib.closeFrame(); + }); + }); + }); + $("#updateButton-cancel").click(function(){ + Lib.closeFrame(); + }); + } + + } + exports('edit',view); + +}); \ No newline at end of file diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/index.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/index.js new file mode 100644 index 00000000..b3d0e69d --- /dev/null +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/index.js @@ -0,0 +1,339 @@ +layui.define([ 'form', 'laydate', 'table' ], function(exports) { + var form = layui.form; + var laydate = layui.laydate; + var table = layui.table; + var teacherOpenCourseScoreWeightTable = null; + var view ={ + init:function(){ + var that = this + this.initTable(); + this.initSearchForm(); + this.initToolBar(); + window.dataReload = function(){ + Lib.doSearchForm($("#searchForm"),teacherOpenCourseScoreWeightTable) + that.initToolBar(); + } + }, + initTable:function(){ + var sx_ = localStorage.getItem("teacherOpenCourseScoreWeightTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存 + if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);} + teacherOpenCourseScoreWeightTable = table.render({ + elem : '#teacherOpenCourseScoreWeightTable', + height : Lib.getTableHeight(1), + cellMinWidth: 100, + method : 'post', + url : Common.ctxPath + '/jlw/teacherOpenCourseScoreWeight/list.json' // 数据接口 + ,page : Lib.tablePage // 开启分页 + ,toolbar: '#toolbar_teacherOpenCourseScoreWeight' //自定义头部左侧工具栏 + ,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏 + ,limit : 10, + cols : [ [ // 表头 + { + type : 'checkbox', + + }, + { + field : 'teacherOpenCourseId', + title : '课程id', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['teacherOpenCourseId'])?false:sx_['teacherOpenCourseId'], + + width : 60, + }, + { + field : 'teacherId', + title : '老师id', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['teacherId'])?false:sx_['teacherId'], + }, + { + field : 'signInResult', + title : '签到成绩(权重)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['signInResult'])?false:sx_['signInResult'], + }, + { + field : 'chapterContactResult', + title : '章节联系成绩(权重)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['chapterContactResult'])?false:sx_['chapterContactResult'], + }, + { + field : 'coursePracticeResult', + title : '课程实操成绩(权重)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['coursePracticeResult'])?false:sx_['coursePracticeResult'], + }, + { + field : 'homeworkResult', + title : '作业成绩(权重)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['homeworkResult'])?false:sx_['homeworkResult'], + }, + { + field : 'examinationResult', + title : '考试成绩(权重)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['examinationResult'])?false:sx_['examinationResult'], + }, + { + field : 'interactionResult', + title : '互动成绩(权重)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['interactionResult'])?false:sx_['interactionResult'], + }, + { + field : 'signInResultSetting', + title : '签到成绩设置1签到次数2到课到率', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['signInResultSetting'])?false:sx_['signInResultSetting'], + }, + { + field : 'signInScore', + title : '签到次数_每签到一次分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['signInScore'])?false:sx_['signInScore'], + }, + { + field : 'chapterContactResultSetting', + title : '章节联系设置1正确率积分2平均完成度计分', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['chapterContactResultSetting'])?false:sx_['chapterContactResultSetting'], + }, + { + field : 'coursePracticeResultSetting', + title : '课程实操成绩设置1平均分2平均完成进度', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['coursePracticeResultSetting'])?false:sx_['coursePracticeResultSetting'], + }, + { + field : 'homeworkResultSetting', + title : '作业成绩设置1平均分(默认1)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['homeworkResultSetting'])?false:sx_['homeworkResultSetting'], + }, + { + field : 'examinationResultSetting', + title : '考试成绩设置1平均分(默认1)', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['examinationResultSetting'])?false:sx_['examinationResultSetting'], + }, + { + field : 'interactionResultSetting', + title : '互动成绩设置1留言2提问3回答', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['interactionResultSetting'])?false:sx_['interactionResultSetting'], + }, + { + field : 'interactionResultMessageScore', + title : '互动成绩留言得分', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['interactionResultMessageScore'])?false:sx_['interactionResultMessageScore'], + }, + { + field : 'interactionResultQuestionScore', + title : '互动成绩提问得分', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['interactionResultQuestionScore'])?false:sx_['interactionResultQuestionScore'], + }, + { + field : 'interactionResultAnswerScore', + title : '互动成绩回答得分', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['interactionResultAnswerScore'])?false:sx_['interactionResultAnswerScore'], + }, + { + field : 'resultStatusSetting', + title : '成绩状态设置1二分法2等级法3字母法', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['resultStatusSetting'])?false:sx_['resultStatusSetting'], + }, + { + field : 'dichotomyScore', + title : '二分法分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['dichotomyScore'])?false:sx_['dichotomyScore'], + }, + { + field : 'excellentScore', + title : '等级法优秀分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['excellentScore'])?false:sx_['excellentScore'], + }, + { + field : 'goodScore', + title : '等级法良好分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['goodScore'])?false:sx_['goodScore'], + }, + { + field : 'secondaryScore', + title : '等级法中等分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['secondaryScore'])?false:sx_['secondaryScore'], + }, + { + field : 'passScore', + title : '等级法及格分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['passScore'])?false:sx_['passScore'], + }, + { + field : 'letteraScore', + title : '字母法A分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['letteraScore'])?false:sx_['letteraScore'], + }, + { + field : 'letterbScore', + title : '字母法B分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['letterbScore'])?false:sx_['letterbScore'], + }, + { + field : 'lettercScore', + title : '字母法C分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['lettercScore'])?false:sx_['lettercScore'], + }, + { + field : 'letterdScore', + title : '字母法D分数', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['letterdScore'])?false:sx_['letterdScore'], + }, + { + field : 'orgId', + title : '组织ID', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['orgId'])?false:sx_['orgId'], + }, + { + field : 'userId', + title : '用户ID', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['userId'])?false:sx_['userId'], + }, + { + field : 'createTime', + title : '创建时间', + align:"center", + hideField :false, + hide:$.isEmpty(sx_['createTime'])?false:sx_['createTime'], + } + ,{ + field : 'operation_',title : '操作',align:"center", templet: function (d) { + var htm = ''; + htm += ''; + return htm; + } + } + + ] ] + + }); + + table.on('checkbox(teacherOpenCourseScoreWeightTable)', function(obj){ + var teacherOpenCourseScoreWeight = obj.data; + if(obj.checked){ + //按钮逻辑Lib.buttonEnable() + }else{ + + } + }) + }, + + initSearchForm:function(){ + Lib.initSearchForm( $("#searchForm"),teacherOpenCourseScoreWeightTable,form); + }, + + initToolBar:function(){ + toolbar = { + add: function () { + var url = "/jlw/teacherOpenCourseScoreWeight/add.do"; + Common.openDlg(url,"成绩权重管理>新增"); + }, + edit: function () { + var data = Common.getOneFromTable(table,"teacherOpenCourseScoreWeightTable"); + if(data==null){ + return ; + } + var url = "/jlw/teacherOpenCourseScoreWeight/add.do?teacherOpenCourseId="+data.teacherOpenCourseId; + Common.openDlg(url,"成绩权重管理>"+data.teacherOpenCourseId+">编辑"); + }, + del: function () { + layui.use(['del'], function(){ + var delView = layui.del + delView.delBatch(); + }); + }, + search: function () { + Lib.doSearchForm($("#searchForm"), teacherOpenCourseScoreWeightTable, 1); + view.initToolBar() + }, + refresh: function () { + searchForm.reset(); + Lib.doSearchForm($("#searchForm"), teacherOpenCourseScoreWeightTable, 1); + view.initToolBar() + }, + } + //触发事件 + $('.ext-toolbar').on('click', function() { + var type = $(this).data('type'); + toolbar[type] ? toolbar[type].call(this) : ''; + }); + + }, initTableTool: table.on('tool(teacherOpenCourseScoreWeightTable)', function (obj) { + var data = obj.data; + if (obj.event === 'edit') { + var url = "/jlw/teacherOpenCourseScoreWeight/add.do?teacherOpenCourseId="+data.teacherOpenCourseId; + Common.openDlg(url,"成绩权重管理>"+data.teacherOpenCourseId+">编辑"); + }else if(obj.event === "del"){ + layer.confirm('是否确定删除该信息?', function (index) { + var ret = Common.postAjax("/jlw/teacherOpenCourseScoreWeight/delete.json",{ids:data.teacherOpenCourseId}); + layer.msg(ret.code == 0?"删除成功!":ret.msg, { + offset: ['50%'], + icon: ret.code == 0?1:2, + time: 1500 //2秒关闭(如果不配置,默认是3秒) + },function (){ + if(ret.code == 0){ + Lib.tableRefresh(); + } + }); + }); + } + }) + } + exports('index',view); + +}); diff --git a/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/teacherOpenCourseScoreWeightApi.js b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/teacherOpenCourseScoreWeightApi.js new file mode 100644 index 00000000..a84faef0 --- /dev/null +++ b/web/src/main/resources/static/js/jlw/teacherOpenCourseScoreWeight/teacherOpenCourseScoreWeightApi.js @@ -0,0 +1,18 @@ +/*访问后台的代码*/ +layui.define([], function(exports) { + var api={ + updateTeacherOpenCourseScoreWeight:function(form,callback){ + Lib.submitForm("/jlw/teacherOpenCourseScoreWeight/edit.json",form,{},callback) + }, + addTeacherOpenCourseScoreWeight:function(form,callback){ + Lib.submitForm("/jlw/teacherOpenCourseScoreWeight/add.json",form,{},callback) + }, + del:function(ids,callback){ + Common.post("/jlw/teacherOpenCourseScoreWeight/delete.json",{"ids":ids},function(){ + callback(); + }) + } + + }; + exports('teacherOpenCourseScoreWeightApi',api); +}); \ No newline at end of file diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/add.html b/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/add.html new file mode 100644 index 00000000..a6b0d4dc --- /dev/null +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/add.html @@ -0,0 +1,254 @@ + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + + diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/edit.html b/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/edit.html new file mode 100644 index 00000000..a971c35a --- /dev/null +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/edit.html @@ -0,0 +1,254 @@ + + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + + diff --git a/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/index.html b/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/index.html new file mode 100644 index 00000000..e7a4d70a --- /dev/null +++ b/web/src/main/resources/templates/jlw/teacherOpenCourseScoreWeight/index.html @@ -0,0 +1,29 @@ + + + +
+ + + +