Commit 018ff7d1 by xuwenhao

11.8学校获奖、学生违纪修改

parent 0710817a
package yangtz.cs.liu.campus.controller.schoolRewardsPunishments; package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -40,27 +41,41 @@ public class SchoolScAwardsController extends BaseController ...@@ -40,27 +41,41 @@ public class SchoolScAwardsController extends BaseController
private ISchoolScAwardsService schoolScAwardsService; private ISchoolScAwardsService schoolScAwardsService;
/** /**
* 查询学校获奖列表 * 查询学校获奖列表(管理员)
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SchoolScAwardsVo schoolScAwardsVo) public TableDataInfo list(SchoolScAwardsVo schoolScAwardsVo)
{ {
schoolScAwardsVo.setAuditState("0");
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
}
/**
* 查询学校获奖列表(查看已通过)
*/
@GetMapping("/listTg")
public TableDataInfo listTg(SchoolScAwardsVo schoolScAwardsVo)
{
schoolScAwardsVo.setAuditState("2");
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsListTg(schoolScAwardsVo);
return getDataTable(list);
}
/**
* 查询学校获奖列表(个人)
*/
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolScAwardsVo schoolScAwardsVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
//用户角色集合
List<SysRole> roles = user.getRoles();
//管理员查询全部 //管理员查询全部
if (user.isAdmin()) { if (user.isAdmin()) {
startPage(); startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo); List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list); return getDataTable(list);
} else if (roles.size() > 0){
for (SysRole role : roles) {
if (role.getRoleKey().equals("award_admin")){
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
}
}
} }
//用户查看个人列表 //用户查看个人列表
schoolScAwardsVo.setApplyId(user.getUserId()); schoolScAwardsVo.setApplyId(user.getUserId());
...@@ -91,12 +106,23 @@ public class SchoolScAwardsController extends BaseController ...@@ -91,12 +106,23 @@ public class SchoolScAwardsController extends BaseController
} }
/** /**
* 新增学校获奖 * 新增学校获奖(管理员)
*/ */
@Log(title = "学校获奖", businessType = BusinessType.INSERT) @Log(title = "学校获奖", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolScAwardsVo schoolScAwardsVo) public AjaxResult add(@RequestBody SchoolScAwardsVo schoolScAwardsVo)
{ {
schoolScAwardsVo.setAuditState("1");
return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo));
}
/**
* 新增学校获奖(个人)
*/
@Log(title = "学校获奖", businessType = BusinessType.INSERT)
@PostMapping("/addGr")
public AjaxResult addGr(@RequestBody SchoolScAwardsVo schoolScAwardsVo)
{
return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo)); return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo));
} }
......
...@@ -2,6 +2,9 @@ package yangtz.cs.liu.campus.controller.schoolRewardsPunishments; ...@@ -2,6 +2,9 @@ package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -18,6 +21,7 @@ import com.ruoyi.common.core.domain.AjaxResult; ...@@ -18,6 +21,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScAwards;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline; import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService; import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
...@@ -35,11 +39,43 @@ public class SchoolScDisciplineController extends BaseController ...@@ -35,11 +39,43 @@ public class SchoolScDisciplineController extends BaseController
private ISchoolScDisciplineService schoolScDisciplineService; private ISchoolScDisciplineService schoolScDisciplineService;
/** /**
* 查询学生违纪列表 * 查询学生违纪列表(管理员)
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SchoolScDiscipline schoolScDiscipline) public TableDataInfo list(SchoolScDiscipline schoolScDiscipline)
{ {
schoolScDiscipline.setAuditState("0");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
}
/**
* 查询学生违纪列表(查看已通过)
*/
@GetMapping("/listTg")
public TableDataInfo listTg(SchoolScDiscipline schoolScDiscipline)
{
schoolScDiscipline.setAuditState("2");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineListTg(schoolScDiscipline);
return getDataTable(list);
}
/**
* 查询学生违纪列表(个人)
*/
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolScDiscipline schoolScDiscipline)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//管理员返回全部
if (user.isAdmin()) {
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
}
schoolScDiscipline.setApplyId(SecurityUtils.getUserId());
startPage(); startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline); List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list); return getDataTable(list);
...@@ -67,12 +103,23 @@ public class SchoolScDisciplineController extends BaseController ...@@ -67,12 +103,23 @@ public class SchoolScDisciplineController extends BaseController
} }
/** /**
* 新增学生违纪 * 新增学生违纪(管理员)
*/ */
@Log(title = "学生违纪", businessType = BusinessType.INSERT) @Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolScDiscipline schoolScDiscipline) public AjaxResult add(@RequestBody SchoolScDiscipline schoolScDiscipline)
{ {
schoolScDiscipline.setAuditState("1");
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
}
/**
* 新增学生违纪(个人)
*/
@Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping("/addGr")
public AjaxResult addGr(@RequestBody SchoolScDiscipline schoolScDiscipline)
{
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline)); return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
} }
...@@ -80,7 +127,7 @@ public class SchoolScDisciplineController extends BaseController ...@@ -80,7 +127,7 @@ public class SchoolScDisciplineController extends BaseController
* 修改学生违纪 * 修改学生违纪
*/ */
@Log(title = "学生违纪", businessType = BusinessType.UPDATE) @Log(title = "学生违纪", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolScDiscipline schoolScDiscipline) public AjaxResult edit(@RequestBody SchoolScDiscipline schoolScDiscipline)
{ {
return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDiscipline)); return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDiscipline));
...@@ -97,6 +144,15 @@ public class SchoolScDisciplineController extends BaseController ...@@ -97,6 +144,15 @@ public class SchoolScDisciplineController extends BaseController
} }
/** /**
* 提交/审核
*/
@PutMapping("/submit")
public AjaxResult submit(@RequestBody SchoolScDiscipline schoolScDiscipline)
{
return toAjax(schoolScDisciplineService.updateById(schoolScDiscipline));
}
/**
* 获取最新三个年级 * 获取最新三个年级
*/ */
@GetMapping("/getGrade") @GetMapping("/getGrade")
...@@ -107,8 +163,8 @@ public class SchoolScDisciplineController extends BaseController ...@@ -107,8 +163,8 @@ public class SchoolScDisciplineController extends BaseController
/** /**
* 根据年级获取班级 * 根据年级获取班级
*/ */
@GetMapping("/getClassList/{gradeId}") @GetMapping("/getClassList")
public AjaxResult getClassList(@PathVariable("gradeId") Long gradeId){ public AjaxResult getClassList(Long gradeId){
return AjaxResult.success(schoolScDisciplineService.getClassList(gradeId)); return AjaxResult.success(schoolScDisciplineService.getClassList(gradeId));
} }
} }
...@@ -60,10 +60,16 @@ public class SchoolScDiscipline extends OurBaseEntity ...@@ -60,10 +60,16 @@ public class SchoolScDiscipline extends OurBaseEntity
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String idCard; private String idCard;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */ /** 班主任 */
@Excel(name = "班主任") @Excel(name = "班主任")
private String classTeacher; private String classTeacher;
/** 级部主任id */
private Long gradeDirectorId;
/** 级部主任 */ /** 级部主任 */
@Excel(name = "级部主任") @Excel(name = "级部主任")
private String gradeDirector; private String gradeDirector;
......
...@@ -32,6 +32,14 @@ public interface SchoolScAwardsMapper extends BaseMapper<SchoolScAwards> ...@@ -32,6 +32,14 @@ public interface SchoolScAwardsMapper extends BaseMapper<SchoolScAwards>
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo); public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo);
/** /**
* 查询学校获奖列表(查看已通过)
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖集合
*/
public List<SchoolScAwardsVo> selectSchoolScAwardsListTg(SchoolScAwardsVo schoolScAwardsVo);
/**
* 新增学校获奖 * 新增学校获奖
* *
* @param schoolScAwardsVo 学校获奖 * @param schoolScAwardsVo 学校获奖
......
...@@ -31,6 +31,14 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline> ...@@ -31,6 +31,14 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline); public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline);
/** /**
* 查询学生违纪列表(查看已通过)
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪集合
*/
List<SchoolScDiscipline> selectSchoolScDisciplineListTg(SchoolScDiscipline schoolScDiscipline);
/**
* 新增学生违纪 * 新增学生违纪
* *
* @param schoolScDiscipline 学生违纪 * @param schoolScDiscipline 学生违纪
...@@ -74,4 +82,6 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline> ...@@ -74,4 +82,6 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
* @return * @return
*/ */
List<Map<String, Object>> getClassList(Long gradeId); List<Map<String, Object>> getClassList(Long gradeId);
} }
...@@ -52,19 +52,46 @@ public class SchoolScAwardsServiceImpl extends ServiceImpl<SchoolScAwardsMapper, ...@@ -52,19 +52,46 @@ public class SchoolScAwardsServiceImpl extends ServiceImpl<SchoolScAwardsMapper,
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo) public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo)
{ {
List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsList(schoolScAwardsVo); List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsList(schoolScAwardsVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
//获取学校获奖所有附件 //获取学校获奖所有附件
List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList(); List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList();
schoolScAwardsVos.forEach(schoolScAwardsVo1 -> { for (SchoolScAwardsVo scAwardsVo : schoolScAwardsVos) {
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : schoolAccessories) { for (SchoolAccessory schoolAccessory : schoolAccessories) {
if (schoolAccessory.getBusinessId().equals(schoolScAwardsVo1.getId())){ if (schoolAccessory.getBusinessId().equals(scAwardsVo.getId())){
schoolAccessoryList.add(schoolAccessory); schoolAccessoryList.add(schoolAccessory);
} }
} }
if (schoolAccessoryList.size() > 0){ if (schoolAccessoryList.size() > 0){
schoolScAwardsVo1.setSchoolAccessoryList(schoolAccessoryList); scAwardsVo.setSchoolAccessoryList(schoolAccessoryList);
} }
}); }
return schoolScAwardsVos;
}
/**
* 查询学校获奖列表(查看已通过)
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖
*/
@Override
public List<SchoolScAwardsVo> selectSchoolScAwardsListTg(SchoolScAwardsVo schoolScAwardsVo)
{
List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsListTg(schoolScAwardsVo);
//获取学校获奖所有附件
List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList();
for (SchoolScAwardsVo scAwardsVo : schoolScAwardsVos) {
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : schoolAccessories) {
if (schoolAccessory.getBusinessId().equals(scAwardsVo.getId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
scAwardsVo.setSchoolAccessoryList(schoolAccessoryList);
}
}
return schoolScAwardsVos; return schoolScAwardsVos;
} }
......
package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments; package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline; import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
...@@ -48,6 +50,18 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin ...@@ -48,6 +50,18 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
} }
/** /**
* 查询学生违纪列表(查看已通过)
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪
*/
@Override
public List<SchoolScDiscipline> selectSchoolScDisciplineListTg(SchoolScDiscipline schoolScDiscipline)
{
return schoolScDisciplineMapper.selectSchoolScDisciplineListTg(schoolScDiscipline);
}
/**
* 新增学生违纪 * 新增学生违纪
* *
* @param schoolScDiscipline 学生违纪 * @param schoolScDiscipline 学生违纪
...@@ -56,6 +70,11 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin ...@@ -56,6 +70,11 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
@Override @Override
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline) public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
{ {
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolScDiscipline.setApplyId(user.getUserId());
schoolScDiscipline.setApplyName(user.getUserName());
schoolScDiscipline.setApplyTime(DateUtils.getNowDate());
schoolScDiscipline.setCreateBy(user.getUserName());
schoolScDiscipline.setCreateTime(DateUtils.getNowDate()); schoolScDiscipline.setCreateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDiscipline); return schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDiscipline);
} }
...@@ -69,6 +88,7 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin ...@@ -69,6 +88,7 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
@Override @Override
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline) public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
{ {
schoolScDiscipline.setUpdateBy(SecurityUtils.getUsername());
schoolScDiscipline.setUpdateTime(DateUtils.getNowDate()); schoolScDiscipline.setUpdateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDiscipline); return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDiscipline);
} }
......
...@@ -31,6 +31,14 @@ public interface ISchoolScAwardsService extends IService<SchoolScAwards> ...@@ -31,6 +31,14 @@ public interface ISchoolScAwardsService extends IService<SchoolScAwards>
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo); public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo);
/** /**
* 查询学校获奖列表(查看已通过)
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖集合
*/
public List<SchoolScAwardsVo> selectSchoolScAwardsListTg(SchoolScAwardsVo schoolScAwardsVo);
/**
* 新增学校获奖 * 新增学校获奖
* *
* @param schoolScAwardsVo 学校获奖 * @param schoolScAwardsVo 学校获奖
......
...@@ -31,6 +31,14 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline> ...@@ -31,6 +31,14 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline>
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline); public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline);
/** /**
* 查询学生违纪列表(查看已通过)
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪集合
*/
public List<SchoolScDiscipline> selectSchoolScDisciplineListTg(SchoolScDiscipline schoolScDiscipline);
/**
* 新增学生违纪 * 新增学生违纪
* *
* @param schoolScDiscipline 学生违纪 * @param schoolScDiscipline 学生违纪
......
...@@ -102,10 +102,8 @@ public class SchoolScAwardsVo ...@@ -102,10 +102,8 @@ public class SchoolScAwardsVo
private List<SchoolAccessory> schoolAccessoryList; private List<SchoolAccessory> schoolAccessoryList;
/** 开始时间 */ /** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd") private String startTime;
private Date startTime;
/** 结束时间 */ /** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd") private String endTime;
private Date endTime;
} }
...@@ -63,7 +63,26 @@ ...@@ -63,7 +63,26 @@
<if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if> <if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if>
<if test="awardsTime != null "> and awards_time = #{awardsTime}</if> <if test="awardsTime != null "> and awards_time = #{awardsTime}</if>
<if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if> <if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if> <if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where>
</select>
<select id="selectSchoolScAwardsListTg" parameterType="SchoolScAwardsVo" resultMap="SchoolScAwardsVoResult">
<include refid="selectSchoolScAwardsVo"/>
<where>
del_flag = '0' and audit_state = #{auditState}
<if test="competitionName != null and competitionName != ''"> and competition_name like concat('%', #{competitionName}, '%')</if>
<if test="organizer != null and organizer != ''"> and organizer = #{organizer}</if>
<if test="awardsName != null and awardsName != ''"> and awards_name like concat('%', #{awardsName}, '%')</if>
<if test="competentDeptId != null "> and competent_dept_id = #{competentDeptId}</if>
<if test="competentDept != null and competentDept != ''"> and competent_dept = #{competentDept}</if>
<if test="awardsLevel != null and awardsLevel != ''"> and awards_level = #{awardsLevel}</if>
<if test="deptDirectorId != null "> and dept_director_id = #{deptDirectorId}</if>
<if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if>
<if test="awardsTime != null "> and awards_time = #{awardsTime}</if>
<if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if> <if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if> <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where> </where>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.schoolRewardsPunishments.SchoolScDisciplineMapper"> <mapper namespace="yangtz.cs.liu.campus.mapper.schoolRewardsPunishments.SchoolScDisciplineMapper">
<resultMap type="SchoolScDiscipline" id="SchoolScDisciplineResult"> <resultMap type="SchoolScDiscipline" id="SchoolScDisciplineResult">
<result property="id" column="id" /> <result property="id" column="id" />
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
<result property="name" column="name" /> <result property="name" column="name" />
<result property="sex" column="sex" /> <result property="sex" column="sex" />
<result property="idCard" column="id_card" /> <result property="idCard" column="id_card" />
<result property="classTeacherId" column="class_teacher_id" />
<result property="classTeacher" column="class_teacher" /> <result property="classTeacher" column="class_teacher" />
<result property="gradeDirectorId" column="grade_director_id" />
<result property="gradeDirector" column="grade_director" /> <result property="gradeDirector" column="grade_director" />
<result property="violateType" column="violate_type" /> <result property="violateType" column="violate_type" />
<result property="violateNum" column="violate_num" /> <result property="violateNum" column="violate_num" />
...@@ -37,7 +39,7 @@ ...@@ -37,7 +39,7 @@
<sql id="selectSchoolScDisciplineVo"> <sql id="selectSchoolScDisciplineVo">
select id, school_year, semester, grade_year, grade_id, grade_name, class_id, class_name, select id, school_year, semester, grade_year, grade_id, grade_name, class_id, class_name,
class_type, name, sex, id_card, class_teacher, grade_director, violate_type, violate_num, class_type, name, sex, id_card, class_teacher_id, class_teacher, grade_director_id, grade_director, violate_type, violate_num,
punish_result, punish_time, remark, audit_state, apply_id, apply_name, apply_time, create_by, punish_result, punish_time, remark, audit_state, apply_id, apply_name, apply_time, create_by,
create_time, update_by, update_time, del_flag create_time, update_by, update_time, del_flag
from school_sc_discipline from school_sc_discipline
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
<select id="selectSchoolScDisciplineList" parameterType="SchoolScDiscipline" resultMap="SchoolScDisciplineResult"> <select id="selectSchoolScDisciplineList" parameterType="SchoolScDiscipline" resultMap="SchoolScDisciplineResult">
<include refid="selectSchoolScDisciplineVo"/> <include refid="selectSchoolScDisciplineVo"/>
<where> <where>
del_flag = '0'
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if> <if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="gradeYear != null and gradeYear != ''"> and grade_year = #{gradeYear}</if> <if test="gradeYear != null and gradeYear != ''"> and grade_year = #{gradeYear}</if>
...@@ -57,15 +60,46 @@ ...@@ -57,15 +60,46 @@
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if> <if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="idCard != null and idCard != ''"> and id_card like concat('%', #{idCard}, '%')</if> <if test="idCard != null and idCard != ''"> and id_card like concat('%', #{idCard}, '%')</if>
<if test="classTeacherId != null"> and class_teacher_id = #{classTeacherId}</if>
<if test="classTeacher != null and classTeacher != ''"> and class_teacher like concat('%', #{classTeacher}, '%')</if> <if test="classTeacher != null and classTeacher != ''"> and class_teacher like concat('%', #{classTeacher}, '%')</if>
<if test="gradeDirectorId != null"> and grade_director_id = #{gradeDirectorId}</if>
<if test="gradeDirector != null and gradeDirector != ''"> and grade_director like concat('%', #{gradeDirector}, '%')</if>
<if test="violateType != null and violateType != ''"> and violate_type = #{violateType}</if>
<if test="violateNum != null and violateNum != ''"> and violate_num = #{violateNum}</if>
<if test="punishResult != null and punishResult != ''"> and punish_result = #{punishResult}</if>
<if test="punishTime != null "> and punish_time = #{punishTime}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
</where>
order by create_time DESC
</select>
<select id="selectSchoolScDisciplineListTg" parameterType="SchoolScDiscipline" resultMap="SchoolScDisciplineResult">
<include refid="selectSchoolScDisciplineVo"/>
<where>
del_flag = '0' and audit_state = #{auditState}
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="gradeYear != null and gradeYear != ''"> and grade_year = #{gradeYear}</if>
<if test="gradeId != null "> and grade_id = #{gradeId}</if>
<if test="gradeName != null and gradeName != ''"> and grade_name like concat('%', #{gradeName}, '%')</if>
<if test="classId != null "> and class_id = #{classId}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="idCard != null and idCard != ''"> and id_card like concat('%', #{idCard}, '%')</if>
<if test="classTeacherId != null"> and class_teacher_id = #{classTeacherId}</if>
<if test="classTeacher != null and classTeacher != ''"> and class_teacher like concat('%', #{classTeacher}, '%')</if>
<if test="gradeDirectorId != null"> and grade_director_id = #{gradeDirectorId}</if>
<if test="gradeDirector != null and gradeDirector != ''"> and grade_director = #{gradeDirector}</if> <if test="gradeDirector != null and gradeDirector != ''"> and grade_director = #{gradeDirector}</if>
<if test="violateType != null and violateType != ''"> and violate_type = #{violateType}</if> <if test="violateType != null and violateType != ''"> and violate_type = #{violateType}</if>
<if test="violateNum != null and violateNum != ''"> and violate_num = #{violateNum}</if> <if test="violateNum != null and violateNum != ''"> and violate_num = #{violateNum}</if>
<if test="punishResult != null and punishResult != ''"> and punish_result = #{punishResult}</if> <if test="punishResult != null and punishResult != ''"> and punish_result = #{punishResult}</if>
<if test="punishTime != null "> and punish_time = #{punishTime}</if> <if test="punishTime != null "> and punish_time = #{punishTime}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if> <if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="applyId != null "> and a.apply_id = #{applyId}</if>
</where> </where>
order by create_time DESC
</select> </select>
<select id="selectSchoolScDisciplineById" parameterType="Long" resultMap="SchoolScDisciplineResult"> <select id="selectSchoolScDisciplineById" parameterType="Long" resultMap="SchoolScDisciplineResult">
...@@ -79,16 +113,14 @@ ...@@ -79,16 +113,14 @@
<if test="schoolYear != null">school_year,</if> <if test="schoolYear != null">school_year,</if>
<if test="semester != null">semester,</if> <if test="semester != null">semester,</if>
<if test="gradeYear != null">grade_year,</if> <if test="gradeYear != null">grade_year,</if>
<if test="gradeId != null">grade_id,</if> <if test="gradeId != null">grade_id,grade_name,</if>
<if test="gradeName != null">grade_name,</if> <if test="classId != null">class_id,class_name,</if>
<if test="classId != null">class_id,</if>
<if test="className != null">class_name,</if>
<if test="classType != null">class_type,</if> <if test="classType != null">class_type,</if>
<if test="name != null">name,</if> <if test="name != null">name,</if>
<if test="sex != null">sex,</if> <if test="sex != null">sex,</if>
<if test="idCard != null">id_card,</if> <if test="idCard != null">id_card,</if>
<if test="classTeacher != null">class_teacher,</if> <if test="classTeacherId != null">class_teacher_id,class_teacher,</if>
<if test="gradeDirector != null">grade_director,</if> <if test="gradeDirectorId != null">grade_director_id,grade_director,</if>
<if test="violateType != null">violate_type,</if> <if test="violateType != null">violate_type,</if>
<if test="violateNum != null">violate_num,</if> <if test="violateNum != null">violate_num,</if>
<if test="punishResult != null">punish_result,</if> <if test="punishResult != null">punish_result,</if>
...@@ -108,16 +140,14 @@ ...@@ -108,16 +140,14 @@
<if test="schoolYear != null">#{schoolYear},</if> <if test="schoolYear != null">#{schoolYear},</if>
<if test="semester != null">#{semester},</if> <if test="semester != null">#{semester},</if>
<if test="gradeYear != null">#{gradeYear},</if> <if test="gradeYear != null">#{gradeYear},</if>
<if test="gradeId != null">#{gradeId},</if> <if test="gradeId != null">#{gradeId},(select grade_name from school_grade where id = #{gradeId}),</if>
<if test="gradeName != null">#{gradeName},</if> <if test="classId != null">#{classId},(select class_value from school_class where id = #{classId}),</if>
<if test="classId != null">#{classId},</if>
<if test="className != null">#{className},</if>
<if test="classType != null">#{classType},</if> <if test="classType != null">#{classType},</if>
<if test="name != null">#{name},</if> <if test="name != null">#{name},</if>
<if test="sex != null">#{sex},</if> <if test="sex != null">#{sex},</if>
<if test="idCard != null">#{idCard},</if> <if test="idCard != null">#{idCard},</if>
<if test="classTeacher != null">#{classTeacher},</if> <if test="classTeacherId != null">#{classTeacherId},(select user_name from sys_user where user_id = #{classTeacherId}),</if>
<if test="gradeDirector != null">#{gradeDirector},</if> <if test="gradeDirectorId != null">#{gradeDirectorId},(select user_name from sys_user where user_id = #{gradeDirectorId}),</if>
<if test="violateType != null">#{violateType},</if> <if test="violateType != null">#{violateType},</if>
<if test="violateNum != null">#{violateNum},</if> <if test="violateNum != null">#{violateNum},</if>
<if test="punishResult != null">#{punishResult},</if> <if test="punishResult != null">#{punishResult},</if>
...@@ -141,16 +171,14 @@ ...@@ -141,16 +171,14 @@
<if test="schoolYear != null">school_year = #{schoolYear},</if> <if test="schoolYear != null">school_year = #{schoolYear},</if>
<if test="semester != null">semester = #{semester},</if> <if test="semester != null">semester = #{semester},</if>
<if test="gradeYear != null">grade_year = #{gradeYear},</if> <if test="gradeYear != null">grade_year = #{gradeYear},</if>
<if test="gradeId != null">grade_id = #{gradeId},</if> <if test="gradeId != null">grade_id = #{gradeId},grade_name = (select grade_name from school_grade where id = #{gradeId}),</if>
<if test="gradeName != null">grade_name = #{gradeName},</if> <if test="classId != null">class_id = #{classId},class_name = (select class_value from school_class where id = #{classId}),</if>
<if test="classId != null">class_id = #{classId},</if>
<if test="className != null">class_name = #{className},</if>
<if test="classType != null">class_type = #{classType},</if> <if test="classType != null">class_type = #{classType},</if>
<if test="name != null">name = #{name},</if> <if test="name != null">name = #{name},</if>
<if test="sex != null">sex = #{sex},</if> <if test="sex != null">sex = #{sex},</if>
<if test="idCard != null">id_card = #{idCard},</if> <if test="idCard != null">id_card = #{idCard},</if>
<if test="classTeacher != null">class_teacher = #{classTeacher},</if> <if test="classTeacherId != null">class_teacher_id = #{classTeacherId},class_teacher = (select user_name from sys_user where user_id = #{classTeacherId}),</if>
<if test="gradeDirector != null">grade_director = #{gradeDirector},</if> <if test="gradeDirectorId != null">grade_director_id = #{gradeDirectorId},grade_director = (select user_name from sys_user where user_id = #{gradeDirectorId}),</if>
<if test="violateType != null">violate_type = #{violateType},</if> <if test="violateType != null">violate_type = #{violateType},</if>
<if test="violateNum != null">violate_num = #{violateNum},</if> <if test="violateNum != null">violate_num = #{violateNum},</if>
<if test="punishResult != null">punish_result = #{punishResult},</if> <if test="punishResult != null">punish_result = #{punishResult},</if>
...@@ -169,24 +197,25 @@ ...@@ -169,24 +197,25 @@
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteSchoolScDisciplineById" parameterType="Long"> <update id="deleteSchoolScDisciplineById" parameterType="Long">
delete from school_sc_discipline where id = #{id} update school_sc_discipline set del_flag = '1' where id = #{id}
</delete> </update>
<delete id="deleteSchoolScDisciplineByIds" parameterType="String"> <update id="deleteSchoolScDisciplineByIds" parameterType="String">
delete from school_sc_discipline where id in update school_sc_discipline set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
<select id="getGrade" resultType="Map"> <select id="getGrade" resultType="Map">
SELECT id as gradeId, grade_value as gradeValue, school_year as schoolYear, grade_year as gradeYear, SELECT id as gradeId, grade_value as gradeValue, school_year as schoolYear, grade_year as gradeYear,
grade_name as gradeName, remark as remark grade_name as gradeName, remark as remark
FROM `school_grade` ORDER BY grade_year DESC LIMIT 3 FROM school_grade where del_flag = '0' ORDER BY grade_year DESC LIMIT 3
</select> </select>
<select id="getClassList" resultType="Map"> <select id="getClassList" resultType="Map">
select id as classId, class_type as classType, class_value as classValue, class_name as className, class_alias as classAlias
from school_class where del_flag = '0' and grade_id = #{gradeId} order by class_value ASC
</select> </select>
</mapper> </mapper>
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