Commit 4a3f0a20 authored by hongguangwu's avatar hongguangwu

MVP1.7.15-税友拆分社保、医保

parent b7d69655
......@@ -1253,24 +1253,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
backLog.setSocialId(vo.getSocialId());
backLog.setType(CommonConstants.SIX_INT);
backLog.setCreateTime(LocalDateTime.now());
try {
String key = "socialFriend/" + vo.getSocialId() + "/" + System.currentTimeMillis() + fileName;
ossUtil.uploadFileByStream(inputStreamOut, key, null);
TSocialFriendBackLog backLogFile = new TSocialFriendBackLog();
backLogFile.setSocialId(vo.getSocialId());
backLogFile.setType(19);
backLogFile.setCreateTime(LocalDateTime.now());
if (Common.isNotNull(key)) {
URL fileUrl = ossUtil.getObjectUrl(null, key);
if (Common.isNotNull(fileUrl)) {
key += fileUrl.toString();
}
}
backLogFile.setLogInfo(key);
tSocialFriendBackLogService.save(backLogFile);
} catch (Exception e) {
log.info("花名册上传到阿里云失败,查看文件使用,没有找税友要也行");
}
// 上传花名册到阿里云
this.uploadHuaMingCeToOss(vo, fileName, inputStreamOut);
R<String> ulrR = excelToImage.excelToImg(inputStreamOut, socialFriendConfig, restTemplate, backLog);
tSocialFriendBackLogService.save(backLog);
return ulrR;
......@@ -1291,6 +1275,36 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
}
}
/**
* @param vo
* @param fileName
* @param inputStreamOut
* @Description: 上传花名册到阿里云
* @Author: hgw
* @Date: 2025/9/12 14:18
* @return: void
**/
private void uploadHuaMingCeToOss(SociaFriendYgsAddVo vo, String fileName, FileInputStream inputStreamOut) {
try {
String key = "socialFriend/" + vo.getSocialId() + "/" + System.currentTimeMillis() + fileName;
ossUtil.uploadFileByStream(inputStreamOut, key, null);
TSocialFriendBackLog backLogFile = new TSocialFriendBackLog();
backLogFile.setSocialId(vo.getSocialId());
backLogFile.setType(19);
backLogFile.setCreateTime(LocalDateTime.now());
if (Common.isNotNull(key)) {
URL fileUrl = ossUtil.getObjectUrl(null, key);
if (Common.isNotNull(fileUrl)) {
key += fileUrl.toString();
}
}
backLogFile.setLogInfo(key);
tSocialFriendBackLogService.save(backLogFile);
} catch (Exception e) {
log.info("花名册上传到阿里云失败,查看文件使用,没有找税友要也行");
}
}
/**
* 填充主表数据
*/
......
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