应征入伍保留学籍申请表-附件上传
This commit is contained in:
@@ -200,6 +200,14 @@ private static final long serialVersionUID=1L;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 附件id
|
||||
*/
|
||||
@ApiModelProperty("附件id")
|
||||
@TableField("affix_id")
|
||||
@Excel(name = "附件id")
|
||||
private String affixId;
|
||||
|
||||
/**
|
||||
* 入伍保留学籍申请表-审核记录
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,12 @@ public interface RtEnlistmentReserveAttachMapper extends BaseMapper<RtEnlistment
|
||||
*/
|
||||
int insertRtEnlistmentReserveAttach(RtEnlistmentReserveAttach rtEnlistmentReserveAttach);
|
||||
|
||||
// 新增批量插入方法
|
||||
int batchInsertRtEnlistmentReserveAttach(List<RtEnlistmentReserveAttach> attachList);
|
||||
|
||||
// 新增批量修改方法(根据主键ID批量更新)
|
||||
int batchUpdateRtEnlistmentReserveAttach(List<RtEnlistmentReserveAttach> attachList);
|
||||
|
||||
/**
|
||||
* 修改保留学籍申请附件(入伍通知书等)
|
||||
*
|
||||
|
||||
@@ -28,6 +28,12 @@ public interface IRtEnlistmentReserveAttachService extends IService<RtEnlistment
|
||||
*/
|
||||
List<RtEnlistmentReserveAttach> selectRtEnlistmentReserveAttachList(RtEnlistmentReserveAttach rtEnlistmentReserveAttach);
|
||||
|
||||
// 新增批量插入方法
|
||||
int batchInsertRtEnlistmentReserveAttach(List<RtEnlistmentReserveAttach> attachList);
|
||||
|
||||
// 新增批量修改方法(根据主键ID批量更新)
|
||||
int batchUpdateRtEnlistmentReserveAttach(List<RtEnlistmentReserveAttach> attachList);
|
||||
|
||||
/**
|
||||
* 新增保留学籍申请附件(入伍通知书等)
|
||||
*
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface IRtEnlistmentReserveService extends IService<RtEnlistmentReserv
|
||||
* @param rtEnlistmentReserve 应征入伍保留学籍申请
|
||||
* @return 结果
|
||||
*/
|
||||
int insertRtEnlistmentReserve(RtEnlistmentReserve rtEnlistmentReserve);
|
||||
RtEnlistmentReserve insertRtEnlistmentReserve(RtEnlistmentReserve rtEnlistmentReserve);
|
||||
|
||||
/**
|
||||
* 修改应征入伍保留学籍申请
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.srs.routine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.srs.common.exception.ServiceException;
|
||||
import com.srs.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -54,6 +56,43 @@ public class RtEnlistmentReserveAttachServiceImpl extends ServiceImpl<RtEnlistme
|
||||
return rtEnlistmentReserveAttachMapper.insertRtEnlistmentReserveAttach(rtEnlistmentReserveAttach);
|
||||
}
|
||||
|
||||
|
||||
// 批量插入实现
|
||||
@Override
|
||||
public int batchInsertRtEnlistmentReserveAttach(List<RtEnlistmentReserveAttach> attachList) {
|
||||
// 统一设置默认值(如创建时间)
|
||||
for (RtEnlistmentReserveAttach attach : attachList) {
|
||||
attach.setCreateTime(DateUtils.getNowDate()); // 批量设置创建时间
|
||||
// 其他默认值(如状态等)
|
||||
}
|
||||
// 调用Mapper层批量插入方法
|
||||
return rtEnlistmentReserveAttachMapper.batchInsertRtEnlistmentReserveAttach(attachList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改附件信息(根据ID)
|
||||
*/
|
||||
@Override
|
||||
public int batchUpdateRtEnlistmentReserveAttach(List<RtEnlistmentReserveAttach> attachList) {
|
||||
// 1. 校验参数:列表非空且每个元素必须包含ID
|
||||
if (attachList == null || attachList.isEmpty()) {
|
||||
throw new ServiceException("批量修改失败:附件列表不能为空");
|
||||
}
|
||||
for (RtEnlistmentReserveAttach attach : attachList) {
|
||||
if (attach.getId() == null) {
|
||||
throw new ServiceException("批量修改失败:附件ID不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
// 2. 统一设置更新时间
|
||||
for (RtEnlistmentReserveAttach attach : attachList) {
|
||||
attach.setUpdateTime(DateUtils.getNowDate()); // 若实体类有updateTime字段
|
||||
}
|
||||
|
||||
// 3. 调用Mapper批量修改
|
||||
return rtEnlistmentReserveAttachMapper.batchUpdateRtEnlistmentReserveAttach(attachList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保留学籍申请附件(入伍通知书等)
|
||||
*
|
||||
|
||||
@@ -81,7 +81,7 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRtEnlistmentReserve(RtEnlistmentReserve rtEnlistmentReserve) {
|
||||
public RtEnlistmentReserve insertRtEnlistmentReserve(RtEnlistmentReserve rtEnlistmentReserve) {
|
||||
rtEnlistmentReserve.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
// 先插入申请表数据,获取自增 ID(数据库自动为 applyStatus 赋值 0 若未传值)
|
||||
@@ -121,7 +121,7 @@ public class RtEnlistmentReserveServiceImpl extends ServiceImpl<RtEnlistmentRese
|
||||
System.out.println("申请表[" + applyId + "]状态为" + rtEnlistmentReserve.getApplyStatus() + "(" + statusDesc + "),暂不启动流程");
|
||||
}
|
||||
|
||||
return insertCount;
|
||||
return rtEnlistmentReserve;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user