Commit e8b1f36e authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.6.3' into MVP1.6.3

parents 60f41d44 0d91c4b2
......@@ -103,7 +103,9 @@ public class TSalaryAtta extends BaseEntity {
@ExcelProperty("链接ID")
private String linkId;
/**
* 类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件;9财务回执附件;10换人换卡;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
* 类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件
* ;9财务回执附件;10换人换卡;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
* 14:薪资详情导出组装的附件
*/
@ExcelAttribute(name = "类型")
@HeadFontStyle(fontHeightInPoints = 11)
......
......@@ -17,11 +17,15 @@
package com.yifu.cloud.plus.v1.yifu.salary.controller;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAttaService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAttaVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -31,6 +35,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
......@@ -149,4 +154,39 @@ public class TSalaryAttaController {
return R.ok("删除失败!");
}
/**
* 获取附件
* @author hgw
* @return R
*/
@Operation(summary = "获取薪资原表附件--EKP调用接口", description = "获取薪资原表附件--EKP调用接口")
@SysLog("获取薪资原表附件--EKP调用接口")
@GetMapping("/getFileByApplyNo")
public R<SalaryAttaVo> getFileByApplyNo(@RequestParam String applyNo) {
List<SalaryAttaVo> voList = new ArrayList<>();
// * linkType 类型:0工资;1工程工资;2暂停发;3自定义项暂停发;4打印记录;5核准表打印记录;6:非扣税项;8自有员工附件
// * ;9财务回执附件;10换人换卡;11薪资原表;12劳务费或稿酬已有发薪记录;13薪资特殊值(3500、5000)
// * 14:薪资详情导出组装的附件
List<TSalaryAtta> attaList = tSalaryAttaService.list(Wrappers.<TSalaryAtta>query().lambda()
.eq(TSalaryAtta::getLinkType,14)
.eq(TSalaryAtta::getLinkId, applyNo));
SalaryAttaVo vo = new SalaryAttaVo();
if (attaList != null && !attaList.isEmpty()) {
URL url;
TSalaryAtta a = attaList.get(0);
url = ossUtil.getObjectUrl(null, a.getAttaSrc());
vo.setAttaName(a.getAttaName());
vo.setAttaUrl(url.toString().replace("http","https"));
} else {
// TODO 生成附件:
//TSalaryAccount a
//vo.setAttaName(a.getAttaName());
//vo.setAttaUrl(url.toString().replace("http","https"));
}
return R.ok(vo);
}
}
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