2024年5月24日 修改问题

This commit is contained in:
bai 2024-05-24 01:14:15 +08:00
parent b179a57d45
commit 31338c9b68
3 changed files with 72 additions and 2 deletions

View File

@ -23,6 +23,8 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.kc.detection.entity.KcDetectionMain;
import org.jeecg.modules.kc.detection.service.IKcDetectionMainService;
import org.jeecg.modules.kc.grab.SynchronizationService.tools.ChangeTingKeTongJi;
import org.jeecg.modules.kc.jiaoshi.entity.KcJiaoshirongliang;
import org.jeecg.modules.kc.jiaoshi.service.IKcJiaoshirongliangService;
@ -42,6 +44,8 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.kc.qa.entity.KcEvaluationstudent;
import org.jeecg.modules.kc.qa.service.IKcEvaluationstudentService;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg;
import org.jeecg.modules.kc.zyJxdg.service.IZyJxdgService;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
@ -71,8 +75,8 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
@Autowired
private ChangeTingKeTongJi changeTingKeTongJi;
@Autowired
private IKcEvaluationstudentService kcEvaluationstudentService;
@Autowired
private IKcEvaluationstudentService kcEvaluationstudentService;
@Autowired
private IKcSysConfigService kcSysConfigService;
@ -82,6 +86,12 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
@Autowired
private IKcXqxnHistoryService kcXqxnHistoryService;
@Autowired
private IKcDetectionMainService kcDetectionMainService;
@Autowired
private IZyJxdgService zyJxdgService;
@Value("${jeecg.path.upload}")
private String upLoadPath;
@ -324,6 +334,53 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
return Result.OK(kcKetangbiao);
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "课堂管理-子表-通过id查询")
@ApiOperation(value="课堂管理-子表-通过id查询", notes="课堂管理-子表-通过id查询")
@GetMapping(value = "/queryAllDataById")
public Result<KcKetangbiao> queryAllDataById(@RequestParam(name="id",required=true) String id) {
KcKetangbiao kcKetangbiao = kcKetangbiaoService.getById(id);
if(kcKetangbiao==null) {
return Result.error("未找到对应数据");
}
//查询对应教室数据
QueryWrapper<KcJiaoshirongliang> jiaoshirongliangQw = new QueryWrapper<>();
jiaoshirongliangQw.eq("jsbh",kcKetangbiao.getJsbh());
jiaoshirongliangQw.last("limit 1");
KcJiaoshirongliang jiaoshirongliang = kcJiaoshirongliangService.getOne(jiaoshirongliangQw);
kcKetangbiao.setJiaoshirongliang(jiaoshirongliang);
//查询教学大纲
String rwbh = kcKetangbiao.getRwbh();
String xqxn = kcKetangbiao.getXnxq();
QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>();
queryWrapper.eq("rwbh",rwbh);
queryWrapper.eq("xqxn",xqxn);
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// queryWrapper.eq("create_by",sysUser.getUsername());
queryWrapper.last("limit 1");
ZyJxdg zyJxdg = zyJxdgService.getOne(queryWrapper);
kcKetangbiao.setZyJxdg(zyJxdg);
//查询
DateTime now = DateTime.now();
String nowStr = now.toString("yyyy-MM-dd");
QueryWrapper<KcDetectionMain> kdmQw = new QueryWrapper<>();
kdmQw.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
kdmQw.lambda().eq(KcDetectionMain::getRwbh,rwbh);
kdmQw.lambda().eq(KcDetectionMain::getXnxq,xqxn);
kdmQw.last("limit 1");
KcDetectionMain detectionMain = kcDetectionMainService.getOne(kdmQw);
kcKetangbiao.setDetectionMain(detectionMain);
return Result.OK(kcKetangbiao);
}
/**
* 导出excel
*

View File

@ -8,7 +8,9 @@ import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.kc.detection.entity.KcDetectionMain;
import org.jeecg.modules.kc.jiaoshi.entity.KcJiaoshirongliang;
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
@ -343,4 +345,11 @@ public class KcKetangbiao implements Serializable {
@TableField(exist = false)
private String flag;
@TableField(exist = false)
private KcDetectionMain detectionMain;
@TableField(exist = false)
private ZyJxdg zyJxdg;
}

View File

@ -62,6 +62,10 @@ public class KcTeachingUnitContentThree implements Serializable {
@Excel(name = "上一级ID", width = 15)
@ApiModelProperty(value = "上一级ID")
private java.lang.String pid;
/**标题*/
@Excel(name = "标题", width = 15)
@ApiModelProperty(value = "标题")
private java.lang.String title;
/**排序*/
@Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序")