Remove obsolete export APIs and persist recruitment work history
This commit is contained in:
@@ -80,18 +80,6 @@ public class CcdiAccountInfoController extends BaseController {
|
||||
return success(accountInfoService.selectAccountInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出账户库列表
|
||||
*/
|
||||
@Operation(summary = "导出账户库列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:accountInfo:export')")
|
||||
@Log(title = "账户库管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiAccountInfoQueryDTO queryDTO) {
|
||||
List<CcdiAccountInfoExcel> list = accountInfoService.selectAccountInfoListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiAccountInfoExcel.class, "账户库管理");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增账户
|
||||
*/
|
||||
|
||||
@@ -70,18 +70,6 @@ public class CcdiBaseStaffController extends BaseController {
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工列表
|
||||
*/
|
||||
@Operation(summary = "导出员工列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:baseStaff:export')")
|
||||
@Log(title = "员工信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiBaseStaffQueryDTO queryDTO) {
|
||||
List<CcdiBaseStaffExcel> list = baseStaffService.selectBaseStaffListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiBaseStaffExcel.class, "员工信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工详细信息
|
||||
*/
|
||||
|
||||
@@ -63,18 +63,6 @@ public class CcdiCustEnterpriseRelationController extends BaseController {
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出信贷客户实体关联列表
|
||||
*/
|
||||
@Operation(summary = "导出信贷客户实体关联列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custEnterpriseRelation:export')")
|
||||
@Log(title = "信贷客户实体关联信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiCustEnterpriseRelationQueryDTO queryDTO) {
|
||||
List<CcdiCustEnterpriseRelationExcel> list = relationService.selectRelationListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiCustEnterpriseRelationExcel.class, "信贷客户实体关联信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取信贷客户实体关联详细信息
|
||||
*/
|
||||
|
||||
@@ -103,17 +103,6 @@ public class CcdiCustFmyRelationController extends BaseController {
|
||||
return toAjax(relationService.deleteRelationByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出信贷客户家庭关系
|
||||
*/
|
||||
@Operation(summary = "导出信贷客户家庭关系")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:export')")
|
||||
@Log(title = "信贷客户家庭关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiCustFmyRelationQueryDTO query) {
|
||||
relationService.exportRelations(query, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载带字典下拉框的导入模板
|
||||
* 使用@DictDropdown注解自动添加下拉框
|
||||
|
||||
@@ -63,18 +63,6 @@ public class CcdiPurchaseTransactionController extends BaseController {
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购交易列表
|
||||
*/
|
||||
@Operation(summary = "导出采购交易列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:purchaseTransaction:export')")
|
||||
@Log(title = "采购交易信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiPurchaseTransactionQueryDTO queryDTO) {
|
||||
List<CcdiPurchaseTransactionExcel> list = transactionService.selectTransactionListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiPurchaseTransactionExcel.class, "采购交易信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购交易详细信息
|
||||
*/
|
||||
|
||||
@@ -63,18 +63,6 @@ public class CcdiStaffEnterpriseRelationController extends BaseController {
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工实体关系列表
|
||||
*/
|
||||
@Operation(summary = "导出员工实体关系列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:staffEnterpriseRelation:export')")
|
||||
@Log(title = "员工实体关系信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiStaffEnterpriseRelationQueryDTO queryDTO) {
|
||||
List<CcdiStaffEnterpriseRelationExcel> list = relationService.selectRelationListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiStaffEnterpriseRelationExcel.class, "员工实体关系信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工实体关系详细信息
|
||||
*/
|
||||
|
||||
@@ -63,18 +63,6 @@ public class CcdiStaffFmyRelationController extends BaseController {
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工亲属关系列表
|
||||
*/
|
||||
@Operation(summary = "导出员工亲属关系列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:staffFmyRelation:export')")
|
||||
@Log(title = "员工亲属关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiStaffFmyRelationQueryDTO queryDTO) {
|
||||
List<CcdiStaffFmyRelationExcel> list = relationService.selectRelationListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiStaffFmyRelationExcel.class, "员工亲属关系信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工亲属关系详细信息
|
||||
*/
|
||||
|
||||
@@ -64,18 +64,6 @@ public class CcdiStaffRecruitmentController extends BaseController {
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出招聘信息列表
|
||||
*/
|
||||
@Operation(summary = "导出招聘信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:staffRecruitment:export')")
|
||||
@Log(title = "员工招聘信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiStaffRecruitmentQueryDTO queryDTO) {
|
||||
List<CcdiStaffRecruitmentExcel> list = recruitmentService.selectRecruitmentListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiStaffRecruitmentExcel.class, "员工招聘信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取招聘信息详细信息
|
||||
*/
|
||||
|
||||
@@ -63,18 +63,6 @@ public class CcdiStaffTransferController extends BaseController {
|
||||
return getDataTable(result.getRecords(), result.getTotal());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工调动记录列表
|
||||
*/
|
||||
@Operation(summary = "导出员工调动记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:staffTransfer:export')")
|
||||
@Log(title = "员工调动记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiStaffTransferQueryDTO queryDTO) {
|
||||
List<CcdiStaffTransferExcel> list = transferService.selectTransferListForExport(queryDTO);
|
||||
EasyExcelUtil.exportExcel(response, list, CcdiStaffTransferExcel.class, "员工调动记录信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工调动记录详细信息
|
||||
*/
|
||||
|
||||
@@ -7,10 +7,12 @@ import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 员工招聘信息编辑DTO
|
||||
@@ -91,4 +93,8 @@ public class CcdiStaffRecruitmentEditDTO implements Serializable {
|
||||
/** 面试官2工号 */
|
||||
@Size(max = 10, message = "面试官2工号长度不能超过10个字符")
|
||||
private String interviewerId2;
|
||||
|
||||
/** 历史工作经历列表 */
|
||||
@Valid
|
||||
private List<CcdiStaffRecruitmentWorkEditDTO> workExperienceList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.info.collection.domain.dto;
|
||||
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 招聘记录历史工作经历编辑DTO
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-04-22
|
||||
*/
|
||||
@Data
|
||||
public class CcdiStaffRecruitmentWorkEditDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 排序号 */
|
||||
private Integer sortOrder;
|
||||
|
||||
/** 工作单位 */
|
||||
@Size(max = 200, message = "工作单位长度不能超过200个字符")
|
||||
private String companyName;
|
||||
|
||||
/** 所属部门 */
|
||||
@Size(max = 100, message = "所属部门长度不能超过100个字符")
|
||||
private String departmentName;
|
||||
|
||||
/** 岗位名称 */
|
||||
@Size(max = 100, message = "岗位名称长度不能超过100个字符")
|
||||
private String positionName;
|
||||
|
||||
/** 入职年月 */
|
||||
@Pattern(regexp = "^$|^((19|20)\\d{2})-(0[1-9]|1[0-2])$", message = "入职年月格式不正确,应为YYYY-MM")
|
||||
private String jobStartMonth;
|
||||
|
||||
/** 离职年月 */
|
||||
@Pattern(regexp = "^$|^((19|20)\\d{2})-(0[1-9]|1[0-2])$", message = "离职年月格式不正确,应为YYYY-MM")
|
||||
private String jobEndMonth;
|
||||
|
||||
/** 离职原因 */
|
||||
@Size(max = 500, message = "离职原因长度不能超过500个字符")
|
||||
private String departureReason;
|
||||
|
||||
/** 主要工作内容 */
|
||||
@Size(max = 1000, message = "主要工作内容长度不能超过1000个字符")
|
||||
private String workContent;
|
||||
|
||||
/** 备注 */
|
||||
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||
private String remark;
|
||||
}
|
||||
@@ -7,11 +7,13 @@ import com.ruoyi.info.collection.domain.CcdiStaffRecruitmentWork;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentAddDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentEditDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentQueryDTO;
|
||||
import com.ruoyi.info.collection.domain.dto.CcdiStaffRecruitmentWorkEditDTO;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentExcel;
|
||||
import com.ruoyi.info.collection.domain.excel.CcdiStaffRecruitmentWorkExcel;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentVO;
|
||||
import com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentWorkVO;
|
||||
import com.ruoyi.info.collection.enums.AdmitStatus;
|
||||
import com.ruoyi.info.collection.enums.RecruitType;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffRecruitmentWorkMapper;
|
||||
import com.ruoyi.info.collection.mapper.CcdiStaffRecruitmentMapper;
|
||||
import com.ruoyi.info.collection.service.ICcdiStaffRecruitmentImportService;
|
||||
@@ -28,6 +30,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -151,6 +154,7 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
CcdiStaffRecruitment recruitment = new CcdiStaffRecruitment();
|
||||
BeanUtils.copyProperties(editDTO, recruitment);
|
||||
int result = recruitmentMapper.updateById(recruitment);
|
||||
replaceWorkExperienceList(editDTO);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -262,4 +266,43 @@ public class CcdiStaffRecruitmentServiceImpl implements ICcdiStaffRecruitmentSer
|
||||
return vo;
|
||||
}).toList();
|
||||
}
|
||||
|
||||
private void replaceWorkExperienceList(CcdiStaffRecruitmentEditDTO editDTO) {
|
||||
LambdaQueryWrapper<CcdiStaffRecruitmentWork> deleteWrapper = new LambdaQueryWrapper<>();
|
||||
deleteWrapper.eq(CcdiStaffRecruitmentWork::getRecruitId, editDTO.getRecruitId());
|
||||
|
||||
if (!Objects.equals(RecruitType.SOCIAL.getCode(), editDTO.getRecruitType())) {
|
||||
recruitmentWorkMapper.delete(deleteWrapper);
|
||||
return;
|
||||
}
|
||||
|
||||
if (editDTO.getWorkExperienceList() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
recruitmentWorkMapper.delete(deleteWrapper);
|
||||
List<CcdiStaffRecruitmentWork> workList = buildWorkExperienceEntities(editDTO);
|
||||
workList.forEach(recruitmentWorkMapper::insert);
|
||||
}
|
||||
|
||||
private List<CcdiStaffRecruitmentWork> buildWorkExperienceEntities(CcdiStaffRecruitmentEditDTO editDTO) {
|
||||
List<CcdiStaffRecruitmentWorkEditDTO> workExperienceList = editDTO.getWorkExperienceList();
|
||||
if (workExperienceList == null || workExperienceList.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
List<CcdiStaffRecruitmentWork> entityList = new ArrayList<>();
|
||||
for (int i = 0; i < workExperienceList.size(); i++) {
|
||||
CcdiStaffRecruitmentWorkEditDTO item = workExperienceList.get(i);
|
||||
if (item == null || StringUtils.isBlank(item.getCompanyName()) || StringUtils.isBlank(item.getJobStartMonth())) {
|
||||
continue;
|
||||
}
|
||||
CcdiStaffRecruitmentWork work = new CcdiStaffRecruitmentWork();
|
||||
BeanUtils.copyProperties(item, work);
|
||||
work.setRecruitId(editDTO.getRecruitId());
|
||||
work.setSortOrder(i + 1);
|
||||
entityList.add(work);
|
||||
}
|
||||
return entityList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user