| | |
| | | */ |
| | | @Override |
| | | public Result insertClass(String className, String classNumber, Date startTime, Date endTime, String subjectId, |
| | | String teacherId) { |
| | | String teacherId,String chargeClassName) { |
| | | |
| | | ClsClass cls = new ClsClass(); |
| | | |
| | |
| | | cls.setStartTime(startTime); |
| | | cls.setEndTime(endTime); |
| | | cls.setTeacherId(teacherId); |
| | | cls.setChargeClassName(chargeClassName); |
| | | cls.setOrgId(ClientUtils.getOrgId()); |
| | | save(cls); |
| | | return new Result(true, "success",CollectionUtils.newStringMap("classId",cls.getClassId())); |
| | |
| | | @Override |
| | | public Result updateClass(String classId, String className, String classNumber, Date startTime, Date endTime, |
| | | String subjectId, boolean needJoinAudit, boolean needQuitAudit, boolean showAnalysisAfterExer, |
| | | boolean canMultiExer, boolean needForum, String teacherId) { |
| | | boolean canMultiExer, boolean needForum, String teacherId, String chargeClassName) { |
| | | |
| | | ClsClass cls = read(ClsClass.class, classId); |
| | | |
| | |
| | | cls.setShowAnalysisAfterExer(showAnalysisAfterExer); |
| | | cls.setCanMultiExer(canMultiExer); |
| | | cls.setNeedForum(needForum); |
| | | cls.setChargeClassName(chargeClassName); |
| | | cls.setTeacherId(teacherId); |
| | | save(cls); |
| | | |
| | |
| | | @Override |
| | | public List<Map<String,Object>> queryAvailableClassIdAndName(String teacherId,String subjectId) { |
| | | StringBuffer hql = new StringBuffer(1000); |
| | | // and c.endTime>=sysdate() 增加条件过滤掉历史班级 |
| | | hql.append("select c.classId as classId ,c.name as className from ClsClass c where c.deleteFlag is false and c.orgId=:orgId and c.createId=:createId " ); |
| | | // and c.endTime>=sysdate() 增加条件过滤掉历史班级 and c.createId=:createId |
| | | hql.append("select c.classId as classId ,c.name as className from ClsClass c where c.deleteFlag is false and c.orgId=:orgId " ); |
| | | Map<String,Object> queryParam = new HashMap<String,Object>(); |
| | | queryParam.put("orgId", ClientUtils.getOrgId()); |
| | | queryParam.put("createId", ClientUtils.getUserId()); |
| | | // queryParam.put("createId", ClientUtils.getUserId()); |
| | | |
| | | if(StringUtils.isNotEmpty(teacherId)||StringUtils.isNotEmpty(subjectId)){ |
| | | hql.append(" and exists (select 1 from ClsClassReSubject r ,Subject s where r.subjectId=s.subjectId and r.classId =c.classId and r.deleteFlag is false "); |