首页数据

beetlsql3-dev
xuliangtong 2 years ago
parent 2c00819896
commit 812f7bae96

@ -0,0 +1,30 @@
package com.ibeetl.jlw.dao;
import java.util.List;
import java.util.Map;
import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.web.query.StudentHandsOnTaskReportQuery;
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.studentHandsOnTaskReport")
public interface StudentHandsOnTaskReportDao extends BaseMapper<StudentHandsOnTaskReport>{
PageQuery<StudentHandsOnTaskReport> queryByCondition(PageQuery query);
PageQuery<StudentHandsOnTaskReport> queryByConditionQuery(PageQuery query);
@Update
void deleteStudentHandsOnTaskReportByIds(String ids);
@Update
int updateGivenByIds(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery);
List<StudentHandsOnTaskReport> getByIds(String ids);
List<StudentHandsOnTaskReport> getValuesByQuery(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery);
List<StudentHandsOnTaskReport> getValuesByQueryNotWithPermission(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery);
List<StudentHandsOnTaskReport> getReportList(List<Long> collect);
}

@ -0,0 +1,198 @@
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-10-26
*/
public class StudentHandsOnTaskReport extends BaseEntity{
//ID
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
// @SeqID(name = ORACLE_CORE_SEQ_NAME)
@AssignID(value = "maskAutoID",param = "com.ibeetl.jlw.entity.StudentHandsOnTaskReport")
private Long studentHandsOnTaskReportId ;
//课程开课ID
private Long teacherOpenCourseId ;
//课程实操ID
private Long handsOnId ;
//课程实操任务ID
private Long handsOnTaskId ;
//文件地址PDF
private String reportFile ;
//报告分值
private BigDecimal reportScore ;
//报告评语
private BigDecimal reportComment ;
//创建时间
private Date createTime ;
//组织ID
private Long orgId ;
//用户ID
private Long userId ;
public StudentHandsOnTaskReport(){
}
/**ID
*@return
*/
public Long getStudentHandsOnTaskReportId(){
return studentHandsOnTaskReportId;
}
/**ID
*@param studentHandsOnTaskReportId
*/
public void setStudentHandsOnTaskReportId(Long studentHandsOnTaskReportId){
this.studentHandsOnTaskReportId = studentHandsOnTaskReportId;
}
/**ID
*@return
*/
public Long getTeacherOpenCourseId(){
return teacherOpenCourseId;
}
/**ID
*@param teacherOpenCourseId
*/
public void setTeacherOpenCourseId(Long teacherOpenCourseId){
this.teacherOpenCourseId = teacherOpenCourseId;
}
/**ID
*@return
*/
public Long getHandsOnId(){
return handsOnId;
}
/**ID
*@param handsOnId
*/
public void setHandsOnId(Long handsOnId){
this.handsOnId = handsOnId;
}
/**ID
*@return
*/
public Long getHandsOnTaskId(){
return handsOnTaskId;
}
/**ID
*@param handsOnTaskId
*/
public void setHandsOnTaskId(Long handsOnTaskId){
this.handsOnTaskId = handsOnTaskId;
}
/**PDF
*@return
*/
public String getReportFile(){
return reportFile;
}
/**PDF
*@param reportFile
*/
public void setReportFile(String reportFile){
this.reportFile = reportFile;
}
/**
*@return
*/
public BigDecimal getReportScore(){
return reportScore;
}
/**
*@param reportScore
*/
public void setReportScore(BigDecimal reportScore){
this.reportScore = reportScore;
}
/**
*@return
*/
public BigDecimal getReportComment(){
return reportComment;
}
/**
*@param reportComment
*/
public void setReportComment(BigDecimal reportComment){
this.reportComment = reportComment;
}
/**
*@return
*/
public Date getCreateTime(){
return createTime;
}
/**
*@param createTime
*/
public void setCreateTime(Date createTime){
this.createTime = createTime;
}
/**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;
}
}

@ -1,9 +1,6 @@
package com.ibeetl.jlw.entity.api.teacher;
import com.ibeetl.jlw.entity.HandsOnSimulationTasks;
import com.ibeetl.jlw.entity.TeacherMergeApplication;
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeTeacher;
import com.ibeetl.jlw.entity.TeacherOpenCourseNotice;
import com.ibeetl.jlw.entity.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -28,7 +25,7 @@ public class TeacherIndexData {
*
* -
*/
private List<Object> toDoList;
private List<StudentHandsOnTaskReport> toDoList;
/**
*

@ -0,0 +1,174 @@
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.StudentHandsOnTaskReportDao;
import com.ibeetl.jlw.entity.StudentHandsOnTaskReport;
import com.ibeetl.jlw.web.query.StudentHandsOnTaskReportQuery;
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 org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
/**
* -- Service
* ID使insert(*,true)
*/
@Service
@Transactional
@Validated
public class StudentHandsOnTaskReportService extends CoreBaseService<StudentHandsOnTaskReport>{
@Resource private StudentHandsOnTaskReportDao studentHandsOnTaskReportDao;
public PageQuery<StudentHandsOnTaskReport>queryByCondition(PageQuery query){
PageQuery ret = studentHandsOnTaskReportDao.queryByCondition(query);
queryListAfter(ret.getList());
return ret;
}
public PageQuery<StudentHandsOnTaskReport>queryByConditionQuery(PageQuery query){
PageQuery ret = studentHandsOnTaskReportDao.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)){
studentHandsOnTaskReportDao.deleteStudentHandsOnTaskReportByIds(ids);
}
}
public void deleteStudentHandsOnTaskReport(String ids){
try {
studentHandsOnTaskReportDao.deleteStudentHandsOnTaskReportByIds(ids);
} catch (Exception e) {
throw new PlatformException("批量删除学生-课程实操-报告撰写失败", e);
}
}
public String addAll(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
String msg = "";
List<StudentHandsOnTaskReport> studentHandsOnTaskReportList = new ArrayList<>();
try {
studentHandsOnTaskReportList = JSON.parseArray(studentHandsOnTaskReportQuery.getStudentHandsOnTaskReportJsonStr(), StudentHandsOnTaskReport.class);
} catch (Exception e) {
try {
studentHandsOnTaskReportList.add(JSONObject.parseObject(studentHandsOnTaskReportQuery.getStudentHandsOnTaskReportJsonStr(), StudentHandsOnTaskReport.class));
} catch (Exception e1) {}
}
ToolUtils.deleteNullList(studentHandsOnTaskReportList);
if(null != studentHandsOnTaskReportList && studentHandsOnTaskReportList.size()>0){
for(int i=0;i<studentHandsOnTaskReportList.size();i++){
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportList.get(i);
studentHandsOnTaskReport.setUserId(studentHandsOnTaskReportQuery.getUserId());
studentHandsOnTaskReport.setOrgId(studentHandsOnTaskReportQuery.getOrgId());
}
insertBatch(studentHandsOnTaskReportList);
}
return msg;
}
public JsonResult add(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
String msg = "";
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo();
studentHandsOnTaskReportDao.insert(studentHandsOnTaskReport);
studentHandsOnTaskReportQuery.setStudentHandsOnTaskReportId(studentHandsOnTaskReport.getStudentHandsOnTaskReportId());
JsonResult jsonResult = new JsonResult();
jsonResult.setData(studentHandsOnTaskReport.getStudentHandsOnTaskReportId());//自增的ID丢进去
jsonResult.setCode(JsonReturnCode.SUCCESS.getCode());
jsonResult.setMsg(msg);
return jsonResult;
}
public String edit(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
String msg = "";
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportQuery.pojo();
studentHandsOnTaskReportDao.updateTemplateById(studentHandsOnTaskReport);
return msg;
}
public String updateGivenByIds(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
String msg = "";
if(StringUtils.isNotBlank(studentHandsOnTaskReportQuery.get_given())){
boolean flag = studentHandsOnTaskReportDao.updateGivenByIds(studentHandsOnTaskReportQuery) > 0;
if(!flag){
msg = "更新指定参数失败";
}
}else{
msg = "指定参数为空";
}
return msg;
}
public List<StudentHandsOnTaskReport> getValues (Object paras){
return sqlManager.select(SqlId.of("jlw.studentHandsOnTaskReport.getStudentHandsOnTaskReportValues"), StudentHandsOnTaskReport.class, paras);
}
public List<StudentHandsOnTaskReport> getValuesByQuery (StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
return studentHandsOnTaskReportDao.getValuesByQuery(studentHandsOnTaskReportQuery);
}
public List<StudentHandsOnTaskReport> getValuesByQueryNotWithPermission (StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
return studentHandsOnTaskReportDao.getValuesByQueryNotWithPermission(studentHandsOnTaskReportQuery);
}
public StudentHandsOnTaskReport getInfo (Long studentHandsOnTaskReportId){
StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery = new StudentHandsOnTaskReportQuery();
studentHandsOnTaskReportQuery.setStudentHandsOnTaskReportId(studentHandsOnTaskReportId);
List<StudentHandsOnTaskReport> list = studentHandsOnTaskReportDao.getValuesByQuery(studentHandsOnTaskReportQuery);
if(null != list && list.size()>0){
return list.get(0);
}else{
return null;
}
}
public StudentHandsOnTaskReport getInfo (StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery){
List<StudentHandsOnTaskReport> list = studentHandsOnTaskReportDao.getValuesByQuery(studentHandsOnTaskReportQuery);
if(null != list && list.size()>0){
return list.get(0);
}else{
return null;
}
}
public List<StudentHandsOnTaskReport> getReportList(List<Long> collect) {
return studentHandsOnTaskReportDao.getReportList(collect);
}
}

