Merge branch 'cc_20230520_partner' of http://gitlab.coolcollege.cn/hangzhou/java/coolstore-partner-manage into cc_20230520_partner

# Conflicts:
#	coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyPartnerInterviewMapper.java
#	coolstore-partner-webb/src/main/resources/application-dev.properties
This commit is contained in:
俞扬
2023-06-16 11:48:29 +08:00
106 changed files with 2030 additions and 294 deletions

View File

@@ -114,4 +114,8 @@ public class CommonConstants {
public static final String FOLLOW = "follow";
public static final String PENDING = "pending";
public static final String ALLOCATION = "allocation";
public static final String TRANSFER = "transfer";
}

View File

@@ -0,0 +1,17 @@
package com.cool.store.enums;
/**
* 动态栏目枚举类
*/
public enum ContentSubjectEnum {
HY_CULTURE("沪姨文化"),
PARTNER_SAYS("加盟商说"),
BRAND_NEWS("品牌动态")
;
private String subjectName;
ContentSubjectEnum(String subjectName) {
this.subjectName = subjectName;
}
}

View File

@@ -0,0 +1,16 @@
package com.cool.store.enums;
/**
* 动态类型(图文/视频)
*/
public enum ContentTypeEnum {
VIDEO("视频"),
IMAGE("图文")
;
private String type;
ContentTypeEnum(String type) {
this.type = type;
}
}

View File

@@ -44,17 +44,18 @@ public enum ErrorCodeEnum {
USER_GROUP_NAME_EXIST(1021076, "用户分组名称已存在", null),
USER_GROUP_NOT_EXIST(1021077, "用户分组不存在", null),
GET_INFO_ERROR(1021078, "获取信息异常", null),
GET_PHONENUMBER_INFO_ERROR(1021079, "手机号归属地获取异常", null),
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
PARAMS_REQUIRED(400002, "参数缺失!", null),
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
LINE_ID_IS_NOT_EXIST(500001, "线索ID不存在", null),
WORK_FLOW_STAGE_PASS_ERROR(500002, "通过错误,非对应阶段!", null),
PARTNER_USER_NOT_EXIST(500003, "加盟商用户信息不存在!", null),
ZONE_NOT_EXIST(500004, "战区不存在!", null),
PARTNER_BASEINFO_NOT_EXIST(500005, "基本信息不存在!", null),
INTENT_INFO_NOT_EXIST(500006, "意向信息不存在!", null),
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),

View File

@@ -30,8 +30,8 @@ public enum WorkflowStageEnum {
public static final HashMap<String,String> getWorkflowStageMap(){
HashMap<String, String> result = new HashMap<>();
result.put(INTENT.getCode(),WorkflowStatusEnum.INTENT_3.getCode());
result.put(RESERVATION.getCode(),WorkflowStatusEnum.RESERVATION_6.getCode());
result.put(INTERVIEW.getCode(),WorkflowStatusEnum.INTERVIEW_6.getCode());
result.put(RESERVATION.getCode(),WorkflowStatusEnum.RESERVATION_7.getCode());
result.put(INTERVIEW.getCode(),WorkflowStatusEnum.INTERVIEW_7.getCode());
return result;
}

View File

@@ -14,16 +14,17 @@ public enum WorkflowStatusEnum {
//预约面试阶段
RESERVATION_0("0","待预约"),
RESERVATION_6("6","到期未预约"),
RESERVATION_1("1","待审核"),
RESERVATION_7("7","到期未预约"),
//合格资格面试
INTERVIEW_1("1","待面试"),
INTERVIEW_2("2","已开始"),
INTERVIEW_3("3","待审核"),
INTERVIEW_4("4","审核中"),
INTERVIEW_5("5","审核通过"),
INTERVIEW_6("6","拒绝"),
INTERVIEW_2("2","待面试"),
INTERVIEW_3("3","已开始"),
INTERVIEW_4("4","待审核"),
INTERVIEW_5("5","审核中"),
INTERVIEW_6("6","审核通过"),
INTERVIEW_7("7","拒绝"),
;

View File

@@ -94,10 +94,11 @@ public class PDFUtils {
* @param color 字体颜色
*/
private static void addContent(PdfReader reader, OutputStream outputStream, String content, float x, float y, BaseFont baseFont, float fontSize, int fontStyle, Color color) {
PdfStamper stamper = null;
try {
//生成 paragraph 并放在正确位置
//抠模板
PdfStamper stamper = new PdfStamper(reader, outputStream);
stamper = new PdfStamper(reader, outputStream);
PdfContentByte over = stamper.getOverContent(1);
Font font = new Font(baseFont, fontSize, fontStyle, color);
Paragraph insertContent = new Paragraph(content, font);
@@ -110,6 +111,14 @@ public class PDFUtils {
stamper.close();
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
if (stamper != null) {
stamper.close();
}
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
}

View File

@@ -22,19 +22,16 @@ public class PassLetterUtils {
* 返回通过函编码
* @param partnerName 加盟商姓名
* @param verifyCity 审批城市
* @param passCode 通过函编码
* @param passTime 审批通过时间
*/
public static String genPassLetter(String partnerName, String passCode, String verifyCity, DateTime passTime) {
String randomNum = RandomUtil.randomNumbers(5);
if (ObjectUtil.isEmpty(passCode)) {
passCode = "HSAY" + DateUtil.format(passTime, "yyMMdd") + "-" + randomNum;
}
public static ByteArrayOutputStream genPassLetter(String partnerName, String passCode, String verifyCity, DateTime passTime) {
String passTimeStr = DateUtil.format(passTime, "yyyy年MM月dd日");
Document document = new Document();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
//1. 创建 pdf document
// ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
FileOutputStream outputStream = new FileOutputStream("passLetter.pdf");
// FileOutputStream outputStream = new FileOutputStream("passLetter.pdf");
PdfWriter.getInstance(document, outputStream);
document.open();
@@ -44,21 +41,38 @@ public class PassLetterUtils {
document.close();
//3. 填写通过函模板信息
addContentToPdf(partnerName + " 先生/女士", 122, 640);
addContentToPdf(passCode, 122, 558);
addContentToPdf(verifyCity, 155, 494);
addContentToPdf("60天", 135, 450);
addContentToPdf(passTimeStr, 393, 152);
return passCode;
addContentToPdf(outputStream, partnerName + " 先生/女士", 122, 640);
addContentToPdf(outputStream, passCode, 122, 558);
addContentToPdf(outputStream, verifyCity, 155, 494);
addContentToPdf(outputStream, "60天", 135, 450);
addContentToPdf(outputStream, passTimeStr, 393, 152);
return outputStream;
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
try {
document.close();
outputStream.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
private static void addContentToPdf(String content, float x, float y) {
/**
* 生成 passCode 的方法,拆分出来方便单独获取 passCode
* @return
*/
public static String genPassCode(DateTime passTime) {
String randomNum = RandomUtil.randomNumbers(5);
String passCode = "HSAY" + DateUtil.format(passTime, "yyMMdd") + "-" + randomNum;
return passCode;
}
private static void addContentToPdf(ByteArrayOutputStream outputStream, String content, float x, float y) {
try {
PdfReader pdfReader = new PdfReader(Files.newInputStream(Paths.get("passLetter.pdf")));
OutputStream outputStream = Files.newOutputStream(Paths.get("passLetter.pdf"));
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
PdfReader pdfReader = new PdfReader(inputStream);
PDFUtils.putParagraphAbsolutely(pdfReader, outputStream, x, y, content, 20, new Color(255, 82,25));
} catch (IOException e) {
throw new RuntimeException(e);