Commit 1df2de00 authored by hongguangwu's avatar hongguangwu

MVP1.7.12-对接瓜子接口

parent 23242aa6
......@@ -66,7 +66,7 @@ public class TAttaInfo extends BaseEntity {
* BANK_B(银行卡反面) LEAVE_PRO(离职证明) EXAM_RPT(体检报告)
*/
@NotBlank(message = "关系类型不能为空")
@Length(max = 20, message = "关系类型不能超过2个字符")
@Length(max = 20, message = "关系类型不能超过20个字符")
@Schema(description = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置 31入离职登记身份证正面 32入离职登记身份证反面)")
private String relationType;
/**
......
......@@ -63,7 +63,7 @@ public class FileUploadController {
@ApiImplicitParam(name = "domain", value = "实体id(传入就插入对应关系,用于编辑)", required = false, paramType = "form")
})*/
@PostMapping(value = "/ossUploadFile")
public R<T> uploadImg(@RequestBody MultipartFile file, String filePath, Integer type, String domain) throws IOException {
public R<T> uploadImg(@RequestBody MultipartFile file, String filePath, String type, String domain) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domain,CommonConstants.ZERO_STRING);
}
......@@ -81,7 +81,7 @@ public class FileUploadController {
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n" +
"\t")
@PostMapping(value = "/uploadFileReturnAtta")
public R<T> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
public R<T> uploadFileReturnAtta(@RequestBody MultipartFile file, String filePath, String type, String domainId) throws IOException {
return fileUploadService.uploadAsso(file,filePath,type,domainId,CommonConstants.ONE_STRING);
}
......
......@@ -16,11 +16,11 @@ import java.io.IOException;
*/
public interface FileUploadService {
R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException;
R<FileVo> uploadImg(MultipartFile file, String filePath, String type, String domain) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException;
R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, String type, String domainId) throws IOException;
R<FileVo> createQrCode(String domainId, String url, String name);
R<T> uploadAsso(MultipartFile file, String filePath, Integer type, String domain, String uploadType);
R<T> uploadAsso(MultipartFile file, String filePath, String type, String domain, String uploadType);
}
......@@ -48,7 +48,7 @@ public class FileUploadServiceImpl implements FileUploadService {
private final SysConfigLimitMapper configLimitMapper;
@Override
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, Integer type, String domainId) throws IOException {
public R<TAttaInfo> uploadFileReturnAtta(MultipartFile file, String filePath, String type, String domainId) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
......@@ -76,7 +76,7 @@ public class FileUploadServiceImpl implements FileUploadService {
if (flag) {
log.info("文件:" + fileName + "上传到存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
attaInfo.setRelationType(type);
try {
attaInfo.setDomainId(domainId);
......@@ -107,7 +107,7 @@ public class FileUploadServiceImpl implements FileUploadService {
}
@Override
public R<FileVo> uploadImg(MultipartFile file, String filePath, Integer type, String domain) throws IOException {
public R<FileVo> uploadImg(MultipartFile file, String filePath, String type, String domain) throws IOException {
if (null == file) {
return R.failed("文件删除异常,请重新上传!");
}
......@@ -136,7 +136,7 @@ public class FileUploadServiceImpl implements FileUploadService {
if (flag) {
log.info("文件:" + fileName + "上传至存储空间" + ossUtil.getBucketName() + "成功!");
attaInfo = initUnitAttaForInsert(fileName, key, file.getSize());
attaInfo.setRelationType(String.valueOf(type));
attaInfo.setRelationType(type);
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
......@@ -159,7 +159,7 @@ public class FileUploadServiceImpl implements FileUploadService {
}
}
private R<FileVo> uploadImg2(InputStream fileIn, String filePath, Integer type, String domain,String fileName) throws IOException {
private R<FileVo> uploadImg2(InputStream fileIn, String filePath, String type, String domain,String fileName) throws IOException {
if (null == fileIn) {
return R.failed("文件上传异常,请重新上传!");
}
......@@ -175,7 +175,7 @@ public class FileUploadServiceImpl implements FileUploadService {
URL url;
if (flag) {
attaInfo = initUnitAttaForInsert(fileName, key, 0);
attaInfo.setRelationType(String.valueOf(type));
attaInfo.setRelationType(type);
try {
attaInfo.setDomainId(domain);
attaInfo = tAttaInfoService.add(attaInfo);
......@@ -233,7 +233,7 @@ public class FileUploadServiceImpl implements FileUploadService {
}
InputStream in = codeUtil.createPng(url);
try {
return this.uploadImg2(in,"mvp_qr",CommonConstants.EIGHT_INT,domainId,"output_qrcode.png");
return this.uploadImg2(in,"mvp_qr",CommonConstants.EIGHT_STRING,domainId,"output_qrcode.png");
} catch (IOException e) {
log.error("获取二维码失败",e);
return R.failed(CommonConstants.RESULT_DATA_FAIL);
......@@ -255,11 +255,11 @@ public class FileUploadServiceImpl implements FileUploadService {
* @return
**/
@Override
public R uploadAsso(MultipartFile file, String filePath, Integer type, String domain, String uploadType){
public R uploadAsso(MultipartFile file, String filePath, String type, String domain, String uploadType){
return getR(file, filePath, type, domain, uploadType);
}
public R getR(MultipartFile file, String filePath, Integer type, String domain, String uploadType) {
public R getR(MultipartFile file, String filePath, String type, String domain, String uploadType) {
maxLimit = configLimitMapper.getSysConfigLimitByKey("UPLOAD_MAX_LIMIT");
if (atomicInteger.incrementAndGet() <= maxLimit){
try {
......
......@@ -269,7 +269,7 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
this.save(tElecEmployeeInfo);
insMap.put(idCard + CommonConstants.DOWN_LINE_STRING + dataType, tElecEmployeeInfo.getId());
}
fileUploadService.uploadImg(fileCovertMultipartFile(targetFile), "", CommonConstants.EIGHT_INT, insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
fileUploadService.uploadImg(fileCovertMultipartFile(targetFile), "", CommonConstants.EIGHT_STRING, insMap.get(idCard + CommonConstants.DOWN_LINE_STRING + dataType));
}
// 关流顺序,先打开的后关闭
......
......@@ -35,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -788,12 +789,42 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
emp.setFileProvince(gzEmpInfo.getFileProvince());
emp.setFileCity(gzEmpInfo.getFileCity());
emp.setFileTown(gzEmpInfo.getFileTown());
emp.setFileTown(gzEmpInfo.getFileTown());*/
// 按gzEmpInfo实体类顺序转化:
emp.setEmpName(gzEmpInfo.getName());
emp.setEmpIdcard(gzEmpInfo.getEmpIdcard());
emp.setIdProvince(gzEmpInfo.getNativePlaceAreaId());
emp.setIdCity(null);
emp.setIdTown(null);
// 民族
emp.setEmpNational(getDictValue(dictMap, gzEmpInfo.getEthnicGrpCd(), ExcelAttributeConstants.GZ_ETHNIC_GRP_CD));
// 婚姻状态
emp.setEmpMarriStatus(getDictValue(dictMap, gzEmpInfo.getMarStatus(), ExcelAttributeConstants.GZ_MAR_STATUS));
// 政治面貌
emp.setPoliticalStatus(getDictValue(dictMap, gzEmpInfo.getPoliticalSta(), ExcelAttributeConstants.GZ_POLITICAL_STA));
// 政治面貌
emp.setPoliticalStatus(getDictValue(dictMap, gzEmpInfo.getPoliticalSta(), ExcelAttributeConstants.GZ_POLITICAL_STA));
emp.setValidityStart(gzEmpInfo.getNidStartDate());
emp.setValidityEnd(gzEmpInfo.getNidExpiryDate());
emp.setEmpPhone(gzEmpInfo.getPhone());
emp.setEmpEmail(gzEmpInfo.getMail());
if (Common.isNotNull(gzEmpInfo.getStateAreaId())) {
emp.setContactProvince(String.valueOf(gzEmpInfo.getStateAreaId()));
if (Common.isNotNull(gzEmpInfo.getStateAreaId())) {
emp.setContactCity(String.valueOf(gzEmpInfo.getCityAreaId()));
} else {
emp.setContactCity(null);
}
if (Common.isNotNull(gzEmpInfo.getCountyAreaId())) {
emp.setContactTown(String.valueOf(gzEmpInfo.getCountyAreaId()));
} else {
emp.setContactTown(null);
}
}
/*emp.setEmpIdcard(gzEmpInfo.getEmpIdcard());
if (employee != null) {
empId = employee.getId();
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID);
......@@ -883,8 +914,29 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
emp.setContactCity(info.getContactCityValue());
emp.setContactTown(info.getContactTownValue());
emp.setFirstWorkFlag(info.getFirstWorkFlagValue());
emp.setHaveQualification(info.getHaveQualificationValue());
emp.setFileSource(CommonConstants.SEVEN_STRING);*/
emp.setHaveQualification(info.getHaveQualificationValue());*/
emp.setFileSource(CommonConstants.EIGHT_STRING);
}
/**
* @param dictMap 总字典Map
* @param gzValue 瓜子字段值
* @param dictType 字典类型
* @Description: 通用获取字典值的方法
* @Author: hgw
* @Date: 2025/6/23 17:56
* @return: java.lang.String
**/
private String getDictValue(Map<String, Map<String, String>> dictMap, String gzValue, String dictType) {
if (Common.isNotNull(gzValue)) {
Map<String, String> dictValueMap = dictMap.get(dictType);
if (dictValueMap != null && dictValueMap.get(gzValue) != null) {
return dictValueMap.get(gzValue);
}
}
return null;
}
}
......@@ -57,6 +57,7 @@ security:
- /employeeregistrationpre/getGzEmployeeInfo
- /employeeregistrationpre/judgeIsSimple
- /tgzempinfo/getInfoByOfferId
- /tgzempinfo/saveTGzEmpInfo
- /gz/core/saveOfferInfo
- /gz/core/getGzBank
......
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