Commit f6f4d27a authored by hongguangwu's avatar hongguangwu

MVP1.6.2-工资原表识别-配置表

parent dd84caff
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Getter;
import lombok.Setter;
/**
* @author hgw
* @description 薪资原表识别的 列内容 vo
* @date 2024-4-3 09:15:24
*/
@Getter
@Setter
public class ExcelColumnVo {
// 列号
private String lineNum;
// 列内容
private String content;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author hgw
* @description 薪资原表识别的 sheet vo
* @date 2024-4-3 09:15:24
*/
@Getter
@Setter
public class ExcelSheetVo {
// 标题行
private List<ExcelColumnVo> titleList;
// 内容行+列
private List<List<ExcelColumnVo>> dataList;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author hgw
* @description 薪资原表识别的 EXCEL vo
* @date 2024-4-3 17:37:35
*/
@Getter
@Setter
public class ExcelVo {
// sheet内容
private List<ExcelSheetVo> sheetList;
}
......@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginalDetail;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardOriginalDetailService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardOriginalService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryOriginalVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -175,7 +176,7 @@ public class TSalaryStandardOriginalController {
String fileName = System.currentTimeMillis() + "_" + file.getOriginalFilename();
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String key = "original/"+ fileName;
String key = "original/" + fileName;
boolean flag = ossUtil.uploadFileByStream(file.getInputStream(), key, null);
if (flag) {
char slash = '/';
......@@ -200,4 +201,17 @@ public class TSalaryStandardOriginalController {
}
}
/**
* @Description: 获取表头等信息
* @Author: hgw
* @Date: 2024-4-3 16:49:22
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@SysLog("获取表头等信息")
@Operation(description = "获取表头等信息")
@PostMapping("/getExcelHeader")
public R<ExcelVo> getExcelHeader(@RequestBody MultipartFile file) throws IOException {
return tSalaryStandardOriginalService.getExcelHeader(file);
}
}
......@@ -20,7 +20,10 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelVo;
import org.springframework.web.multipart.MultipartFile;
/**
* 薪资原表识别
......@@ -37,4 +40,13 @@ public interface TSalaryStandardOriginalService extends IService<TSalaryStandard
**/
IPage<TSalaryStandardOriginal> getTSalaryStandardOriginalPage(Page<TSalaryStandardOriginal> page, TSalaryStandardOriginal tSalaryStandardOriginal);
/**
* @param file
* @Description: 识别表头主类
* @Author: hgw
* @Date: 2024/4/3 17:40
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelVo>
**/
R<ExcelVo> getExcelHeader(MultipartFile file);
}
......@@ -19,13 +19,16 @@ package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardOriginalMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.SalaryUploadService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardOriginalService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelVo;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
/**
* 薪资原表识别
......@@ -50,4 +53,11 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
public IPage<TSalaryStandardOriginal> getTSalaryStandardOriginalPage(Page<TSalaryStandardOriginal> page, TSalaryStandardOriginal tSalaryStandardOriginal) {
return baseMapper.getTSalaryStandardOriginalPage(page, tSalaryStandardOriginal);
}
@Override
public R<ExcelVo> getExcelHeader(MultipartFile file) {
// TODO-识别核心代码
return null;
}
}
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