Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
zhangchenbiao
2023-06-21 17:42:18 +08:00
19 changed files with 143 additions and 38 deletions

View File

@@ -5,6 +5,7 @@ import com.lowagie.text.Font;
import com.lowagie.text.Image;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.*;
import lombok.extern.slf4j.Slf4j;
import org.icepdf.core.exceptions.PDFException;
import org.icepdf.core.exceptions.PDFSecurityException;
import org.icepdf.core.pobjects.Page;
@@ -19,6 +20,7 @@ import java.io.*;
/**
* 使用 OpenPDF 封装的 pdf 工具类
*/
@Slf4j
public class PDFUtils {
private static final int[] A4Size = {595, 842};
@@ -145,20 +147,16 @@ public class PDFUtils {
GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX,
rotation, scale);
RenderedImage rendImage = image;
try {
ImageIO.write(rendImage, "png", outputStream);
//例子中是pdf转png格式的也可以将上面两行改成jpg转出jpg格式的
//但是从转换效果来看png清晰度会相对较高。有个小技巧是第一行行改成jpg
//但第二行使用png也就是转换成jpg格式但有png清晰度的图片。
} catch (IOException e) {
e.printStackTrace();
}
ImageIO.write(rendImage, "png", outputStream);
//例子中是pdf转png格式的也可以将上面两行改成jpg转出jpg格式的
//但是从转换效果来看png的清晰度会相对较高。有个小技巧是第一行行改成jpg
//但第二行使用png也就是转换成jpg格式但有png清晰度的图片。
image.flush();
document.dispose();
return outputStream;
}
} catch (PDFException | PDFSecurityException | IOException e1) {
e1.printStackTrace();
} catch (PDFException | IOException | PDFSecurityException e) {
log.error("PDF转图片异常, e{}", e.getMessage());
} finally {
try {
outputStream.close();

View File

@@ -82,5 +82,12 @@ public class HyPartnerInterviewPlanDAO {
return hyPartnerInterviewPlanMapper.getPartnerInterviewInfoList(userId,workflowStage,workflowStatus);
}
public Long selectInterviewIdByLineId(Long lineId){
if (lineId==null){
return 0L;
}
return hyPartnerInterviewPlanMapper.selectInterviewIdByLineId(lineId);
}
}

View File

@@ -94,6 +94,8 @@ public interface HyPartnerInterviewPlanMapper {
*/
EnterpriseUserBaseInfoVO getEnterpriseUserBaseInfo(@Param("userId") String userId);
Long selectInterviewIdByLineId(Long lineId);
/**
* 根据条件字段查询面试安排信息
* @param record

View File

@@ -374,6 +374,10 @@
</select>
<select id="selectInterviewIdByLineId" resultType="java.lang.Long">
select id from hy_partner_interview_plan where partner_line_id = #{lineId}
</select>
<!-- 查询用户基本信息 -->
<select id="getEnterpriseUserBaseInfo" resultType="com.cool.store.vo.EnterpriseUserBaseInfoVO">
select name, mobile

View File

@@ -464,10 +464,10 @@
LEFT JOIN hy_partner_user_info hpuinfo ON hpli.partner_id = hpuinfo.partner_id
LEFT JOIN enterprise_user eu ON hpli.investment_manager = eu.user_id
WHERE line_status in (1,2)
<if test="keywordType!=null and keywordType=='name'">
<if test="keyword!=null and keyword!='' and keywordType!=null and keywordType=='name'">
AND (eu.name like concat('%',#{keyword},'%') or hpuinfo.username like concat('%',#{keyword},'%'))
</if>
<if test="keywordType!=null and keywordType=='mobile'">
<if test="keyword!=null and keyword!='' and keywordType!=null and keywordType=='mobile'">
AND ( eu.mobile like concat('%',#{keyword},'%') or hpuinfo.mobile like concat('%',#{keyword},'%')')
</if>
<if test="workflowStage!=null and workflowStage!=''">
@@ -485,16 +485,16 @@
<if test="acceptAdjustType!=null">
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="storeKeywordType!=null and storeKeywordType=='storeCode'">
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='storeCode'">
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType=='storeName'">
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='storeName'">
AND hpuinfo.shop_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType=='partnerName'">
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='partnerName'">
AND hpuinfo.recommend_partner_name like concat('%',#{storeKeyword},'%')
</if>
<if test="storeKeywordType!=null and storeKeywordType=='partnerMobile'">
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='partnerMobile'">
AND hpuinfo.recommend_partner_mobile like concat('%',#{storeKeyword},'%')
</if>
<if test="userIdList!=null and userIdList.size>0 and developmentManagerList!=null and developmentManagerList.size==0">

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.content;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContentDelDto {
@ApiModelProperty("动态id")
private String contentId;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.content;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContentQueryDetailDto {
@ApiModelProperty("动态id")
private String contentId;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PartnerGetPassLetterDetailDto {
@ApiModelProperty("面试计划id")
private String interviewPlanId;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PartnerQueryInterviewDto {
@ApiModelProperty("加盟商用户id")
private String partnerId;
}

View File

@@ -25,6 +25,10 @@ public class PartnerIntentInfoVO {
@ApiModelProperty("加盟商姓名")
private String partnerUserName;
private String workflowStage;
private String workflowStauts;
@ApiModelProperty("加盟商手机号")
private String partnerUserPhone;

View File

@@ -4,6 +4,7 @@ import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.LineRequest;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageInfo;
import java.util.List;
@@ -145,6 +146,6 @@ public interface HyPartnerLineInfoService {
*/
String getAssignFollowUser(String partnerId,String type);
InterviewVO getInterviewInfo(Long lineId);
}

View File

@@ -92,7 +92,7 @@ public class FlowServiceImpl implements FlowService {
fraSourceDO.setKey("HSAYPartner");
fraSourceDO.setText("沪上阿姨合伙人");
data.setFraSource(fraSourceDO);
data.setAmtDeposit(Integer.valueOf(request.getSecurityFund()));
data.setAmtDeposit(Integer.parseInt(request.getSecurityFund()));
//获取授权码
String authCode = null;
@@ -118,9 +118,9 @@ public class FlowServiceImpl implements FlowService {
}
data.setIntendedSigner(request.getIntentionSignerUsername());
data.setIntendedSignerTel(request.getIntentionSignerMobile());
//通过 rpc 请求审核系统获取返回数据
Map<String, String> qualifyVerifyRespData = JSON.parseObject(createQualifyVerify(rpcRequest), new TypeReference<HashMap<String,String>>() {});
//2.更新审核信息
HyPartnerCertificationInfoDO partnerCertificationInfoDO = new HyPartnerCertificationInfoDO();
partnerCertificationInfoDO.setPartnerId(request.getPartnerId());
@@ -147,6 +147,7 @@ public class FlowServiceImpl implements FlowService {
//set 意向合同编号
partnerCertificationInfoDO.setIntentionContractNo(qualifyVerifyRespData.get("sequenceNo"));
hyPartnerCertificationInfoMapper.updateByPrimaryKeySelective(partnerCertificationInfoDO);
//3.更新面试信息
//根据面试id获取面试信息
HyPartnerInterviewDO hyPartnerInterviewDO = hyPartnerInterviewMapper.selectByPrimaryKeySelective(request.getInterviewId());
@@ -158,6 +159,13 @@ public class FlowServiceImpl implements FlowService {
hyPartnerInterviewDO.setStatus(Integer.valueOf(WorkflowStatusEnum.INTERVIEW_4.getCode()));
hyPartnerInterviewMapper.updateByPrimaryKeySelective(hyPartnerInterviewDO);
//4. 更新线索信息(开发主管)
if (!StringUtils.isEmpty(request.getDevtDirectorId())) {
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
hyPartnerLineInfoDO.setId(Long.parseLong(request.getLineId()));
hyPartnerLineInfoDO.setDevelopmentDirector(request.getDevtDirectorId());
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
}
}
@Override

View File

@@ -9,6 +9,7 @@ import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
import com.cool.store.dto.partner.PrivateSeaLineDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.HyPartnerIntentInfoDO;
import com.cool.store.entity.HyPartnerLineInfoDO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowStageEnum;
@@ -110,9 +111,12 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
if(Objects.isNull(hyPartnerIntentInfoDO)){
return null;
}
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
PartnerIntentInfoVO partnerIntentInfoVO = convertPartnerIntentApplyInfoDOToVO(hyPartnerIntentInfoDO);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerIntentInfoDO.getPartnerId());
partnerIntentInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername());
partnerIntentInfoVO.setWorkflowStage(hyPartnerLineInfoDO.getWorkflowStage());
partnerIntentInfoVO.setWorkflowStauts(hyPartnerLineInfoDO.getWorkflowStatus());
partnerIntentInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile());
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(hyPartnerUserInfoDO.getWantShopArea()));
partnerIntentInfoVO.setWantShopAreaName(hyOpenAreaInfoDO.getAreaName());

