应征入伍保留学籍申请表附件删除

This commit is contained in:
2025-11-21 17:29:01 +08:00
parent 1986242cab
commit 76be171955
9 changed files with 66 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.srs.routine.domain.RtEnlistmentReserveAttach;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/**
* 保留学籍申请附件入伍通知书等Mapper接口
@@ -20,6 +21,8 @@ public interface RtEnlistmentReserveAttachMapper extends BaseMapper<RtEnlistment
*/
public RtEnlistmentReserveAttach selectRtEnlistmentReserveAttachById(Long id);
/**
* 查询保留学籍申请附件(入伍通知书等)列表
*
@@ -58,6 +61,14 @@ public interface RtEnlistmentReserveAttachMapper extends BaseMapper<RtEnlistment
*/
int deleteRtEnlistmentReserveAttachById(Long id);
/**
* 删除保留学籍申请附件(入伍通知书等)
*
* @param fileName 文件名称
* @return 保留学籍申请附件(入伍通知书等)
*/
int deleteRtEnlistmentReserveAttachByFileNameAndStuName(@Param("fileName") String fileName, @Param("studentName") String studentName);
/**
* 批量删除保留学籍申请附件(入伍通知书等)
*

View File

@@ -6,6 +6,7 @@ import com.srs.common.doman.vo.TeacherVo;
import com.srs.routine.domain.RtEnlistmentReserve;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
/**
* 应征入伍保留学籍申请Mapper接口
@@ -30,6 +31,14 @@ public interface RtEnlistmentReserveMapper extends BaseMapper<RtEnlistmentReserv
*/
public RtEnlistmentReserve selectRtEnlistmentReserveByProcessInstanceId(String processInstanceId);
/**
* 查询应征入伍保留学籍申请
*
* @param studentName 学生姓名
* @return 应征入伍保留学籍申请
*/
public RtEnlistmentReserve getEnlistmentReserveByStuNameAndStuNo(@Param("studentName") String studentName, @Param("studentName") String studentNo);
// <!-- 根据学号查询辅导员信息 -->
public TeacherVo getCounselorInfo(String stuNo);

View File

@@ -4,6 +4,7 @@ import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.srs.routine.domain.RtEnlistmentReserveAttach;
import org.apache.ibatis.annotations.Param;
/**
* 保留学籍申请附件入伍通知书等Service接口
@@ -65,4 +66,6 @@ public interface IRtEnlistmentReserveAttachService extends IService<RtEnlistment
* @return 结果
*/
int deleteRtEnlistmentReserveAttachById(Long id);
int deleteRtEnlistmentReserveAttachByFileNameAndStuName(@Param("fileName") String fileName, @Param("studentName") String studentName);
}

View File

@@ -125,4 +125,9 @@ public class RtEnlistmentReserveAttachServiceImpl extends ServiceImpl<RtEnlistme
public int deleteRtEnlistmentReserveAttachById(Long id) {
return rtEnlistmentReserveAttachMapper.deleteRtEnlistmentReserveAttachById(id);
}
@Override
public int deleteRtEnlistmentReserveAttachByFileNameAndStuName(String fileName, String studentName) {
return rtEnlistmentReserveAttachMapper.deleteRtEnlistmentReserveAttachByFileNameAndStuName(fileName, studentName);
}
}

View File

@@ -82,6 +82,12 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
*/
@Override
public RtEnlistmentReserve insertRtEnlistmentReserve(RtEnlistmentReserve rtEnlistmentReserve) {
// 新增之前先查询申请记录是否存在,如果存在就不能新增重复的数据
RtEnlistmentReserve enlistmentReserveByStuNameAndStuNo = rtEnlistmentReserveMapper.getEnlistmentReserveByStuNameAndStuNo(rtEnlistmentReserve.getStudentName(), rtEnlistmentReserve.getStudentNo());
if (enlistmentReserveByStuNameAndStuNo != null) {
throw new ServiceException("您已经申请过了,请勿重新申请!", 400);
}
rtEnlistmentReserve.setCreateTime(DateUtils.getNowDate());
// 先插入申请表数据,获取自增 ID数据库自动为 applyStatus 赋值 0 若未传值)

View File

@@ -160,6 +160,12 @@
where id = #{id}
</delete>
<delete id="deleteRtEnlistmentReserveAttachByFileNameAndStuName" parameterType="String">
delete
from rt_enlistment_reserve_attach
where file_name = #{fileName} and student_name = #{studentName}
</delete>
<delete id="deleteRtEnlistmentReserveAttachByIds" parameterType="String">
delete from rt_enlistment_reserve_attach where id in
<foreach item="id" collection="array" open="(" separator="," close=")">

View File

@@ -167,6 +167,20 @@
where id = #{id}
</select>
<!--根据学生姓名和学号查询申请表-->
<select id="getEnlistmentReserveByStuNameAndStuNo" resultMap="RtEnlistmentReserveResult">
select *
from rt_enlistment_reserve
<where>
<if test="studentName != null and studentName != ''">
and student_name = #{studentName}
</if>
<if test="studentNo != null and studentNo != ''">
and student_no = #{studentNo}
</if>
</where>
</select>
<!-- 根据流程编号查询申请记录 -->
<select id="selectRtEnlistmentReserveByProcessInstanceId" parameterType="String"
resultMap="RtEnlistmentReserveResult">