验证生成工具
parent
7c98015f37
commit
6678ab7511
@ -0,0 +1,25 @@
|
||||
package com.ibeetl.jlw.dao;
|
||||
|
||||
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreDashboard;
|
||||
import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreDashboardQuery;
|
||||
import org.beetl.sql.core.engine.PageQuery;
|
||||
import org.beetl.sql.mapper.BaseMapper;
|
||||
import org.beetl.sql.mapper.annotation.SqlResource;
|
||||
import org.beetl.sql.mapper.annotation.Update;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 开课成绩看板 Dao
|
||||
*/
|
||||
@SqlResource("jlw.teacherOpenCourseScoreDashboard")
|
||||
public interface TeacherOpenCourseScoreDashboardDao extends BaseMapper<TeacherOpenCourseScoreDashboard>{
|
||||
PageQuery<TeacherOpenCourseScoreDashboard> queryByCondition(PageQuery query);
|
||||
PageQuery<TeacherOpenCourseScoreDashboard> queryByConditionQuery(PageQuery query);
|
||||
@Update
|
||||
void deleteTeacherOpenCourseScoreDashboardByIds(String ids);
|
||||
@Update
|
||||
int updateGivenByIds(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery);
|
||||
List<TeacherOpenCourseScoreDashboard> getByIds(String ids);
|
||||
List<TeacherOpenCourseScoreDashboard> getValuesByQuery(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery);
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
package com.ibeetl.jlw.service;
|
||||
|
||||
import cn.jlw.util.ToolUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ibeetl.admin.core.service.CoreBaseService;
|
||||
import com.ibeetl.admin.core.util.PlatformException;
|
||||
import com.ibeetl.admin.core.web.JsonResult;
|
||||
import com.ibeetl.admin.core.web.JsonReturnCode;
|
||||
import com.ibeetl.jlw.dao.TeacherOpenCourseScoreDashboardDao;
|
||||
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreDashboard;
|
||||
import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreDashboardQuery;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.beetl.sql.core.SqlId;
|
||||
import org.beetl.sql.core.engine.PageQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 开课成绩看板 Service
|
||||
* 当分布式ID开启后请勿使用insert(*,true)
|
||||
*/
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<TeacherOpenCourseScoreDashboard>{
|
||||
|
||||
@Resource private TeacherOpenCourseScoreDashboardDao teacherOpenCourseScoreDashboardDao;
|
||||
|
||||
public PageQuery<TeacherOpenCourseScoreDashboard>queryByCondition(PageQuery query){
|
||||
PageQuery ret = teacherOpenCourseScoreDashboardDao.queryByCondition(query);
|
||||
queryListAfter(ret.getList());
|
||||
return ret;
|
||||
}
|
||||
|
||||
public PageQuery<TeacherOpenCourseScoreDashboard>queryByConditionQuery(PageQuery query){
|
||||
PageQuery ret = teacherOpenCourseScoreDashboardDao.queryByConditionQuery(query);
|
||||
queryListAfter(ret.getList());
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void deleteByList(List list){
|
||||
String ids = "";
|
||||
ToolUtils.deleteNullList(list);
|
||||
for(int i=0;null != list && i<list.size();i++){
|
||||
ids += list.get(i).toString()+(i==list.size()-1?"":",");
|
||||
}
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
teacherOpenCourseScoreDashboardDao.deleteTeacherOpenCourseScoreDashboardByIds(ids);
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteTeacherOpenCourseScoreDashboard(String ids){
|
||||
try {
|
||||
teacherOpenCourseScoreDashboardDao.deleteTeacherOpenCourseScoreDashboardByIds(ids);
|
||||
} catch (Exception e) {
|
||||
throw new PlatformException("批量删除开课成绩看板失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
public String addAll(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery){
|
||||
String msg = "";
|
||||
List<TeacherOpenCourseScoreDashboard> teacherOpenCourseScoreDashboardList = new ArrayList<>();
|
||||
try {
|
||||
teacherOpenCourseScoreDashboardList = JSON.parseArray(teacherOpenCourseScoreDashboardQuery.getTeacherOpenCourseScoreDashboardJsonStr(), TeacherOpenCourseScoreDashboard.class);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
teacherOpenCourseScoreDashboardList.add(JSONObject.parseObject(teacherOpenCourseScoreDashboardQuery.getTeacherOpenCourseScoreDashboardJsonStr(), TeacherOpenCourseScoreDashboard.class));
|
||||
} catch (Exception e1) {}
|
||||
}
|
||||
ToolUtils.deleteNullList(teacherOpenCourseScoreDashboardList);
|
||||
if(null != teacherOpenCourseScoreDashboardList && teacherOpenCourseScoreDashboardList.size()>0){
|
||||
for(int i=0;i<teacherOpenCourseScoreDashboardList.size();i++){
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardList.get(i);
|
||||
teacherOpenCourseScoreDashboard.setUserId(teacherOpenCourseScoreDashboardQuery.getUserId());
|
||||
teacherOpenCourseScoreDashboard.setOrgId(teacherOpenCourseScoreDashboardQuery.getOrgId());
|
||||
}
|
||||
insertBatch(teacherOpenCourseScoreDashboardList);
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
public JsonResult add(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery){
|
||||
String msg = "";
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardQuery.pojo();
|
||||
teacherOpenCourseScoreDashboardDao.insert(teacherOpenCourseScoreDashboard);
|
||||
teacherOpenCourseScoreDashboardQuery.setTeacherOpenCourseScoreDashboardId(teacherOpenCourseScoreDashboard.getTeacherOpenCourseScoreDashboardId());
|
||||
JsonResult jsonResult = new JsonResult();
|
||||
jsonResult.setData(teacherOpenCourseScoreDashboard.getTeacherOpenCourseScoreDashboardId());//自增的ID丢进去
|
||||
jsonResult.setCode(JsonReturnCode.SUCCESS.getCode());
|
||||
jsonResult.setMsg(msg);
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
public String edit(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery){
|
||||
String msg = "";
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardQuery.pojo();
|
||||
teacherOpenCourseScoreDashboardDao.updateTemplateById(teacherOpenCourseScoreDashboard);
|
||||
return msg;
|
||||
}
|
||||
|
||||
public String updateGivenByIds(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery){
|
||||
String msg = "";
|
||||
if(StringUtils.isNotBlank(teacherOpenCourseScoreDashboardQuery.get_given())){
|
||||
boolean flag = teacherOpenCourseScoreDashboardDao.updateGivenByIds(teacherOpenCourseScoreDashboardQuery) > 0;
|
||||
if(!flag){
|
||||
msg = "更新指定参数失败";
|
||||
}
|
||||
}else{
|
||||
msg = "指定参数为空";
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
public List<TeacherOpenCourseScoreDashboard> getValues (Object paras){
|
||||
return sqlManager.select(SqlId.of("jlw.teacherOpenCourseScoreDashboard.getTeacherOpenCourseScoreDashboardValues"), TeacherOpenCourseScoreDashboard.class, paras);
|
||||
}
|
||||
|
||||
public List<TeacherOpenCourseScoreDashboard> getValuesByQuery (TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery){
|
||||
return teacherOpenCourseScoreDashboardDao.getValuesByQuery(teacherOpenCourseScoreDashboardQuery);
|
||||
}
|
||||
|
||||
public TeacherOpenCourseScoreDashboard getInfo (Long teacherOpenCourseScoreDashboardId){
|
||||
TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery = new TeacherOpenCourseScoreDashboardQuery();
|
||||
teacherOpenCourseScoreDashboardQuery.setTeacherOpenCourseScoreDashboardId(teacherOpenCourseScoreDashboardId);
|
||||
List<TeacherOpenCourseScoreDashboard> list = teacherOpenCourseScoreDashboardDao.getValuesByQuery(teacherOpenCourseScoreDashboardQuery);
|
||||
if(null != list && list.size()>0){
|
||||
return list.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public TeacherOpenCourseScoreDashboard getInfo (TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery){
|
||||
List<TeacherOpenCourseScoreDashboard> list = teacherOpenCourseScoreDashboardDao.getValuesByQuery(teacherOpenCourseScoreDashboardQuery);
|
||||
if(null != list && list.size()>0){
|
||||
return list.get(0);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
package com.ibeetl.jlw.web;
|
||||
|
||||
import cn.jlw.Interceptor.SCoreUser;
|
||||
import cn.jlw.validate.ValidateConfig;
|
||||
import com.ibeetl.admin.core.annotation.Function;
|
||||
import com.ibeetl.admin.core.entity.CoreUser;
|
||||
import com.ibeetl.admin.core.file.FileService;
|
||||
import com.ibeetl.admin.core.web.JsonResult;
|
||||
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreDashboard;
|
||||
import com.ibeetl.jlw.service.TeacherOpenCourseScoreDashboardService;
|
||||
import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreDashboardQuery;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.beetl.sql.core.engine.PageQuery;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 开课成绩看板 教师-我的课程-成绩看板 接口
|
||||
* 切记不要对非线程安全的静态变量进行写操作
|
||||
*/
|
||||
|
||||
@RestController
|
||||
public class TeacherOpenCourseScoreDashboardController{
|
||||
|
||||
private final Log log = LogFactory.getLog(this.getClass());
|
||||
private static final String MODEL = "/jlw/teacherOpenCourseScoreDashboard";
|
||||
private static final String API = "/api/teacherOpenCourseScoreDashboard";
|
||||
|
||||
|
||||
@Resource private TeacherOpenCourseScoreDashboardService teacherOpenCourseScoreDashboardService;
|
||||
|
||||
@Resource FileService fileService;
|
||||
|
||||
/* 前端接口 */
|
||||
|
||||
@PostMapping(API + "/getPageList.do")
|
||||
public JsonResult<PageQuery> getPageList(TeacherOpenCourseScoreDashboardQuery condition,@SCoreUser CoreUser coreUser){
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
PageQuery page = condition.getPageQuery();
|
||||
teacherOpenCourseScoreDashboardService.queryByConditionQuery(page);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(API + "/getInfo.do")
|
||||
public JsonResult<TeacherOpenCourseScoreDashboard>getInfo(TeacherOpenCourseScoreDashboardQuery param,@SCoreUser CoreUser coreUser) {
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardService.getInfo(param);
|
||||
return JsonResult.success(teacherOpenCourseScoreDashboard);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(API + "/getList.do")
|
||||
public JsonResult<List<TeacherOpenCourseScoreDashboard>>getList(TeacherOpenCourseScoreDashboardQuery param,@SCoreUser CoreUser coreUser) {
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
List<TeacherOpenCourseScoreDashboard>list = teacherOpenCourseScoreDashboardService.getValuesByQuery(param);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 后台页面 */
|
||||
|
||||
@GetMapping(MODEL + "/index.do")
|
||||
@Function("teacherOpenCourseScoreDashboard.query")
|
||||
public ModelAndView index() {
|
||||
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseScoreDashboard/index.html") ;
|
||||
view.addObject("search", TeacherOpenCourseScoreDashboardQuery.class.getName());
|
||||
return view;
|
||||
}
|
||||
|
||||
@GetMapping(MODEL + "/edit.do")
|
||||
@Function("teacherOpenCourseScoreDashboard.edit")
|
||||
public ModelAndView edit(Long teacherOpenCourseScoreDashboardId) {
|
||||
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseScoreDashboard/edit.html");
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardService.queryById(teacherOpenCourseScoreDashboardId);
|
||||
view.addObject("teacherOpenCourseScoreDashboard", teacherOpenCourseScoreDashboard);
|
||||
return view;
|
||||
}
|
||||
|
||||
@GetMapping(MODEL + "/add.do")
|
||||
@Function("teacherOpenCourseScoreDashboard.add")
|
||||
public ModelAndView add(Long teacherOpenCourseScoreDashboardId) {
|
||||
ModelAndView view = new ModelAndView("/jlw/teacherOpenCourseScoreDashboard/add.html");
|
||||
if(null != teacherOpenCourseScoreDashboardId){
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardService.queryById(teacherOpenCourseScoreDashboardId);
|
||||
view.addObject("teacherOpenCourseScoreDashboard", teacherOpenCourseScoreDashboard);
|
||||
}else {
|
||||
view.addObject("teacherOpenCourseScoreDashboard", new TeacherOpenCourseScoreDashboard());
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
||||
/* 后台接口 */
|
||||
|
||||
@PostMapping(MODEL + "/list.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.query")
|
||||
public JsonResult<PageQuery> list(TeacherOpenCourseScoreDashboardQuery condition){
|
||||
PageQuery page = condition.getPageQuery();
|
||||
teacherOpenCourseScoreDashboardService.queryByCondition(page);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@PostMapping(MODEL + "/addAll.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.add")
|
||||
public JsonResult addAll(TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery,@SCoreUser CoreUser coreUser){
|
||||
if(null == coreUser){
|
||||
return JsonResult.failMessage("请登录后再操作");
|
||||
}else{
|
||||
teacherOpenCourseScoreDashboardQuery.setUserId(coreUser.getId());
|
||||
teacherOpenCourseScoreDashboardQuery.setOrgId(coreUser.getOrgId());
|
||||
String msg = teacherOpenCourseScoreDashboardService.addAll(teacherOpenCourseScoreDashboardQuery);
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
return JsonResult.success();
|
||||
} else {
|
||||
return JsonResult.failMessage("新增失败,"+msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(MODEL + "/add.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.add")
|
||||
public JsonResult add(@Validated(ValidateConfig.ADD.class) TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery, BindingResult result,@SCoreUser CoreUser coreUser){
|
||||
if(result.hasErrors()){
|
||||
return JsonResult.failMessage(result);
|
||||
}else{
|
||||
teacherOpenCourseScoreDashboardQuery.setUserId(coreUser.getId());
|
||||
teacherOpenCourseScoreDashboardQuery.setOrgId(coreUser.getOrgId());
|
||||
return teacherOpenCourseScoreDashboardService.add(teacherOpenCourseScoreDashboardQuery);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(MODEL + "/edit.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.edit")
|
||||
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) TeacherOpenCourseScoreDashboardQuery teacherOpenCourseScoreDashboardQuery, BindingResult result) {
|
||||
if(result.hasErrors()){
|
||||
return JsonResult.failMessage(result);
|
||||
}else {
|
||||
teacherOpenCourseScoreDashboardQuery.setUserId(null);
|
||||
teacherOpenCourseScoreDashboardQuery.setOrgId(null);
|
||||
String msg = teacherOpenCourseScoreDashboardService.edit(teacherOpenCourseScoreDashboardQuery);
|
||||
if (StringUtils.isBlank(msg)) {
|
||||
return JsonResult.success();
|
||||
} else {
|
||||
return JsonResult.failMessage("更新失败,"+msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(MODEL + "/view.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.query")
|
||||
public JsonResult<TeacherOpenCourseScoreDashboard>queryInfo(Long teacherOpenCourseScoreDashboardId) {
|
||||
TeacherOpenCourseScoreDashboard teacherOpenCourseScoreDashboard = teacherOpenCourseScoreDashboardService.queryById( teacherOpenCourseScoreDashboardId);
|
||||
return JsonResult.success(teacherOpenCourseScoreDashboard);
|
||||
}
|
||||
|
||||
@GetMapping(MODEL + "/getValues.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.query")
|
||||
public JsonResult<List<TeacherOpenCourseScoreDashboard>>getValues(TeacherOpenCourseScoreDashboardQuery param) {
|
||||
List<TeacherOpenCourseScoreDashboard>list = teacherOpenCourseScoreDashboardService.getValuesByQuery(param);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(MODEL + "/delete.json")
|
||||
@Function("teacherOpenCourseScoreDashboard.delete")
|
||||
@ResponseBody
|
||||
public JsonResult delete(String ids) {
|
||||
teacherOpenCourseScoreDashboardService.deleteTeacherOpenCourseScoreDashboard(ids);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
package com.ibeetl.jlw.web.query;
|
||||
|
||||
import cn.jlw.validate.ValidateConfig;
|
||||
import com.ibeetl.admin.core.annotation.Query;
|
||||
import com.ibeetl.admin.core.web.query.PageParam;
|
||||
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreDashboard;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*开课成绩看板查询
|
||||
*/
|
||||
public class TeacherOpenCourseScoreDashboardQuery extends PageParam {
|
||||
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
|
||||
@Query(name = "课程开课-成绩看板ID", display = false)
|
||||
private Long teacherOpenCourseScoreDashboardId;
|
||||
@Query(name = "学生ID", display = true,type=Query.TYPE_DICT,dict="student.student_name.student_status=1")
|
||||
private Long studentId;
|
||||
@Query(name = "签到成绩", display = false)
|
||||
private BigDecimal signinScore;
|
||||
@Query(name = "章节练习成绩", display = false)
|
||||
private BigDecimal courseScore;
|
||||
@Query(name = "课程实操成绩", display = false)
|
||||
private BigDecimal realOperationScore;
|
||||
@Query(name = "作业成绩", display = false)
|
||||
private BigDecimal questionHomeworkScore;
|
||||
@Query(name = "考试成绩", display = false)
|
||||
private BigDecimal examScore;
|
||||
@Query(name = "互动成绩", display = false)
|
||||
private BigDecimal chatScore;
|
||||
@Query(name = "总成绩", display = false)
|
||||
private BigDecimal totalScore;
|
||||
@Query(name = "手动调整的分数", display = false)
|
||||
private BigDecimal manualScore;
|
||||
@Query(name = "最终成绩", display = false)
|
||||
private BigDecimal lastScore;
|
||||
@Query(name = "成绩状态(保存中文)", display = false)
|
||||
private String lastStatus;
|
||||
@Query(name = "组织ID", display = false)
|
||||
private Long orgId;
|
||||
@Query(name = "用户ID", display = false)
|
||||
private Long userId;
|
||||
@Query(name = "创建时间", display = false)
|
||||
private Date createTime;
|
||||
|
||||
private String teacherOpenCourseScoreDashboardIdPlural;
|
||||
private String studentIdPlural;
|
||||
private String orgIdPlural;
|
||||
private String userIdPlural;
|
||||
|
||||
private String teacherOpenCourseScoreDashboardJsonStr;//json格式
|
||||
|
||||
private String _given;//指定更新的特定字段,多个逗号隔开
|
||||
|
||||
public Long getTeacherOpenCourseScoreDashboardId(){
|
||||
return teacherOpenCourseScoreDashboardId;
|
||||
}
|
||||
public void setTeacherOpenCourseScoreDashboardId(Long teacherOpenCourseScoreDashboardId ){
|
||||
this.teacherOpenCourseScoreDashboardId = teacherOpenCourseScoreDashboardId;
|
||||
}
|
||||
public Long getStudentId(){
|
||||
return studentId;
|
||||
}
|
||||
public void setStudentId(Long studentId ){
|
||||
this.studentId = studentId;
|
||||
}
|
||||
public BigDecimal getSigninScore(){
|
||||
return signinScore;
|
||||
}
|
||||
public void setSigninScore(BigDecimal signinScore ){
|
||||
this.signinScore = signinScore;
|
||||
}
|
||||
public BigDecimal getCourseScore(){
|
||||
return courseScore;
|
||||
}
|
||||
public void setCourseScore(BigDecimal courseScore ){
|
||||
this.courseScore = courseScore;
|
||||
}
|
||||
public BigDecimal getRealOperationScore(){
|
||||
return realOperationScore;
|
||||
}
|
||||
public void setRealOperationScore(BigDecimal realOperationScore ){
|
||||
this.realOperationScore = realOperationScore;
|
||||
}
|
||||
public BigDecimal getQuestionHomeworkScore(){
|
||||
return questionHomeworkScore;
|
||||
}
|
||||
public void setQuestionHomeworkScore(BigDecimal questionHomeworkScore ){
|
||||
this.questionHomeworkScore = questionHomeworkScore;
|
||||
}
|
||||
public BigDecimal getExamScore(){
|
||||
return examScore;
|
||||
}
|
||||
public void setExamScore(BigDecimal examScore ){
|
||||
this.examScore = examScore;
|
||||
}
|
||||
public BigDecimal getChatScore(){
|
||||
return chatScore;
|
||||
}
|
||||
public void setChatScore(BigDecimal chatScore ){
|
||||
this.chatScore = chatScore;
|
||||
}
|
||||
public BigDecimal getTotalScore(){
|
||||
return totalScore;
|
||||
}
|
||||
public void setTotalScore(BigDecimal totalScore ){
|
||||
this.totalScore = totalScore;
|
||||
}
|
||||
public BigDecimal getManualScore(){
|
||||
return manualScore;
|
||||
}
|
||||
public void setManualScore(BigDecimal manualScore ){
|
||||
this.manualScore = manualScore;
|
||||
}
|
||||
public BigDecimal getLastScore(){
|
||||
return lastScore;
|
||||
}
|
||||
public void setLastScore(BigDecimal lastScore ){
|
||||
this.lastScore = lastScore;
|
||||
}
|
||||
public String getLastStatus(){
|
||||
return lastStatus;
|
||||
}
|
||||
public void setLastStatus(String lastStatus ){
|
||||
this.lastStatus = lastStatus;
|
||||
}
|
||||
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 Date getCreateTime(){
|
||||
return createTime;
|
||||
}
|
||||
public void setCreateTime(Date createTime ){
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public TeacherOpenCourseScoreDashboard pojo(){
|
||||
TeacherOpenCourseScoreDashboard pojo = new TeacherOpenCourseScoreDashboard();
|
||||
pojo.setTeacherOpenCourseScoreDashboardId(this.getTeacherOpenCourseScoreDashboardId());
|
||||
pojo.setStudentId(this.getStudentId());
|
||||
pojo.setSigninScore(this.getSigninScore());
|
||||
pojo.setCourseScore(this.getCourseScore());
|
||||
pojo.setRealOperationScore(this.getRealOperationScore());
|
||||
pojo.setQuestionHomeworkScore(this.getQuestionHomeworkScore());
|
||||
pojo.setExamScore(this.getExamScore());
|
||||
pojo.setChatScore(this.getChatScore());
|
||||
pojo.setTotalScore(this.getTotalScore());
|
||||
pojo.setManualScore(this.getManualScore());
|
||||
pojo.setLastScore(this.getLastScore());
|
||||
pojo.setLastStatus(this.getLastStatus());
|
||||
pojo.setOrgId(this.getOrgId());
|
||||
pojo.setUserId(this.getUserId());
|
||||
pojo.setCreateTime(this.getCreateTime());
|
||||
return pojo;
|
||||
}
|
||||
|
||||
public String getTeacherOpenCourseScoreDashboardIdPlural(){
|
||||
return teacherOpenCourseScoreDashboardIdPlural;
|
||||
}
|
||||
public void setTeacherOpenCourseScoreDashboardIdPlural(String teacherOpenCourseScoreDashboardIdPlural){
|
||||
this.teacherOpenCourseScoreDashboardIdPlural = teacherOpenCourseScoreDashboardIdPlural;
|
||||
}
|
||||
public String getStudentIdPlural(){
|
||||
return studentIdPlural;
|
||||
}
|
||||
public void setStudentIdPlural(String studentIdPlural){
|
||||
this.studentIdPlural = studentIdPlural;
|
||||
}
|
||||
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 getTeacherOpenCourseScoreDashboardJsonStr(){
|
||||
return teacherOpenCourseScoreDashboardJsonStr;
|
||||
}
|
||||
public void setTeacherOpenCourseScoreDashboardJsonStr(String teacherOpenCourseScoreDashboardJsonStr ){
|
||||
this.teacherOpenCourseScoreDashboardJsonStr = teacherOpenCourseScoreDashboardJsonStr;
|
||||
}
|
||||
public String get_given() {
|
||||
return _given;
|
||||
}
|
||||
public void set_given(String _given) {
|
||||
this._given = _given;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
layui.define([ 'form', 'laydate', 'table','teacherOpenCourseScoreDashboardApi'], function(exports) {
|
||||
var form = layui.form;
|
||||
var teacherOpenCourseScoreDashboardApi = layui.teacherOpenCourseScoreDashboardApi;
|
||||
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 teacherOpenCourseScoreDashboardId = $("#addForm input[name='teacherOpenCourseScoreDashboardId']").val();
|
||||
if(!$.isEmpty(teacherOpenCourseScoreDashboardId)){
|
||||
teacherOpenCourseScoreDashboardApi.updateTeacherOpenCourseScoreDashboard($('#addForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("更新成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}else{
|
||||
teacherOpenCourseScoreDashboardApi.addTeacherOpenCourseScoreDashboard($('#addForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("添加成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$("#addButton-cancel").click(function(){
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
exports('add',view);
|
||||
});
|
@ -0,0 +1,23 @@
|
||||
layui.define(['table', 'teacherOpenCourseScoreDashboardApi'], function(exports) {
|
||||
var teacherOpenCourseScoreDashboardApi = layui.teacherOpenCourseScoreDashboardApi;
|
||||
var table=layui.table;
|
||||
var view = {
|
||||
init:function(){
|
||||
},
|
||||
delBatch:function(){
|
||||
var data = Common.getMoreDataFromTable(table,"teacherOpenCourseScoreDashboardTable");
|
||||
if(data==null){
|
||||
return ;
|
||||
}
|
||||
Common.openConfirm("确认要删除这些开课成绩看板?",function(){
|
||||
var ids =Common.concatBatchId(data,"teacherOpenCourseScoreDashboardId");
|
||||
teacherOpenCourseScoreDashboardApi.del(ids,function(){
|
||||
Common.info("删除成功");
|
||||
dataReload();
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
exports('del',view);
|
||||
|
||||
});
|
@ -0,0 +1,28 @@
|
||||
layui.define([ 'form', 'laydate', 'table','teacherOpenCourseScoreDashboardApi'], function(exports) {
|
||||
var form = layui.form;
|
||||
var teacherOpenCourseScoreDashboardApi = layui.teacherOpenCourseScoreDashboardApi;
|
||||
var index = layui.index;
|
||||
var view = {
|
||||
init:function(){
|
||||
Lib.initGenrealForm($("#updateForm"),form);
|
||||
this.initSubmit();
|
||||
},
|
||||
initSubmit:function(){
|
||||
$("#updateButton").click(function(){
|
||||
form.on('submit(form)', function(){
|
||||
teacherOpenCourseScoreDashboardApi.updateTeacherOpenCourseScoreDashboard($('#updateForm'),function(){
|
||||
parent.window.dataReload();
|
||||
Common.info("更新成功");
|
||||
Lib.closeFrame();
|
||||
});
|
||||
});
|
||||
});
|
||||
$("#updateButton-cancel").click(function(){
|
||||
Lib.closeFrame();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
exports('edit',view);
|
||||
|
||||
});
|
@ -0,0 +1,18 @@
|
||||
/*访问后台的代码*/
|
||||
layui.define([], function(exports) {
|
||||
var api={
|
||||
updateTeacherOpenCourseScoreDashboard:function(form,callback){
|
||||
Lib.submitForm("/jlw/teacherOpenCourseScoreDashboard/edit.json",form,{},callback)
|
||||
},
|
||||
addTeacherOpenCourseScoreDashboard:function(form,callback){
|
||||
Lib.submitForm("/jlw/teacherOpenCourseScoreDashboard/add.json",form,{},callback)
|
||||
},
|
||||
del:function(ids,callback){
|
||||
Common.post("/jlw/teacherOpenCourseScoreDashboard/delete.json",{"ids":ids},function(){
|
||||
callback();
|
||||
})
|
||||
}
|
||||
|
||||
};
|
||||
exports('teacherOpenCourseScoreDashboardApi',api);
|
||||
});
|
@ -0,0 +1,29 @@
|
||||
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/teacherOpenCourseScoreDashboard/"}){ -->
|
||||
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
|
||||
</layui:searchForm>
|
||||
<table id="teacherOpenCourseScoreDashboardTable" lay-filter="teacherOpenCourseScoreDashboardTable"></table>
|
||||
<!--#} -->
|
||||
|
||||
<script type="text/html" id="toolbar_teacherOpenCourseScoreDashboard">
|
||||
<div class="layui-btn-container">
|
||||
<div class="layui-btn-group" >
|
||||
<!--# if(!isEmpty(search)) {-->
|
||||
<layui:accessButton function="teacherOpenCourseScoreDashboard.query" id="searchFormSearch" action="search"><i class="layui-icon"></i>搜索</layui:accessButton>
|
||||
<!--# }-->
|
||||
<layui:accessButton function="teacherOpenCourseScoreDashboard.add" action="add">添加</layui:accessButton>
|
||||
<layui:accessButton function="teacherOpenCourseScoreDashboard.edit" action="edit">修改</layui:accessButton>
|
||||
<layui:accessButton function="teacherOpenCourseScoreDashboard.del" action="del">删除</layui:accessButton>
|
||||
<!--# if(!isEmpty(search)) {-->
|
||||
<layui:accessButton function="teacherOpenCourseScoreDashboard.query" action="refresh"><i class="layui-icon"></i>刷新</layui:accessButton>
|
||||
<!--# }-->
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
|
||||
layui.use(['index'], function(){
|
||||
var index = layui.index;
|
||||
index.init();
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue