Merge branch 'dev/feat/partner1.1_20230727' into hxd/feat/interviewSelect

This commit is contained in:
xiaodong.hu
2023-07-25 13:56:05 +08:00
5 changed files with 24 additions and 10 deletions

View File

@@ -135,6 +135,8 @@ public class PDFUtils {
* @param inputStream pdf 输入流
* @param scale 缩放比例
*/
//不再将通过函转为图片
@Deprecated
public static ByteArrayOutputStream pdf2Img(InputStream inputStream, float scale) {
org.icepdf.core.pobjects.Document document = new org.icepdf.core.pobjects.Document();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();

View File

@@ -52,7 +52,7 @@
#{record.workflowStage},
#{record.workflowStatus},
#{record.lineStatus},
#{record.investmentManager}
#{record.investmentManager})
</foreach>
</insert>
@@ -579,7 +579,12 @@
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
SELECT partner_id, IFNULL(COUNT(1), 0) AS followCount
FROM hy_partner_line_info
where (deleted = 1 or (deleted=0 and line_status=0 and close_time is not null))
where (deleted = 1 or (deleted=0 and line_status=0 and close_time is not null and investment_manager is not null))
<if test="partnerIdList!=null and partnerIdList.size>0">
<foreach collection="partnerIdList" item="partnerId" open="and partner_id in (" close=")" separator=",">
#{partnerId}
</foreach>
</if>
GROUP BY partner_id;
</select>

View File

@@ -407,12 +407,12 @@ public class FlowServiceImpl implements FlowService {
//生成的 pdf 通过函内存输入流
ByteArrayInputStream inputStream = new ByteArrayInputStream(pdfOut.toByteArray());
String passPdfUrl = ossServer.uploadFileServer(inputStream, "passLetter/" + passCode + ".pdf");
//转换为图片
inputStream.reset();
ByteArrayOutputStream imageOut = PDFUtils.pdf2Img(inputStream, 2.0f);
inputStream = new ByteArrayInputStream(imageOut.toByteArray());
//不再转换为图片
//inputStream.reset();
//ByteArrayOutputStream imageOut = PDFUtils.pdf2Img(inputStream, 2.0f);
//inputStream = new ByteArrayInputStream(imageOut.toByteArray());
//上传 OSS
String passImageUrl = ossServer.uploadFileServer(inputStream, "passLetter/" + passCode + ".png");
//String passImageUrl = ossServer.uploadFileServer(inputStream, "passLetter/" + passCode + ".png");
//计算有效期截止日期
Date expiryDate = DateUtil.offsetDay(passTime, 60);
expiryDate = DateUtil.endOfDay(expiryDate);
@@ -422,11 +422,11 @@ public class FlowServiceImpl implements FlowService {
interviewDO.setPassTime(passTime);
interviewDO.setExpiryDate(DateUtil.formatDateTime(expiryDate));
interviewDO.setPassPdfUrl(passPdfUrl);
interviewDO.setPassImageUrl(passImageUrl);
//interviewDO.setPassImageUrl(passImageUrl);
hyPartnerInterviewMapper.updateByPrimaryKeySelective(interviewDO);
inputStream.close();
pdfOut.close();
imageOut.close();
//imageOut.close();
} catch (Exception e) {
log.error("资格面试通过函生成失败 e{}", e.getMessage());
throw new ServiceException("通过函生成失败!");

View File

@@ -315,10 +315,17 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
List<HyPartnerLineInfoDO> lineFollowHistoryList = hyPartnerLineInfoDAO.getLineFollowHistoryList(hyPartnerLineInfo.getPartnerId());
HyPartnerLineInfoDO newHyPartnerLineInfoDO = new HyPartnerLineInfoDO();
newHyPartnerLineInfoDO.setPartnerId(hyPartnerLineInfo.getPartnerId());
newHyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
newHyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
log.info("lineFollowHistoryList_1:{}",JSONObject.toJSONString(lineFollowHistoryList));
if (CollectionUtils.isNotEmpty(lineFollowHistoryList)){
String investmentManager = lineFollowHistoryList.get(0).getInvestmentManager();
newHyPartnerLineInfoDO.setInvestmentManager(investmentManager);
status = LineStatusEnum.PRIVATE_SEAS.getCode();
}
newHyPartnerLineInfoDO.setLineStatus(status);
hyPartnerLineInfoDAO.insertSelective(newHyPartnerLineInfoDO);

View File

@@ -22,7 +22,7 @@ import java.util.List;
@Slf4j
@Service
public class NoticeService {
@Value("${feishu.notice.link.url:null}")
@Value("${feishu.notice.link.url}")
private String linkUrl;
@Autowired
private ISVHttpRequest isvHttpRequest;