首页数据
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -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,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,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,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"></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"></i>刷新</layui:accessButton>
|
||||
<!--# }-->
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
|
||||
layui.use(['index'], function(){
|
||||
var index = layui.index;
|
||||
index.init();
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue