Commit 7e631b2b authored by fangxinjiang's avatar fangxinjiang

excel to image -fxj

parent e459a804
......@@ -145,4 +145,12 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@ExcelProperty("医生大反馈" )
@ExcelIgnore
private String ysdRemark;
/**
* 社保ID
*/
@TableField(exist = false)
@Schema(description ="社保ID")
@ExcelIgnore
private String socialId;
}
......@@ -50,6 +50,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
......@@ -886,4 +887,21 @@ public class TDispatchInfoController {
searchVo.setCreateBy(user.getId());
tDispatchInfoService.doexportFundInfoOne(response,searchVo);
}
/**
* @Author fxj
* @Description 导出花名册
* @Date 14:02 2024/12/10
* @Param
* @return
**/
@PostMapping("/doExportRoster")
@Operation(description = "导出花名册")
@SysLog("导出花名册")
public R<URL> doExportRoster(@RequestParam("socialId") String socialId, @RequestParam("type") String type,@RequestParam("unitCreditCode")String unitCreditCode) {
return tDispatchInfoService.doExportRoster(socialId,type,unitCreditCode);
}
}
......@@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.net.URL;
import java.util.List;
import java.util.Map;
......@@ -161,4 +162,5 @@ public interface TDispatchInfoService extends IService<TDispatchInfo> {
**/
List<SocialHandleExportVo> getRecordRosterList(SocialHandleSearchVo searchVo, String idStr);
R<URL> doExportRoster(String socialId, String type,String unitCreditCode);
}
......@@ -4,6 +4,7 @@ import org.apache.commons.compress.utils.IOUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Component;
import javax.imageio.ImageIO;
import java.awt.Color;
......@@ -17,6 +18,7 @@ import java.io.*;
* @Description
* @Version 1.0
*/
@Component
public class ExcelMergeImage {
public static void main(String[] args) throws IOException {
String excelFilePath = "E:\\test\\11\\1.xls";
......@@ -91,7 +93,7 @@ public class ExcelMergeImage {
* @Param
* @return
**/
public static FileOutputStream addPictureToExcel(FileInputStream fis,
public FileOutputStream addPictureToExcel(FileInputStream fis,
InputStream imageIs,
FileOutputStream fileOut,
int SheetNum){
......
......@@ -20,13 +20,10 @@ import java.net.URL;
* @Description excel 转换为 图片 并上传阿里云 (上传后自动删除生成的图片文件)
* @Version 1.0
*/
@RequiredArgsConstructor
@Component
public class ExcelToImage {
@Autowired
private static OSSUtil ossUtil;
public R<URL> excelToImg(InputStream inputStream ){
public R<URL> excelToImg(InputStream inputStream ,OSSUtil ossUtil){
String projectRoot = System.getProperty("user.dir");
//加载Excel工作表
Workbook wb = new Workbook();
......
......@@ -1577,6 +1577,7 @@
SELECT count(1) from (
SELECT 1
FROM t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
<where>
<include refid="where_getSocialDisRecord"/>
</where>
......@@ -2258,6 +2259,11 @@
<sql id="where_getSocialDisRecord">
a.DELETE_FLAG = 0
AND a.social_id is not null
<if test='tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() == "0" '>
AND a.social_id = #{tDispatchInfo.socialId}
</if>
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if test='tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0" '>
AND a.STATUS in ('2','4')
......@@ -2354,6 +2360,9 @@
<sql id="where_getSocialPersionDisRecord">
a.DELETE_FLAG = 0
AND a.social_id is not null
<if test='tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() == "0" '>
AND a.social_id = #{tDispatchInfo.socialId}
</if>
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if test='tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0"'>
AND a.STATUS in ('2','4')
......
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