View File

@@ -14,13 +14,16 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.request.CloseFollowRequest;
import com.cool.store.request.LineRequest;
import com.cool.store.request.PrivateSeaLineListRequest;
import com.cool.store.request.QueryByInterviewPlanIdReq;
import com.cool.store.service.AliyunService;
import com.cool.store.service.EnterpriseUserService;
import com.cool.store.service.HyPartnerLineInfoService;
import com.cool.store.service.InterviewService;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.RedisUtilPool;
import com.cool.store.utils.StringUtil;
import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections4.CollectionUtils;
@@ -60,6 +63,15 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
AliyunService aliyunService;
@Resource
HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
@Resource
HyIntendDevMappingDAO hyIntendDevMappingDAO;
@Resource
HyIntendDevZoneInfoDAO hyIntendDevZoneInfoDAO;
@Resource
InterviewService interviewService;
@Resource
HyPartnerInterviewPlanDAO hyPartnerInterviewPlanDAO;
@Override
public StageCountVO selectStagePendingCount(String userId) {
@@ -447,10 +459,6 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
return Boolean.FALSE;
}
@Resource
HyIntendDevMappingDAO hyIntendDevMappingDAO;
@Resource
HyIntendDevZoneInfoDAO hyIntendDevZoneInfoDAO;
@Override
public String getAssignFollowUser(String partnerId,String type) {
@@ -488,8 +496,16 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
return userId;
}
@Override
public InterviewVO getInterviewInfo(Long lineId) {
Long interviewId = hyPartnerInterviewPlanDAO.selectInterviewIdByLineId(lineId);
QueryByInterviewPlanIdReq queryByInterviewPlanIdReq = new QueryByInterviewPlanIdReq();
if (interviewId!=null){
queryByInterviewPlanIdReq.setInterviewPlanId(String.valueOf(interviewId));
return interviewService.getInterviewInfo(queryByInterviewPlanIdReq);
}
return null;
}
/**

View File

@@ -1,8 +1,6 @@
package com.cool.store.controller;
import com.cool.store.dto.content.ContentAddDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.dto.content.ContentUpdateDto;
import com.cool.store.dto.content.*;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ContentService;
@@ -34,8 +32,8 @@ public class ContentController {
@PostMapping("/delete")
@ApiOperation("删除动态")
public ResponseResult deleteContent(@RequestParam(value = "contentId") String contentId) {
contentService.deleteContent(contentId);
public ResponseResult deleteContent(@RequestBody ContentDelDto dto) {
contentService.deleteContent(dto.getContentId());
return ResponseResult.success();
}
@@ -57,8 +55,8 @@ public class ContentController {
@PostMapping("/detail")
@ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId));
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody ContentQueryDetailDto dto) {
return ResponseResult.success(contentService.queryContentInfo(dto.getContentId()));
}
}

View File

@@ -10,6 +10,7 @@ import com.cool.store.request.*;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.*;
import com.cool.store.vo.*;
import com.cool.store.vo.interview.InterviewVO;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -49,6 +50,7 @@ public class DeskController {
PartnerUserInfoService partnerUserInfoService;
@GetMapping(path = "/interviewSchedule")
@ApiOperation("面试日程信息 面试信息有限 不做分页")
public ResponseResult<InterviewScheduleInfoVO> interviewSchedule(@RequestParam(value = "selectedData",required = false) String selectedData){
@@ -283,4 +285,13 @@ public class DeskController {
@RequestParam(value = "type",required = false)String type){
return ResponseResult.success(hyPartnerLineInfoService.getAssignFollowUser(partnerId,type));
}
@GetMapping(path = "/getInterviewInfoByLineId")
@ApiOperation("查询加盟商线索详情 根据线索信息查询面试信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
})
public ResponseResult<InterviewVO> getInterviewInfoByLineId(@RequestParam(value = "lineId",required = false)Long lineId){
return ResponseResult.success(hyPartnerLineInfoService.getInterviewInfo(lineId));
}
}

View File

@@ -112,6 +112,7 @@ public class SignValidateFilter implements Filter {
// 前后端验签不等
if (!newSign.equals(sign)) {
response.setStatus(HttpStatus.OK.value());
response.setContentType("application/json;charset=UTF-8");
response.getWriter().write(JSON.toJSONString(ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL)));
return;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller;
import com.cool.store.dto.content.ContentQueryDetailDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.response.ResponseResult;
@@ -35,8 +36,8 @@ public class ContentController {
@PostMapping("/detail")
@ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId));
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody ContentQueryDetailDto dto) {
return ResponseResult.success(contentService.queryContentInfo(dto.getContentId()));
}
}

View File

@@ -1,6 +1,8 @@
package com.cool.store.controller;
import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.dto.partner.PartnerGetPassLetterDetailDto;
import com.cool.store.dto.partner.PartnerQueryInterviewDto;
import com.cool.store.exception.ApiException;
import com.cool.store.request.CreateAppointmentReq;
import com.cool.store.request.ModifyInterviewTimeReq;
@@ -30,8 +32,8 @@ public class InterviewController {
@PostMapping("/queryByPartnerId")
@ApiOperation("根据用户id查询面试信息")
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody String partnerId) {
return ResponseResult.success(interviewService.queryByPartnerId(partnerId));
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody PartnerQueryInterviewDto dto) {
return ResponseResult.success(interviewService.queryByPartnerId(dto.getPartnerId()));
}
@PostMapping("/enter")
@@ -42,8 +44,8 @@ public class InterviewController {
@PostMapping("/passLetter/detail")
@ApiOperation("通过函详情")
public ResponseResult<PartnerPassLetterDetailVO> passLetterDetail(@RequestParam String interviewPlanId) {
return ResponseResult.success(interviewService.passLetterDetail(interviewPlanId));
public ResponseResult<PartnerPassLetterDetailVO> passLetterDetail(@RequestBody PartnerGetPassLetterDetailDto dto) {
return ResponseResult.success(interviewService.passLetterDetail(dto.getInterviewPlanId()));
}
@PostMapping("/appointment/submit")