@ -2,23 +2,22 @@ package com.ibeetl.jlw.service.api.teacher;
import cn.hutool.core.lang.Assert;
import com.ibeetl.jlw.dao.TeacherMergeApplicationDao;
import com.ibeetl.jlw.entity.Teacher;
import com.ibeetl.jlw.entity.TeacherMergeApplication;
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeTeacher;
import com.ibeetl.jlw.entity.TeacherOpenCourseNotice;
import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.entity.api.CurrentUserInfo;
import com.ibeetl.jlw.entity.api.teacher.TeacherIndexData;
import com.ibeetl.jlw.service.IndexBaseService;
import com.ibeetl.jlw.service.StudentHandsOnTaskReportService;
import com.ibeetl.jlw.service.TeacherOpenCourseMergeTeacherService;
import com.ibeetl.jlw.service.TeacherOpenCourseNoticeService;
import com.ibeetl.jlw.web.query.TeacherMergeApplicationQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeTeacherQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseNoticeQuery;
import org.assertj.core.util.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
@ -32,11 +31,13 @@ import java.util.List;
@Service
public class ApiTeacherService {
@Autowired private IndexBaseService indexBaseService;
@Autowired private TeacherOpenCourseNoticeService teacherOpenCourseNoticeService;
@Autowired private TeacherMergeApplicationDao teacherMergeApplicationDao;
@Resource private IndexBaseService indexBaseService;
@Resource private TeacherOpenCourseNoticeService teacherOpenCourseNoticeService;
@Resource private TeacherMergeApplicationDao teacherMergeApplicationDao;
@Autowired private TeacherOpenCourseMergeTeacherService teacherOpenCourseMergeTeacherService;
@Resource private TeacherOpenCourseMergeTeacherService teacherOpenCourseMergeTeacherService;
@Resource private StudentHandsOnTaskReportService studentHandsOnTaskReportService;
/**
* -
@ -52,8 +53,7 @@ public class ApiTeacherService {
// 教师ID
final Long teacherId = ((Teacher) identityInfo).getTeacherId();
// TODO xuliangtong 实训评阅列表查询
List<Object> toDoList = Lists.emptyList();
// 我的通知
TeacherOpenCourseNoticeQuery teacherOpenCourseNoticeQuery = new TeacherOpenCourseNoticeQuery();
@ -70,8 +70,12 @@ public class ApiTeacherService {
teacherOpenCourseMergeTeacherQuery.setTeacherId(teacherId);
List<TeacherOpenCourseMergeTeacher> openCourseList = teacherOpenCourseMergeTeacherService.getValuesByQuery(teacherOpenCourseMergeTeacherQuery);
// 实训评阅列表查询
List<Long> collect = openCourseList.stream().map(TeacherOpenCourseMergeTeacher::getTeacherOpenCourseId).collect(Collectors.toList());
List<StudentHandsOnTaskReport> reportList = studentHandsOnTaskReportService.getReportList(collect);
return TeacherIndexData.builder()
.toDoList(toDoList)
.toDoList(reportList)
.noticeList(noticeList)
.myApplicationList(applicationList)
.myOpenCourseList(openCourseList)

@ -0,0 +1,225 @@
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.*;
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
@Validated
public class StudentHandsOnTaskReportController{
private final Log log = LogFactory.getLog(this.getClass());
private static final String MODEL = "/jlw/studentHandsOnTaskReport";
private static final String API = "/api/studentHandsOnTaskReport";
@Resource private StudentHandsOnTaskReportService studentHandsOnTaskReportService;
@Resource FileService fileService;
/* 前端接口 */
@PostMapping(API + "/getPageList.do")
public JsonResult<PageQuery> getPageList(StudentHandsOnTaskReportQuery condition,@SCoreUser CoreUser coreUser){
if(null == coreUser){
return JsonResult.failMessage("请登录后再操作");
}else{
PageQuery page = condition.getPageQuery();
studentHandsOnTaskReportService.queryByConditionQuery(page);
return JsonResult.success(page);
}
}
@GetMapping(API + "/getInfo.do")
public JsonResult<StudentHandsOnTaskReport>getInfo(StudentHandsOnTaskReportQuery param,@SCoreUser CoreUser coreUser) {
if(null == coreUser){
return JsonResult.failMessage("请登录后再操作");
}else{
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportService.getInfo(param);
return JsonResult.success(studentHandsOnTaskReport);
}
}
@GetMapping(API + "/getList.do")
public JsonResult<List<StudentHandsOnTaskReport>>getList(StudentHandsOnTaskReportQuery param,@SCoreUser CoreUser coreUser) {
if(null == coreUser){
return JsonResult.failMessage("请登录后再操作");
}else{
List<StudentHandsOnTaskReport>list = studentHandsOnTaskReportService.getValuesByQuery(param);
return JsonResult.success(list);
}
}
/* 后台页面 */
@GetMapping(MODEL + "/index.do")
@Function("studentHandsOnTaskReport.query")
public ModelAndView index() {
ModelAndView view = new ModelAndView("/jlw/studentHandsOnTaskReport/index.html") ;
view.addObject("search", StudentHandsOnTaskReportQuery.class.getName());
return view;
}
@GetMapping(MODEL + "/edit.do")
@Function("studentHandsOnTaskReport.edit")
public ModelAndView edit(Long studentHandsOnTaskReportId) {
ModelAndView view = new ModelAndView("/jlw/studentHandsOnTaskReport/edit.html");
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportService.queryById(studentHandsOnTaskReportId);
view.addObject("studentHandsOnTaskReport", studentHandsOnTaskReport);
return view;
}
@GetMapping(MODEL + "/add.do")
@Function("studentHandsOnTaskReport.add")
public ModelAndView add(Long studentHandsOnTaskReportId) {
ModelAndView view = new ModelAndView("/jlw/studentHandsOnTaskReport/add.html");
if(null != studentHandsOnTaskReportId){
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportService.queryById(studentHandsOnTaskReportId);
view.addObject("studentHandsOnTaskReport", studentHandsOnTaskReport);
}else {
view.addObject("studentHandsOnTaskReport", new StudentHandsOnTaskReport());
}
return view;
}
/* 后台接口 */
@PostMapping(MODEL + "/list.json")
@Function("studentHandsOnTaskReport.query")
public JsonResult<PageQuery> list(StudentHandsOnTaskReportQuery condition){
PageQuery page = condition.getPageQuery();
studentHandsOnTaskReportService.queryByCondition(page);
return JsonResult.success(page);
}
@PostMapping(MODEL + "/addAll.json")
@Function("studentHandsOnTaskReport.add")
public JsonResult addAll(StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery,@SCoreUser CoreUser coreUser){
if(null == coreUser){
return JsonResult.failMessage("请登录后再操作");
}else{
studentHandsOnTaskReportQuery.setUserId(coreUser.getId());
studentHandsOnTaskReportQuery.setOrgId(coreUser.getOrgId());
String msg = studentHandsOnTaskReportService.addAll(studentHandsOnTaskReportQuery);
if (StringUtils.isBlank(msg)) {
return JsonResult.success();
} else {
return JsonResult.failMessage("新增失败,"+msg);
}
}
}
@PostMapping(MODEL + "/add.json")
@Function("studentHandsOnTaskReport.add")
public JsonResult add(@Validated(ValidateConfig.ADD.class) StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery, BindingResult result,@SCoreUser CoreUser coreUser){
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else{
studentHandsOnTaskReportQuery.setUserId(coreUser.getId());
studentHandsOnTaskReportQuery.setOrgId(coreUser.getOrgId());
return studentHandsOnTaskReportService.add(studentHandsOnTaskReportQuery);
}
}
@PostMapping(MODEL + "/edit.json")
@Function("studentHandsOnTaskReport.edit")
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) StudentHandsOnTaskReportQuery studentHandsOnTaskReportQuery, BindingResult result) {
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else {
studentHandsOnTaskReportQuery.setUserId(null);
studentHandsOnTaskReportQuery.setOrgId(null);
String msg = studentHandsOnTaskReportService.edit(studentHandsOnTaskReportQuery);
if (StringUtils.isBlank(msg)) {
return JsonResult.success();
} else {
return JsonResult.failMessage("更新失败,"+msg);
}
}
}
@GetMapping(MODEL + "/view.json")
@Function("studentHandsOnTaskReport.query")
public JsonResult<StudentHandsOnTaskReport>queryInfo(Long studentHandsOnTaskReportId) {
StudentHandsOnTaskReport studentHandsOnTaskReport = studentHandsOnTaskReportService.queryById( studentHandsOnTaskReportId);
return JsonResult.success(studentHandsOnTaskReport);
}
@GetMapping(MODEL + "/getValues.json")
@Function("studentHandsOnTaskReport.query")
public JsonResult<List<StudentHandsOnTaskReport>>getValues(StudentHandsOnTaskReportQuery param) {
List<StudentHandsOnTaskReport>list = studentHandsOnTaskReportService.getValuesByQuery(param);
return JsonResult.success(list);
}
@PostMapping(MODEL + "/delete.json")
@Function("studentHandsOnTaskReport.delete")
@ResponseBody
public JsonResult delete(String ids) {
studentHandsOnTaskReportService.deleteStudentHandsOnTaskReport(ids);
return JsonResult.success();
}
}

