Commit 0dc47068 by xty

Merge remote-tracking branch 'origin/master'

parents 6ae6b6d2 6391d6a6
package yangtz.cs.liu.campus.controller.schoolNewTeacherDzdn;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolGkAchievementService;
/**
* 高考成绩Controller
*
* @author ruoyi
* @date 2023-12-13
*/
@RestController
@RequestMapping("/achievement")
public class SchoolGkAchievementController extends BaseController
{
@Autowired
private ISchoolGkAchievementService schoolGkAchievementService;
/**
* 查询高考成绩列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolGkAchievement schoolGkAchievement)
{
startPage();
List<SchoolGkAchievementVo> list = schoolGkAchievementService.selectSchoolGkAchievementVoList(schoolGkAchievement);
return getDataTable(list);
}
/**
* 获取高考成绩详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolGkAchievementService.selectSchoolGkAchievementById(id));
}
/**
* 新增高考成绩
*/
@Log(title = "高考成绩", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolGkAchievement schoolGkAchievement)
{
return toAjax(schoolGkAchievementService.insertSchoolGkAchievement(schoolGkAchievement));
}
/**
* 修改高考成绩
*/
@Log(title = "高考成绩", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolGkAchievement schoolGkAchievement)
{
return toAjax(schoolGkAchievementService.updateById(schoolGkAchievement));
}
/**
* 删除高考成绩
*/
@Log(title = "高考成绩", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolGkAchievementService.deleteSchoolGkAchievementByIds(ids));
}
/**
* 导出高考成绩列表
*/
@Log(title = "高考成绩", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolGkAchievement schoolGkAchievement)
{
List<SchoolGkAchievement> list = schoolGkAchievementService.selectSchoolGkAchievementList(schoolGkAchievement);
ExcelUtil<SchoolGkAchievement> util = new ExcelUtil<SchoolGkAchievement>(SchoolGkAchievement.class);
util.exportExcel(response, list, "高考成绩数据");
}
}
...@@ -26,6 +26,8 @@ import java.util.ArrayList; ...@@ -26,6 +26,8 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@RestController @RestController
@RequestMapping("/teacher/basiclnformation") @RequestMapping("/teacher/basiclnformation")
...@@ -63,6 +65,14 @@ public class SchoolTeacherBasiclnformationController extends BaseController { ...@@ -63,6 +65,14 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolTeacherBasicInformation information){ public AjaxResult add(@RequestBody SchoolTeacherBasicInformation information){
//1.验证身份证信息是否重复
String idCard = information.getIdCard();
LambdaQueryWrapper<SchoolTeacherBasicInformation> wrapper = Wrappers.lambdaQuery();
LambdaQueryWrapper<SchoolTeacherBasicInformation> eq = wrapper.eq(SchoolTeacherBasicInformation::getIdCard, idCard);
SchoolTeacherBasicInformation one = basichlnformationService.getOne(wrapper);
if (one != null){
return AjaxResult.error(information.getName()+"人员身份证已经存在,身份证重复信息不可录入");
}
//出生年月日获取 //出生年月日获取
String birthDayFromIdCard = IdCardNumberUtils.getBirthDayFromIdCard(information.getIdCard()); String birthDayFromIdCard = IdCardNumberUtils.getBirthDayFromIdCard(information.getIdCard());
information.setBirthDate(birthDayFromIdCard); information.setBirthDate(birthDayFromIdCard);
...@@ -145,6 +155,13 @@ public class SchoolTeacherBasiclnformationController extends BaseController { ...@@ -145,6 +155,13 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
date.setSex("1"); date.setSex("1");
} }
} }
//处理身份证重复问题
// 根据指定属性分组,并统计数量(key:指定属性,value:数量)
Map<Object, Long> mapGroup = schoolTeacherBasicInformations.stream().collect(Collectors.groupingBy(person -> person.getIdCard(), Collectors.counting()));
Stream<Object> stringStream = mapGroup.entrySet().stream().filter(entry -> entry.getValue() > 1).map(entry -> entry.getKey());
if (stringStream != null){
return AjaxResult.error("身份证信息有重复"+mapGroup.toString());
}
boolean b = basichlnformationService.saveBatch(schoolTeacherBasicInformations); boolean b = basichlnformationService.saveBatch(schoolTeacherBasicInformations);
return AjaxResult.success(b); return AjaxResult.success(b);
} }
...@@ -234,4 +251,8 @@ public class SchoolTeacherBasiclnformationController extends BaseController { ...@@ -234,4 +251,8 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
return AjaxResult.success(basichlnformationService.importTeacherPicture(file)); return AjaxResult.success(basichlnformationService.importTeacherPicture(file));
} }
//import java.util.Map.Entry;
} }
package yangtz.cs.liu.campus.controller.schoolNewTeacherDzdn;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAward;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAwardVo;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteamAwardService;
/**
* 团队获奖Controller
*
* @author ruoyi
* @date 2023-12-13
*/
@RestController
@RequestMapping("/school/award")
public class SchoolXteamAwardController extends BaseController
{
@Autowired
private ISchoolXteamAwardService schoolXteamAwardService;
/**
* 查询团队获奖列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolXteamAward schoolXteamAward)
{
startPage();
List<SchoolXteamAwardVo> list = schoolXteamAwardService.selectSchoolXteamAwardVoList(schoolXteamAward);
return getDataTable(list);
}
/**
* 导出团队获奖列表
*/
@Log(title = "团队获奖", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolXteamAward schoolXteamAward)
{
List<SchoolXteamAward> list = schoolXteamAwardService.selectSchoolXteamAwardList(schoolXteamAward);
ExcelUtil<SchoolXteamAward> util = new ExcelUtil<SchoolXteamAward>(SchoolXteamAward.class);
util.exportExcel(response, list, "团队获奖数据");
}
/**
* 获取团队获奖详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolXteamAwardService.selectSchoolXteamAwardById(id));
}
/**
* 新增团队获奖
*/
@Log(title = "团队获奖", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SchoolXteamAward schoolXteamAward)
{
return toAjax(schoolXteamAwardService.insertSchoolXteamAward(schoolXteamAward));
}
/**
* 修改团队获奖
*/
@Log(title = "团队获奖", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SchoolXteamAward schoolXteamAward)
{
return toAjax(schoolXteamAwardService.updateSchoolXteamAward(schoolXteamAward));
}
/**
* 删除团队获奖
*/
@Log(title = "团队获奖", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolXteamAwardService.deleteSchoolXteamAwardByIds(ids));
}
}
...@@ -15,7 +15,6 @@ import com.ruoyi.common.core.domain.BaseEntity; ...@@ -15,7 +15,6 @@ import com.ruoyi.common.core.domain.BaseEntity;
@Data @Data
public class SchoolAworkload extends BaseEntity public class SchoolAworkload extends BaseEntity
{ {
private static final long serialVersionUID = 1L;
/** 主键id */ /** 主键id */
@TableId(value = "id",type = IdType.AUTO) @TableId(value = "id",type = IdType.AUTO)
......
package yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 高考成绩对象 school_gk_achievement
*
* @author ruoyi
* @date 2023-12-13
*/
@Data
public class SchoolGkAchievement extends BaseEntity
{
/** 主键id */
@TableId(value = "id",type = IdType.AUTO)
@Excel(name = "序号")
private Long id;
/** 届别 */
@Excel(name = "届别",dictType = "rankda")
private String year;
/** 学科(下拉框) */
@Excel(name = "学科" ,dictType = "teaching_subjects")
private String sub;
/** 教师姓名 */
@Excel(name = "教师姓名")
private String teacherName;
/** 授课班级 */
@Excel(name = "授课班级",dictType = "class_num")
private String teachingClassName;
/** 班级类型(下拉框) */
@Excel(name = "班级类型",dictType = "class_type")
private String classType;
/** 高考评优(下拉框) */
@Excel(name = "高考评优",dictType = "gk_appraising")
private String gkAppraising;
/** 尖子生培养 */
@Excel(name = "尖子生培养")
private String topStudentsCulture;
/** 增量情况 */
@Excel(name = "增量情况")
private String incrementSituation;
/** 有效数情况 */
@Excel(name = "有效数情况")
private String effectiveNumSituation;
/** 其他 */
@Excel(name = "其他情况")
private String other;
/** 审核状态(0未提交,1审核中,2同意,3驳回) */
private String auditState;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 高考成绩对象 school_gk_achievement
*
* @author ruoyi
* @date 2023-12-13
*/
@Data
public class SchoolGkAchievementVo extends BaseEntity
{
/** 主键id */
@TableId(value = "id",type = IdType.AUTO)
private Long id;
/** 届别 */
private String year;
/** 学科(下拉框) */
private String sub;
/** 教师姓名 */
private String teacherName;
/** 授课班级 */
private String teachingClassName;
/** 班级类型(下拉框) */
private String classType;
/** 高考评优(下拉框) */
private String gkAppraising;
/** 尖子生培养 */
private String topStudentsCulture;
/** 增量情况 */
private String incrementSituation;
/** 有效数情况 */
private String effectiveNumSituation;
/** 其他 */
private String other;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 团队获奖对象 school_xteam_award
*
* @author ruoyi
* @date 2023-12-13
*/
@Data
public class SchoolXteamAward extends BaseEntity
{
/** 主键id */
@TableId(value = "id",type = IdType.AUTO)
private Long id;
/** 学年 */
@Excel(name = "学年",dictType = "yearda")
private String schoolYear;
/** 学期 */
@Excel(name = "学期",dictType = "semester_jsdzda")
private String semester;
/** 届别 */
@Excel(name = "届别",dictType = "rankda")
private String year;
/** 年级 */
@Excel(name = "年级",dictType = "grade_da")
private String grade;
/** 学科 */
@Excel(name = "学科",dictType = "teaching_subjects")
private String sub;
/** 获奖情况 */
@Excel(name = "获奖情况")
private String awardSituation;
/** 团队成员贡献情况 */
@Excel(name = "团队成员贡献情况")
private String teamMembersContribution;
/** 审核状态(0未提交,1审核中,2同意,3驳回) */
@Excel(name = "审核状态", readConverterExp = "0=未提交,1审核中,2同意,3驳回")
private String auditState;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 团队获奖对象 school_xteam_award
*
* @author ruoyi
* @date 2023-12-13
*/
@Data
public class SchoolXteamAwardVo extends BaseEntity
{
/** 主键id */
private Long id;
/** 学年 */
private String schoolYear;
/** 学期 */
private String semester;
/** 届别 */
private String year;
/** 年级 */
private String grade;
/** 学科 */
private String sub;
/** 获奖情况 */
private String awardSituation;
/** 团队成员贡献情况 */
private String teamMembersContribution;
/** 删除状态 */
private String delFlag;
}
package yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import java.util.List;
/**
* 高考成绩Mapper接口
*
* @author ruoyi
* @date 2023-12-13
*/
public interface SchoolGkAchievementMapper extends BaseMapper<SchoolGkAchievement>
{
/**
* 查询高考成绩
*
* @param id 高考成绩主键
* @return 高考成绩
*/
public SchoolGkAchievement selectSchoolGkAchievementById(Long id);
/**
* 查询高考成绩列表
*
* @param schoolGkAchievement 高考成绩
* @return 高考成绩集合
*/
public List<SchoolGkAchievementVo> selectSchoolGkAchievementVoList(SchoolGkAchievement schoolGkAchievement);
public List<SchoolGkAchievement> selectSchoolGkAchievementList(SchoolGkAchievement schoolGkAchievement);
/**
* 新增高考成绩
*
* @param schoolGkAchievement 高考成绩
* @return 结果
*/
public int insertSchoolGkAchievement(SchoolGkAchievement schoolGkAchievement);
/**
* 修改高考成绩
*
* @param schoolGkAchievement 高考成绩
* @return 结果
*/
public int updateSchoolGkAchievement(SchoolGkAchievement schoolGkAchievement);
/**
* 删除高考成绩
*
* @param id 高考成绩主键
* @return 结果
*/
public int deleteSchoolGkAchievementById(Long id);
/**
* 批量删除高考成绩
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolGkAchievementByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAward;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAwardVo;
import java.util.List;
/**
* 团队获奖Mapper接口
*
* @author ruoyi
* @date 2023-12-13
*/
public interface SchoolXteamAwardMapper extends BaseMapper<SchoolXteamAward>
{
/**
* 查询团队获奖
*
* @param id 团队获奖主键
* @return 团队获奖
*/
public SchoolXteamAward selectSchoolXteamAwardById(Long id);
/**
* 查询团队获奖列表
*
* @param schoolXteamAward 团队获奖
* @return 团队获奖集合
*/
public List<SchoolXteamAward> selectSchoolXteamAwardList(SchoolXteamAward schoolXteamAward);
public List<SchoolXteamAwardVo> selectSchoolXteamAwardVoList(SchoolXteamAward schoolXteamAward);
/**
* 新增团队获奖
*
* @param schoolXteamAward 团队获奖
* @return 结果
*/
public int insertSchoolXteamAward(SchoolXteamAward schoolXteamAward);
/**
* 修改团队获奖
*
* @param schoolXteamAward 团队获奖
* @return 结果
*/
public int updateSchoolXteamAward(SchoolXteamAward schoolXteamAward);
/**
* 删除团队获奖
*
* @param id 团队获奖主键
* @return 结果
*/
public int deleteSchoolXteamAwardById(Long id);
/**
* 批量删除团队获奖
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolXteamAwardByIds(Long[] ids);
}
package yangtz.cs.liu.campus.service.impl.schoolNewTeacherDzdn;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn.SchoolGkAchievementMapper;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolGkAchievementService;
/**
* 高考成绩Service业务层处理
*
* @author ruoyi
* @date 2023-12-13
*/
@Service
public class SchoolGkAchievementServiceImpl extends ServiceImpl<SchoolGkAchievementMapper, SchoolGkAchievement> implements ISchoolGkAchievementService
{
@Autowired
private SchoolGkAchievementMapper schoolGkAchievementMapper;
/**
* 查询高考成绩
*
* @param id 高考成绩主键
* @return 高考成绩
*/
@Override
public SchoolGkAchievement selectSchoolGkAchievementById(Long id)
{
return schoolGkAchievementMapper.selectSchoolGkAchievementById(id);
}
/**
* 查询高考成绩列表
*
* @param schoolGkAchievement 高考成绩
* @return 高考成绩
*/
@Override
public List<SchoolGkAchievementVo> selectSchoolGkAchievementVoList(SchoolGkAchievement schoolGkAchievement)
{
return schoolGkAchievementMapper.selectSchoolGkAchievementVoList(schoolGkAchievement);
}
@Override
public List<SchoolGkAchievement> selectSchoolGkAchievementList(SchoolGkAchievement schoolGkAchievement)
{
return schoolGkAchievementMapper.selectSchoolGkAchievementList(schoolGkAchievement);
}
/**
* 新增高考成绩
*
* @param schoolGkAchievement 高考成绩
* @return 结果
*/
@Override
public int insertSchoolGkAchievement(SchoolGkAchievement schoolGkAchievement)
{
schoolGkAchievement.setCreateTime(DateUtils.getNowDate());
return schoolGkAchievementMapper.insertSchoolGkAchievement(schoolGkAchievement);
}
/**
* 修改高考成绩
*
* @param schoolGkAchievement 高考成绩
* @return 结果
*/
@Override
public int updateSchoolGkAchievement(SchoolGkAchievement schoolGkAchievement)
{
schoolGkAchievement.setUpdateTime(DateUtils.getNowDate());
return schoolGkAchievementMapper.updateSchoolGkAchievement(schoolGkAchievement);
}
/**
* 批量删除高考成绩
*
* @param ids 需要删除的高考成绩主键
* @return 结果
*/
@Override
public int deleteSchoolGkAchievementByIds(Long[] ids)
{
return schoolGkAchievementMapper.deleteSchoolGkAchievementByIds(ids);
}
/**
* 删除高考成绩信息
*
* @param id 高考成绩主键
* @return 结果
*/
@Override
public int deleteSchoolGkAchievementById(Long id)
{
return schoolGkAchievementMapper.deleteSchoolGkAchievementById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolNewTeacherDzdn;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAward;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAwardVo;
import yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn.SchoolGkAchievementMapper;
import yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn.SchoolXteamAwardMapper;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolGkAchievementService;
import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.ISchoolXteamAwardService;
/**
* 团队获奖Service业务层处理
*
* @author ruoyi
* @date 2023-12-13
*/
@Service
public class SchoolXteamAwardServiceImpl extends ServiceImpl<SchoolXteamAwardMapper, SchoolXteamAward> implements ISchoolXteamAwardService
{
@Autowired
private SchoolXteamAwardMapper schoolXteamAwardMapper;
/**
* 查询团队获奖
*
* @param id 团队获奖主键
* @return 团队获奖
*/
@Override
public SchoolXteamAward selectSchoolXteamAwardById(Long id)
{
return schoolXteamAwardMapper.selectSchoolXteamAwardById(id);
}
/**
* 查询团队获奖列表
*
* @param schoolXteamAward 团队获奖
* @return 团队获奖
*/
@Override
public List<SchoolXteamAward> selectSchoolXteamAwardList(SchoolXteamAward schoolXteamAward)
{
return schoolXteamAwardMapper.selectSchoolXteamAwardList(schoolXteamAward);
}
@Override
public List<SchoolXteamAwardVo> selectSchoolXteamAwardVoList(SchoolXteamAward schoolXteamAward)
{
return schoolXteamAwardMapper.selectSchoolXteamAwardVoList(schoolXteamAward);
}
/**
* 新增团队获奖
*
* @param schoolXteamAward 团队获奖
* @return 结果
*/
@Override
public int insertSchoolXteamAward(SchoolXteamAward schoolXteamAward)
{
schoolXteamAward.setCreateTime(DateUtils.getNowDate());
return schoolXteamAwardMapper.insertSchoolXteamAward(schoolXteamAward);
}
/**
* 修改团队获奖
*
* @param schoolXteamAward 团队获奖
* @return 结果
*/
@Override
public int updateSchoolXteamAward(SchoolXteamAward schoolXteamAward)
{
schoolXteamAward.setUpdateTime(DateUtils.getNowDate());
return schoolXteamAwardMapper.updateSchoolXteamAward(schoolXteamAward);
}
/**
* 批量删除团队获奖
*
* @param ids 需要删除的团队获奖主键
* @return 结果
*/
@Override
public int deleteSchoolXteamAwardByIds(Long[] ids)
{
return schoolXteamAwardMapper.deleteSchoolXteamAwardByIds(ids);
}
/**
* 删除团队获奖信息
*
* @param id 团队获奖主键
* @return 结果
*/
@Override
public int deleteSchoolXteamAwardById(Long id)
{
return schoolXteamAwardMapper.deleteSchoolXteamAwardById(id);
}
}
package yangtz.cs.liu.campus.service.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolAworkload;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievementVo;
import java.util.List;
/**
* 高考成绩Service接口
*
* @author ruoyi
* @date 2023-12-13
*/
public interface ISchoolGkAchievementService extends IService<SchoolGkAchievement>
{
/**
* 查询高考成绩
*
* @param id 高考成绩主键
* @return 高考成绩
*/
public SchoolGkAchievement selectSchoolGkAchievementById(Long id);
/**
* 查询高考成绩列表
*
* @param schoolGkAchievement 高考成绩
* @return 高考成绩集合
*/
public List<SchoolGkAchievementVo> selectSchoolGkAchievementVoList(SchoolGkAchievement schoolGkAchievement);
public List<SchoolGkAchievement> selectSchoolGkAchievementList(SchoolGkAchievement schoolGkAchievement);
/**
* 新增高考成绩
*
* @param schoolGkAchievement 高考成绩
* @return 结果
*/
public int insertSchoolGkAchievement(SchoolGkAchievement schoolGkAchievement);
/**
* 修改高考成绩
*
* @param schoolGkAchievement 高考成绩
* @return 结果
*/
public int updateSchoolGkAchievement(SchoolGkAchievement schoolGkAchievement);
/**
* 批量删除高考成绩
*
* @param ids 需要删除的高考成绩主键集合
* @return 结果
*/
public int deleteSchoolGkAchievementByIds(Long[] ids);
/**
* 删除高考成绩信息
*
* @param id 高考成绩主键
* @return 结果
*/
public int deleteSchoolGkAchievementById(Long id);
}
package yangtz.cs.liu.campus.service.schoolNewTeacherDzdn;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolGkAchievement;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAward;
import yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolXteamAwardVo;
import java.util.List;
/**
* 团队获奖Service接口
*
* @author ruoyi
* @date 2023-12-13
*/
public interface ISchoolXteamAwardService extends IService<SchoolXteamAward>
{
/**
* 查询团队获奖
*
* @param id 团队获奖主键
* @return 团队获奖
*/
public SchoolXteamAward selectSchoolXteamAwardById(Long id);
/**
* 查询团队获奖列表
*
* @param schoolXteamAward 团队获奖
* @return 团队获奖集合
*/
public List<SchoolXteamAward> selectSchoolXteamAwardList(SchoolXteamAward schoolXteamAward);
public List<SchoolXteamAwardVo> selectSchoolXteamAwardVoList(SchoolXteamAward schoolXteamAward);
/**
* 新增团队获奖
*
* @param schoolXteamAward 团队获奖
* @return 结果
*/
public int insertSchoolXteamAward(SchoolXteamAward schoolXteamAward);
/**
* 修改团队获奖
*
* @param schoolXteamAward 团队获奖
* @return 结果
*/
public int updateSchoolXteamAward(SchoolXteamAward schoolXteamAward);
/**
* 批量删除团队获奖
*
* @param ids 需要删除的团队获奖主键集合
* @return 结果
*/
public int deleteSchoolXteamAwardByIds(Long[] ids);
/**
* 删除团队获奖信息
*
* @param id 团队获奖主键
* @return 结果
*/
public int deleteSchoolXteamAwardById(Long id);
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn.SchoolGkAchievementMapper">
<resultMap type="SchoolGkAchievement" id="SchoolGkAchievementResult">
<result property="id" column="id" />
<result property="sub" column="sub" />
<result property="teacherName" column="teacher_name" />
<result property="year" column="year" />
<result property="teachingClassName" column="teaching_class_name" />
<result property="classType" column="class_type" />
<result property="gkAppraising" column="gk_appraising" />
<result property="topStudentsCulture" column="top_students_culture" />
<result property="incrementSituation" column="increment_situation" />
<result property="effectiveNumSituation" column="effective_num_situation" />
<result property="other" column="other" />
<result property="auditState" column="audit_state" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolGkAchievementVo">
select id, sub, teacher_name, year, teaching_class_name, class_type, gk_appraising, top_students_culture, increment_situation, effective_num_situation, other, audit_state, create_by, create_time, update_by, update_time, del_flag from school_gk_achievement
</sql>
<select id="selectSchoolGkAchievementVoList" parameterType="SchoolGkAchievement" resultType="SchoolGkAchievementVo">
<include refid="selectSchoolGkAchievementVo"/>
where del_flag = 0
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacher_name}, '%') </if>
<if test="teachingClassName != null and teachingClassName != ''"> and teaching_class_name = #{teachingClassName}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="gkAppraising != null and gkAppraising != ''"> and gk_appraising = #{gkAppraising}</if>
</select>
<select id="selectSchoolGkAchievementList" parameterType="SchoolGkAchievement" resultMap="SchoolGkAchievementResult">
<include refid="selectSchoolGkAchievementVo"/>
where del_flag = 0
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacher_name}, '%') </if>
<if test="teachingClassName != null and teachingClassName != ''"> and teaching_class_name = #{teachingClassName}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="gkAppraising != null and gkAppraising != ''"> and gk_appraising = #{gkAppraising}</if>
</select>
<select id="selectSchoolGkAchievementById" parameterType="Long" resultMap="SchoolGkAchievementResult">
<include refid="selectSchoolGkAchievementVo"/>
where id = #{id}
</select>
<insert id="insertSchoolGkAchievement" parameterType="SchoolGkAchievement" useGeneratedKeys="true" keyProperty="id">
insert into school_gk_achievement
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sub != null">sub,</if>
<if test="teacherName != null">teacher_name,</if>
<if test="year != null">year,</if>
<if test="teachingClassName != null">teaching_class_name,</if>
<if test="classType != null">class_type,</if>
<if test="gkAppraising != null">gk_appraising,</if>
<if test="topStudentsCulture != null">top_students_culture,</if>
<if test="incrementSituation != null">increment_situation,</if>
<if test="effectiveNumSituation != null">effective_num_situation,</if>
<if test="other != null">other,</if>
<if test="auditState != null">audit_state,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sub != null">#{sub},</if>
<if test="teacherName != null">#{teacherName},</if>
<if test="year != null">#{year},</if>
<if test="teachingClassName != null">#{teachingClassName},</if>
<if test="classType != null">#{classType},</if>
<if test="gkAppraising != null">#{gkAppraising},</if>
<if test="topStudentsCulture != null">#{topStudentsCulture},</if>
<if test="incrementSituation != null">#{incrementSituation},</if>
<if test="effectiveNumSituation != null">#{effectiveNumSituation},</if>
<if test="other != null">#{other},</if>
<if test="auditState != null">#{auditState},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolGkAchievement" parameterType="SchoolGkAchievement">
update school_gk_achievement
<trim prefix="SET" suffixOverrides=",">
<if test="sub != null">sub = #{sub},</if>
<if test="teacherName != null">teacher_name = #{teacherName},</if>
<if test="year != null">year = #{year},</if>
<if test="teachingClassName != null">teaching_class_name = #{teachingClassName},</if>
<if test="classType != null">class_type = #{classType},</if>
<if test="gkAppraising != null">gk_appraising = #{gkAppraising},</if>
<if test="topStudentsCulture != null">top_students_culture = #{topStudentsCulture},</if>
<if test="incrementSituation != null">increment_situation = #{incrementSituation},</if>
<if test="effectiveNumSituation != null">effective_num_situation = #{effectiveNumSituation},</if>
<if test="other != null">other = #{other},</if>
<if test="auditState != null">audit_state = #{auditState},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolGkAchievementById" parameterType="Long">
delete from school_gk_achievement where id = #{id}
</delete>
<delete id="deleteSchoolGkAchievementByIds" parameterType="String">
delete from school_gk_achievement where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolNewTeacherDzdn.SchoolXteamAwardMapper">
<resultMap type="SchoolXteamAward" id="SchoolXteamAwardResult">
<result property="id" column="id" />
<result property="schoolYear" column="school_year" />
<result property="semester" column="semester" />
<result property="year" column="year" />
<result property="grade" column="grade" />
<result property="sub" column="sub" />
<result property="awardSituation" column="award_situation" />
<result property="teamMembersContribution" column="team_members_contribution" />
<result property="remark" column="remark" />
<result property="auditState" column="audit_state" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolXteamAwardVo">
select id, school_year, semester, year, grade, sub, award_situation, team_members_contribution, remark, audit_state, create_by, create_time, update_by, update_time, del_flag from school_xteam_award
</sql>
<select id="selectSchoolXteamAwardList" parameterType="SchoolXteamAward" resultMap="SchoolXteamAwardResult">
<include refid="selectSchoolXteamAwardVo"/>
<where>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="awardSituation != null and awardSituation != ''"> and award_situation = #{awardSituation}</if>
<if test="teamMembersContribution != null and teamMembersContribution != ''"> and team_members_contribution = #{teamMembersContribution}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if>
</where>
</select>
<select id="selectSchoolXteamAwardVoList" parameterType="SchoolXteamAward" resultType="SchoolXteamAwardVo">
<include refid="selectSchoolXteamAwardVo"/>
<where>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="awardSituation != null and awardSituation != ''"> and award_situation = #{awardSituation}</if>
<if test="teamMembersContribution != null and teamMembersContribution != ''"> and team_members_contribution = #{teamMembersContribution}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if>
</where>
</select>
<select id="selectSchoolXteamAwardById" parameterType="Long" resultMap="SchoolXteamAwardResult">
<include refid="selectSchoolXteamAwardVo"/>
where id = #{id}
</select>
<insert id="insertSchoolXteamAward" parameterType="SchoolXteamAward" useGeneratedKeys="true" keyProperty="id">
insert into school_xteam_award
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if>
<if test="year != null">year,</if>
<if test="grade != null">grade,</if>
<if test="sub != null">sub,</if>
<if test="awardSituation != null">award_situation,</if>
<if test="teamMembersContribution != null">team_members_contribution,</if>
<if test="remark != null">remark,</if>
<if test="auditState != null and auditState != ''">audit_state,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if>
<if test="year != null">#{year},</if>
<if test="grade != null">#{grade},</if>
<if test="sub != null">#{sub},</if>
<if test="awardSituation != null">#{awardSituation},</if>
<if test="teamMembersContribution != null">#{teamMembersContribution},</if>
<if test="remark != null">#{remark},</if>
<if test="auditState != null and auditState != ''">#{auditState},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolXteamAward" parameterType="SchoolXteamAward">
update school_xteam_award
<trim prefix="SET" suffixOverrides=",">
<if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if>
<if test="year != null">year = #{year},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="sub != null">sub = #{sub},</if>
<if test="awardSituation != null">award_situation = #{awardSituation},</if>
<if test="teamMembersContribution != null">team_members_contribution = #{teamMembersContribution},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="auditState != null and auditState != ''">audit_state = #{auditState},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSchoolXteamAwardById" parameterType="Long">
delete from school_xteam_award where id = #{id}
</delete>
<delete id="deleteSchoolXteamAwardByIds" parameterType="String">
delete from school_xteam_award where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment