Commit 98748ba1 authored by hongguangwu's avatar hongguangwu

MVP1.6.2-工资原表识别-主逻辑提交

parent 815ce707
......@@ -123,11 +123,18 @@ public class TSalaryStandardOriginal extends BaseEntity {
/**
* 是否删除0:未删除;1:已删除
*/
@ExcelAttribute(name = "是否删除0:未删除;1:已删除", isNotEmpty = true, errorInfo = "是否删除0:未删除;1:已删除不能为空")
@NotBlank(message = "是否删除0:未删除;1:已删除不能为空")
@ExcelAttribute(name = "是否删除0:未删除;1:已删除")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否删除0:未删除;1:已删除")
private Integer deleteFlag;
/**
* 数据所在行
*/
@ExcelAttribute(name = "数据所在行")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("数据所在行")
private Integer dateNum;
/**
* 明细
*/
......
......@@ -13,7 +13,7 @@ import lombok.Setter;
public class ExcelColumnVo {
// 列号
private String lineNum;
private int lineNum;
// 列内容
private String content;
}
......@@ -4,6 +4,7 @@ import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.Map;
/**
* @author hgw
......@@ -13,10 +14,12 @@ import java.util.List;
@Getter
@Setter
public class ExcelSheetVo {
// 数据行
private int dataNum;
// sheet名
private String sheetName;
// 标题行
private List<ExcelColumnVo> titleList;
// 内容行+列
private List<List<ExcelColumnVo>> dataList;
private List<Map<String, String>> contentList;
}
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;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardIssueRes;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal;
import lombok.Getter;
import lombok.Setter;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @author hgw2
* @description 薪资上传vo
* @date 2023/1/10
*/
@Getter
@Setter
public class SalaryUploadOriginalParamVo {
// 表格file
MultipartFile file;
// 配置
TSalaryStandardOriginal original;
// sheetName;必填
String sheetName;
// 结算主体id;必填
String settleDepart;
// 工资配置结算月等信息的id
String configId;
// 工资类型。必填
String salaryType;
// 订单id
String orderId;
// 是否代发户,默认为空或0:非代发户,1是代发户
Integer isIssue;
// 代发户的配置list
List<TSalaryStandardIssueRes> resList;
}
......@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -31,8 +32,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 com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -210,8 +210,21 @@ public class TSalaryStandardOriginalController {
@SysLog("获取表头等信息")
@Operation(description = "获取表头等信息")
@PostMapping("/getExcelHeader")
public R<ExcelVo> getExcelHeader(@RequestBody MultipartFile file) throws IOException {
return tSalaryStandardOriginalService.getExcelHeader(file);
public R<ExcelSheetVo> getExcelHeader(@RequestBody MultipartFile file,@RequestParam String sheetName) {
return tSalaryStandardOriginalService.getExcelHeader(file, sheetName);
}
/**
* @Description: 新版原表识别导入
* @Author: hgw
* @Date: 2024-4-8 18:04:56
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@SysLog("新版原表识别导入")
@Operation(description = "新版原表识别导入")
@PostMapping("/salaryUploadByOriginal")
public R<List<ErrorMessage>> salaryUploadByOriginal(@RequestBody SalaryUploadOriginalParamVo vo) {
return tSalaryStandardOriginalService.salaryUploadByOriginal(vo);
}
}
......@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardOriginal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 薪资原表识别导入
*
......@@ -32,9 +34,15 @@ import org.apache.ibatis.annotations.Param;
*/
@Mapper
public interface TSalaryStandardOriginalMapper extends BaseMapper<TSalaryStandardOriginal> {
/**
* 薪资原表识别导入-分页
*/
IPage<TSalaryStandardOriginal> getTSalaryStandardOriginalPage(Page<TSalaryStandardOriginal> page
/**
* 薪资原表识别导入-分页
*/
IPage<TSalaryStandardOriginal> getTSalaryStandardOriginalPage(Page<TSalaryStandardOriginal> page
, @Param("tSalaryStandardOriginal") TSalaryStandardOriginal tSalaryStandardOriginal);
/**
* 特殊身份证允许识别为数据行
*/
List<String> getSpecialIdCardList();
}
......@@ -20,11 +20,15 @@ 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.ErrorMessage;
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 com.yifu.cloud.plus.v1.yifu.salary.vo.ExcelSheetVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadOriginalParamVo;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* 薪资原表识别
*
......@@ -47,6 +51,15 @@ public interface TSalaryStandardOriginalService extends IService<TSalaryStandard
* @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);
R<ExcelSheetVo> getExcelHeader(MultipartFile file, String sheetName);
/**
* @param excelVo
* @Description: 新版原表识别导入
* @Author: hgw
* @Date: 2024/4/8 18:05
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
R<List<ErrorMessage>> salaryUploadByOriginal(SalaryUploadOriginalParamVo excelVo);
}
......@@ -40,6 +40,7 @@
<result property="attaUrl" column="ATTA_URL"/>
<result property="attaSize" column="ATTA_SIZE"/>
<result property="attaType" column="ATTA_TYPE"/>
<result property="dateNum" column="DATE_NUM"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -57,7 +58,8 @@
a.ATTA_SRC,
a.ATTA_URL,
a.ATTA_SIZE,
a.ATTA_TYPE
a.ATTA_TYPE,
a.DATE_NUM
</sql>
<sql id="TSalaryStandardOriginal_where">
<if test="tSalaryStandardOriginal != null">
......@@ -108,5 +110,9 @@
ORDER BY a.CREATE_TIME desc
</select>
<!-- 特殊身份证允许识别为数据行 -->
<select id="getSpecialIdCardList" resultType="java.lang.String">
SELECT a.ID_CARD FROM t_salary_standard_original_special_idcard a
</select>
</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