@ -0,0 +1,176 @@
package com.ibeetl.jlw.web.query;
import cn.jlw.validate.ValidateConfig;
import com.ibeetl.jlw.entity.StudentHandsOnTaskReport;
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 StudentHandsOnTaskReportQuery extends PageParam {
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
@Query(name = "ID", display = false)
private Long studentHandsOnTaskReportId;
@Query(name = "课程开课ID", display = false)
private Long teacherOpenCourseId;
@Query(name = "课程实操ID", display = false)
private Long handsOnId;
@Query(name = "课程实操任务ID", display = false)
private Long handsOnTaskId;
@Query(name = "文件地址PDF", display = false)
private String reportFile;
@Query(name = "报告分值", display = false)
private BigDecimal reportScore;
@Query(name = "报告评语", display = false)
private BigDecimal reportComment;
@Query(name = "创建时间", display = false)
private Date createTime;
@Query(name = "组织ID", display = false)
private Long orgId;
@Query(name = "用户ID", display = false)
private Long userId;
private String studentHandsOnTaskReportIdPlural;
private String teacherOpenCourseIdPlural;
private String handsOnIdPlural;
private String handsOnTaskIdPlural;
private String orgIdPlural;
private String userIdPlural;
private String studentHandsOnTaskReportJsonStr;//json格式
private String _given;//指定更新的特定字段,多个逗号隔开
public Long getStudentHandsOnTaskReportId(){
return studentHandsOnTaskReportId;
}
public void setStudentHandsOnTaskReportId(Long studentHandsOnTaskReportId ){
this.studentHandsOnTaskReportId = studentHandsOnTaskReportId;
}
public Long getTeacherOpenCourseId(){
return teacherOpenCourseId;
}
public void setTeacherOpenCourseId(Long teacherOpenCourseId ){
this.teacherOpenCourseId = teacherOpenCourseId;
}
public Long getHandsOnId(){
return handsOnId;
}
public void setHandsOnId(Long handsOnId ){
this.handsOnId = handsOnId;
}
public Long getHandsOnTaskId(){
return handsOnTaskId;
}
public void setHandsOnTaskId(Long handsOnTaskId ){
this.handsOnTaskId = handsOnTaskId;
}
public String getReportFile(){
return reportFile;
}
public void setReportFile(String reportFile ){
this.reportFile = reportFile;
}
public BigDecimal getReportScore(){
return reportScore;
}
public void setReportScore(BigDecimal reportScore ){
this.reportScore = reportScore;
}
public BigDecimal getReportComment(){
return reportComment;
}
public void setReportComment(BigDecimal reportComment ){
this.reportComment = reportComment;
}
public Date getCreateTime(){
return createTime;
}
public void setCreateTime(Date createTime ){
this.createTime = createTime;
}
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 StudentHandsOnTaskReport pojo(){
StudentHandsOnTaskReport pojo = new StudentHandsOnTaskReport();
pojo.setStudentHandsOnTaskReportId(this.getStudentHandsOnTaskReportId());
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
pojo.setHandsOnId(this.getHandsOnId());
pojo.setHandsOnTaskId(this.getHandsOnTaskId());
pojo.setReportFile(this.getReportFile());
pojo.setReportScore(this.getReportScore());
pojo.setReportComment(this.getReportComment());
pojo.setCreateTime(this.getCreateTime());
pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId());
return pojo;
}
public String getStudentHandsOnTaskReportIdPlural(){
return studentHandsOnTaskReportIdPlural;
}
public void setStudentHandsOnTaskReportIdPlural(String studentHandsOnTaskReportIdPlural){
this.studentHandsOnTaskReportIdPlural = studentHandsOnTaskReportIdPlural;
}
public String getTeacherOpenCourseIdPlural(){
return teacherOpenCourseIdPlural;
}
public void setTeacherOpenCourseIdPlural(String teacherOpenCourseIdPlural){
this.teacherOpenCourseIdPlural = teacherOpenCourseIdPlural;
}
public String getHandsOnIdPlural(){
return handsOnIdPlural;
}
public void setHandsOnIdPlural(String handsOnIdPlural){
this.handsOnIdPlural = handsOnIdPlural;
}
public String getHandsOnTaskIdPlural(){
return handsOnTaskIdPlural;
}
public void setHandsOnTaskIdPlural(String handsOnTaskIdPlural){
this.handsOnTaskIdPlural = handsOnTaskIdPlural;
}
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 getStudentHandsOnTaskReportJsonStr(){
return studentHandsOnTaskReportJsonStr;
}
public void setStudentHandsOnTaskReportJsonStr(String studentHandsOnTaskReportJsonStr ){
this.studentHandsOnTaskReportJsonStr = studentHandsOnTaskReportJsonStr;
}
public String get_given() {
return _given;
}
public void set_given(String _given) {
this._given = _given;
}
}

@ -0,0 +1,376 @@
queryByCondition
===
* 根据不为空的参数进行分页查询
select
@pageTag(){
t.*
@}
from student_hands_on_task_report t
where 1=1
@//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("studentHandsOnTaskReport.query")#
@if(!isEmpty(studentHandsOnTaskReportId)){
and t.student_hands_on_task_report_id =#studentHandsOnTaskReportId#
@}
@if(!isEmpty(studentHandsOnTaskReportIdPlural)){
and find_in_set(t.student_hands_on_task_report_id,#studentHandsOnTaskReportIdPlural#)
@}
@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(handsOnId)){
and t.hands_on_id =#handsOnId#
@}
@if(!isEmpty(handsOnIdPlural)){
and find_in_set(t.hands_on_id,#handsOnIdPlural#)
@}
@if(!isEmpty(handsOnTaskId)){
and t.hands_on_task_id =#handsOnTaskId#
@}
@if(!isEmpty(handsOnTaskIdPlural)){
and find_in_set(t.hands_on_task_id,#handsOnTaskIdPlural#)
@}
@if(!isEmpty(reportFile)){
and t.report_file =#reportFile#
@}
@if(!isEmpty(reportScore)){
and t.report_score =#reportScore#
@}
@if(!isEmpty(reportComment)){
and t.report_comment =#reportComment#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
@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#)
@}
queryByConditionQuery
===
* 根据不为空的参数进行分页查询(无权限)
select
@pageTag(){
t.*
@}
from student_hands_on_task_report t
where 1=1
@if(!isEmpty(studentHandsOnTaskReportId)){
and t.student_hands_on_task_report_id =#studentHandsOnTaskReportId#
@}
@if(!isEmpty(studentHandsOnTaskReportIdPlural)){
and find_in_set(t.student_hands_on_task_report_id,#studentHandsOnTaskReportIdPlural#)
@}
@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(handsOnId)){
and t.hands_on_id =#handsOnId#
@}
@if(!isEmpty(handsOnIdPlural)){
and find_in_set(t.hands_on_id,#handsOnIdPlural#)
@}
@if(!isEmpty(handsOnTaskId)){
and t.hands_on_task_id =#handsOnTaskId#
@}
@if(!isEmpty(handsOnTaskIdPlural)){
and find_in_set(t.hands_on_task_id,#handsOnTaskIdPlural#)
@}
@if(!isEmpty(reportFile)){
and t.report_file =#reportFile#
@}
@if(!isEmpty(reportScore)){
and t.report_score =#reportScore#
@}
@if(!isEmpty(reportComment)){
and t.report_comment =#reportComment#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
@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#)
@}
deleteStudentHandsOnTaskReportByIds
===
* 批量删除
delete from student_hands_on_task_report where find_in_set(student_hands_on_task_report_id,#ids#)
getByIds
===
select * from student_hands_on_task_report where find_in_set(student_hands_on_task_report_id,#ids#)
updateGivenByIds
===
* 批量更新指定字段,无论此字段是否有值
update student_hands_on_task_report
set
@if(contain("teacherOpenCourseId",_given)){
@if(isEmpty(teacherOpenCourseId)){
teacher_open_course_id = null ,
@}else{
teacher_open_course_id = #teacherOpenCourseId# ,
@}
@}
@if(contain("handsOnId",_given)){
@if(isEmpty(handsOnId)){
hands_on_id = null ,
@}else{
hands_on_id = #handsOnId# ,
@}
@}
@if(contain("handsOnTaskId",_given)){
@if(isEmpty(handsOnTaskId)){
hands_on_task_id = null ,
@}else{
hands_on_task_id = #handsOnTaskId# ,
@}
@}
@if(contain("reportFile",_given)){
@if(isEmpty(reportFile)){
report_file = null ,
@}else{
report_file = #reportFile# ,
@}
@}
@if(contain("reportScore",_given)){
@if(isEmpty(reportScore)){
report_score = null ,
@}else{
report_score = #reportScore# ,
@}
@}
@if(contain("reportComment",_given)){
@if(isEmpty(reportComment)){
report_comment = null ,
@}else{
report_comment = #reportComment# ,
@}
@}
@if(contain("createTime",_given)){
@if(isEmpty(createTime)){
create_time = null ,
@}else{
create_time = #createTime# ,
@}
@}
@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# ,
@}
@}
student_hands_on_task_report_id = student_hands_on_task_report_id
where find_in_set(student_hands_on_task_report_id,#studentHandsOnTaskReportIdPlural#)
getStudentHandsOnTaskReportValues
===
* 根据不为空的参数进行查询
select t.*
from student_hands_on_task_report t
where 1=1
@if(!isEmpty(studentHandsOnTaskReportId)){
and t.student_hands_on_task_report_id =#studentHandsOnTaskReportId#
@}
@if(!isEmpty(teacherOpenCourseId)){
and t.teacher_open_course_id =#teacherOpenCourseId#
@}
@if(!isEmpty(handsOnId)){
and t.hands_on_id =#handsOnId#
@}
@if(!isEmpty(handsOnTaskId)){
and t.hands_on_task_id =#handsOnTaskId#
@}
@if(!isEmpty(reportFile)){
and t.report_file =#reportFile#
@}
@if(!isEmpty(reportScore)){
and t.report_score =#reportScore#
@}
@if(!isEmpty(reportComment)){
and t.report_comment =#reportComment#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
@if(!isEmpty(orgId)){
and t.org_id =#orgId#
@}
@if(!isEmpty(userId)){
and t.user_id =#userId#
@}
getValuesByQuery
===
* 根据不为空的参数进行查询
select t.*
from student_hands_on_task_report t
where 1=1 and #function("studentHandsOnTaskReport.query")#
@if(!isEmpty(studentHandsOnTaskReportId)){
and t.student_hands_on_task_report_id =#studentHandsOnTaskReportId#
@}
@if(!isEmpty(studentHandsOnTaskReportIdPlural)){
and find_in_set(t.student_hands_on_task_report_id,#studentHandsOnTaskReportIdPlural#)
@}
@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(handsOnId)){
and t.hands_on_id =#handsOnId#
@}
@if(!isEmpty(handsOnIdPlural)){
and find_in_set(t.hands_on_id,#handsOnIdPlural#)
@}
@if(!isEmpty(handsOnTaskId)){
and t.hands_on_task_id =#handsOnTaskId#
@}
@if(!isEmpty(handsOnTaskIdPlural)){
and find_in_set(t.hands_on_task_id,#handsOnTaskIdPlural#)
@}
@if(!isEmpty(reportFile)){
and t.report_file =#reportFile#
@}
@if(!isEmpty(reportScore)){
and t.report_score =#reportScore#
@}
@if(!isEmpty(reportComment)){
and t.report_comment =#reportComment#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
@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#)
@}
getValuesByQueryNotWithPermission
===
* 根据不为空的参数进行查询(不包含权限)
select t.*
from student_hands_on_task_report t
where 1=1
@if(!isEmpty(studentHandsOnTaskReportId)){
and t.student_hands_on_task_report_id =#studentHandsOnTaskReportId#
@}
@if(!isEmpty(studentHandsOnTaskReportIdPlural)){
and find_in_set(t.student_hands_on_task_report_id,#studentHandsOnTaskReportIdPlural#)
@}
@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(handsOnId)){
and t.hands_on_id =#handsOnId#
@}
@if(!isEmpty(handsOnIdPlural)){
and find_in_set(t.hands_on_id,#handsOnIdPlural#)
@}
@if(!isEmpty(handsOnTaskId)){
and t.hands_on_task_id =#handsOnTaskId#
@}
@if(!isEmpty(handsOnTaskIdPlural)){
and find_in_set(t.hands_on_task_id,#handsOnTaskIdPlural#)
@}
@if(!isEmpty(reportFile)){
and t.report_file =#reportFile#
@}
@if(!isEmpty(reportScore)){
and t.report_score =#reportScore#
@}
@if(!isEmpty(reportComment)){
and t.report_comment =#reportComment#
@}
@if(!isEmpty(createTime)){
and t.create_time =#createTime#
@}
@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#)
@}
getReportList
===
* 根据开课ID进行查询
select t.*
from student_hands_on_task_report t where t.teacherOpenCourseId in (#join(collect)#)

@ -0,0 +1,38 @@
layui.define([ 'form', 'laydate', 'table','studentHandsOnTaskReportApi'], function(exports) {
var form = layui.form;
var studentHandsOnTaskReportApi = layui.studentHandsOnTaskReportApi;
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 studentHandsOnTaskReportId = $("#addForm input[name='studentHandsOnTaskReportId']").val();
if(!$.isEmpty(studentHandsOnTaskReportId)){
studentHandsOnTaskReportApi.updateStudentHandsOnTaskReport($('#addForm'),function(){
parent.window.dataReload();
Common.info("更新成功");
Lib.closeFrame();
});
}else{
studentHandsOnTaskReportApi.addStudentHandsOnTaskReport($('#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', 'studentHandsOnTaskReportApi'], function(exports) {
var studentHandsOnTaskReportApi = layui.studentHandsOnTaskReportApi;
var table=layui.table;
var view = {
init:function(){
},
delBatch:function(){
var data = Common.getMoreDataFromTable(table,"studentHandsOnTaskReportTable");
if(data==null){
return ;
}
Common.openConfirm("确认要删除这些学生-课程实操-报告撰写?",function(){
var ids =Common.concatBatchId(data,"studentHandsOnTaskReportId");
studentHandsOnTaskReportApi.del(ids,function(){
Common.info("删除成功");
dataReload();
})
})
}
}
exports('del',view);
});

@ -0,0 +1,28 @@
layui.define([ 'form', 'laydate', 'table','studentHandsOnTaskReportApi'], function(exports) {
var form = layui.form;
var studentHandsOnTaskReportApi = layui.studentHandsOnTaskReportApi;
var index = layui.index;
var view = {
init:function(){
Lib.initGenrealForm($("#updateForm"),form);
this.initSubmit();
},
initSubmit:function(){
$("#updateButton").click(function(){
form.on('submit(form)', function(){
studentHandsOnTaskReportApi.updateStudentHandsOnTaskReport($('#updateForm'),function(){
parent.window.dataReload();
Common.info("更新成功");
Lib.closeFrame();
});
});
});
$("#updateButton-cancel").click(function(){
Lib.closeFrame();
});
}
}
exports('edit',view);
});

@ -0,0 +1,192 @@
layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var studentHandsOnTaskReportTable = null;
var view ={
init:function(){
var that = this
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),studentHandsOnTaskReportTable)
that.initToolBar();
}
},
initTable:function(){
var sx_ = localStorage.getItem("studentHandsOnTaskReportTable_field_"+Common.userInfoId); //筛选值显示、隐藏缓存
if($.isEmpty(sx_)){sx_ = {};}else {sx_ = JSON.parse(sx_);}
studentHandsOnTaskReportTable = table.render({
elem : '#studentHandsOnTaskReportTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/jlw/studentHandsOnTaskReport/list.json' // 数据接口
,page : Lib.tablePage // 开启分页
,toolbar: '#toolbar_studentHandsOnTaskReport' //自定义头部左侧工具栏
,defaultToolbar: ['filter', 'print', 'exports'] //头部右侧工具栏
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox',
},
{
field : 'studentHandsOnTaskReportId',
title : 'ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['studentHandsOnTaskReportId'])?false:sx_['studentHandsOnTaskReportId'],
width : 60,
},
{
field : 'teacherOpenCourseId',
title : '课程开课ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['teacherOpenCourseId'])?false:sx_['teacherOpenCourseId'],
},
{
field : 'handsOnId',
title : '课程实操ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['handsOnId'])?false:sx_['handsOnId'],
},
{
field : 'handsOnTaskId',
title : '课程实操任务ID',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['handsOnTaskId'])?false:sx_['handsOnTaskId'],
},
{
field : 'reportFile',
title : '文件地址PDF',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['reportFile'])?false:sx_['reportFile'],
},
{
field : 'reportScore',
title : '报告分值',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['reportScore'])?false:sx_['reportScore'],
},
{
field : 'reportComment',
title : '报告评语',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['reportComment'])?false:sx_['reportComment'],
},
{
field : 'createTime',
title : '创建时间',
align:"center",
hideField :false,
hide:$.isEmpty(sx_['createTime'])?false:sx_['createTime'],
},
{
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 : 'operation_',title : '操作',align:"center", templet: function (d) {
var htm = '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button>';
htm += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</button>';
return htm;
}
}
] ]
});
table.on('checkbox(studentHandsOnTaskReportTable)', function(obj){
var studentHandsOnTaskReport = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),studentHandsOnTaskReportTable,form);
},
initToolBar:function(){
toolbar = {
add: function () {
var url = "/jlw/studentHandsOnTaskReport/add.do";
Common.openDlg(url,"学生-课程实操-报告撰写管理>新增");
},
edit: function () {
var data = Common.getOneFromTable(table,"studentHandsOnTaskReportTable");
if(data==null){
return ;
}
var url = "/jlw/studentHandsOnTaskReport/add.do?studentHandsOnTaskReportId="+data.studentHandsOnTaskReportId;
Common.openDlg(url,"学生-课程实操-报告撰写管理>"+data.studentHandsOnTaskReportId+">编辑");
},
del: function () {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
search: function () {
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskReportTable, 1);
view.initToolBar()
},
refresh: function () {
searchForm.reset();
Lib.doSearchForm($("#searchForm"), studentHandsOnTaskReportTable, 1);
view.initToolBar()
},
}
//触发事件
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}, initTableTool: table.on('tool(studentHandsOnTaskReportTable)', function (obj) {
var data = obj.data;
if (obj.event === 'edit') {
var url = "/jlw/studentHandsOnTaskReport/add.do?studentHandsOnTaskReportId="+data.studentHandsOnTaskReportId;
Common.openDlg(url,"学生-课程实操-报告撰写管理>"+data.studentHandsOnTaskReportId+">编辑");
}else if(obj.event === "del"){
layer.confirm('是否确定删除该信息?', function (index) {
var ret = Common.postAjax("/jlw/studentHandsOnTaskReport/delete.json",{ids:data.studentHandsOnTaskReportId});
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);
});

@ -0,0 +1,18 @@
/*访问后台的代码*/
layui.define([], function(exports) {
var api={
updateStudentHandsOnTaskReport:function(form,callback){
Lib.submitForm("/jlw/studentHandsOnTaskReport/edit.json",form,{},callback)
},
addStudentHandsOnTaskReport:function(form,callback){
Lib.submitForm("/jlw/studentHandsOnTaskReport/add.json",form,{},callback)
},
del:function(ids,callback){
Common.post("/jlw/studentHandsOnTaskReport/delete.json",{"ids":ids},function(){
callback();
})
}
};
exports('studentHandsOnTaskReportApi',api);
});

@ -0,0 +1,88 @@
<!--# layout("/common/layout.html",{"jsBase":"/js/jlw/studentHandsOnTaskReport/"}){ -->
<form class="layui-form" id="addForm">
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">课程开课ID</label>
<div class="layui-input-inline">
<input type="text" id="teacherOpenCourseId" name="teacherOpenCourseId" value="${studentHandsOnTaskReport.teacherOpenCourseId}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">课程实操ID</label>
<div class="layui-input-inline">
<input type="text" id="handsOnId" name="handsOnId" value="${studentHandsOnTaskReport.handsOnId}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">课程实操任务ID</label>
<div class="layui-input-inline">
<input type="text" id="handsOnTaskId" name="handsOnTaskId" value="${studentHandsOnTaskReport.handsOnTaskId}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">文件地址PDF</label>
<div class="layui-input-inline">
<input type="text" id="reportFile" name="reportFile" value="${studentHandsOnTaskReport.reportFile}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">报告分值</label>
<div class="layui-input-inline">
<input type="text" id="reportScore" name="reportScore" value="${studentHandsOnTaskReport.reportScore}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">报告评语</label>
<div class="layui-input-inline">
<input type="text" id="reportComment" name="reportComment" value="${studentHandsOnTaskReport.reportComment}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" value="${studentHandsOnTaskReport.createTime,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">组织ID</label>
<div class="layui-input-inline">
<input type="text" id="orgId" name="orgId" value="${studentHandsOnTaskReport.orgId}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">用户ID</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${studentHandsOnTaskReport.userId}" class="layui-input" >
</div>
</div>
</div>
</div>
<!-- 业务对象须有hidden字段保存delFlag和version字段-->
<input type="hidden" name="studentHandsOnTaskReportId" value="${studentHandsOnTaskReport.studentHandsOnTaskReportId}" />
<layui:submitButtons id="addButton" buttonType="" showExamine="2" />
</form>
<!--#} -->
<script>
layui.use(['add'], function(){
var studentHandsOnTaskReportAdd = layui.add
studentHandsOnTaskReportAdd.init();
});
</script>

@ -0,0 +1,88 @@
<!--# layout("/common/layout.html",{"jsBase":"/js/jlw/studentHandsOnTaskReport/"}){ -->
<form class="layui-form" id="updateForm">
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">课程开课ID</label>
<div class="layui-input-inline">
<input type="text" id="teacherOpenCourseId" name="teacherOpenCourseId" value="${studentHandsOnTaskReport.teacherOpenCourseId}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">课程实操ID</label>
<div class="layui-input-inline">
<input type="text" id="handsOnId" name="handsOnId" value="${studentHandsOnTaskReport.handsOnId}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">课程实操任务ID</label>
<div class="layui-input-inline">
<input type="text" id="handsOnTaskId" name="handsOnTaskId" value="${studentHandsOnTaskReport.handsOnTaskId}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">文件地址PDF</label>
<div class="layui-input-inline">
<input type="text" id="reportFile" name="reportFile" value="${studentHandsOnTaskReport.reportFile}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">报告分值</label>
<div class="layui-input-inline">
<input type="text" id="reportScore" name="reportScore" value="${studentHandsOnTaskReport.reportScore}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">报告评语</label>
<div class="layui-input-inline">
<input type="text" id="reportComment" name="reportComment" value="${studentHandsOnTaskReport.reportComment}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" value="${studentHandsOnTaskReport.createTime,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">组织ID</label>
<div class="layui-input-inline">
<input type="text" id="orgId" name="orgId" value="${studentHandsOnTaskReport.orgId}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">用户ID</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${studentHandsOnTaskReport.userId}" class="layui-input" >
</div>
</div>
</div>
</div>
<!-- 业务对象须有hidden字段保存delFlag和version字段-->
<input type="hidden" name="studentHandsOnTaskReportId" value="${studentHandsOnTaskReport.studentHandsOnTaskReportId}" />
<layui:submitButtons id="updateButton" buttonType="" showExamine="2" />
</form>
<!--#} -->
<script>
layui.use(['edit'], function(){
var studentHandsOnTaskReportEdit = layui.edit
studentHandsOnTaskReportEdit.init();
});
</script>

@ -0,0 +1,29 @@
<!--#layout("/common/layout.html",{"jsBase":"/js/jlw/studentHandsOnTaskReport/"}){ -->
<layui:searchForm formId="searchForm" searchList="" condition="${search}">
</layui:searchForm>
<table id="studentHandsOnTaskReportTable" lay-filter="studentHandsOnTaskReportTable"></table>
<!--#} -->
<script type="text/html" id="toolbar_studentHandsOnTaskReport">
<div class="layui-btn-container">
<div class="layui-btn-group" >
<!--# if(core.searchIsShow(search)) {-->
<layui:accessButton function="studentHandsOnTaskReport.query" id="searchFormSearch" action="search"><i class="layui-icon">&#xe615;</i>搜索</layui:accessButton>
<!--# }-->
<layui:accessButton function="studentHandsOnTaskReport.add" action="add">添加</layui:accessButton>
<layui:accessButton function="studentHandsOnTaskReport.edit" action="edit">修改</layui:accessButton>
<layui:accessButton function="studentHandsOnTaskReport.del" action="del">删除</layui:accessButton>
<!--# if(!isEmpty(search)) {-->
<layui:accessButton function="studentHandsOnTaskReport.query" action="refresh"><i class="layui-icon">&#xe669;</i>刷新</layui:accessButton>
<!--# }-->
</div>
</div>
</script>
<script>
layui.use(['index'], function(){
var index = layui.index;
index.init();
});
</script>
Loading…
Cancel
Save