Commit a32a5e87 authored by fangxinjiang's avatar fangxinjiang

Merge branch 'MVP1.7.18' into MVP1.7.18-fxj

parents 96dd0a9e 071845e2
......@@ -33,7 +33,7 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "600" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "200" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
dapr.io/sidecar-listen-addresses: "0.0.0.0"
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -11,9 +11,9 @@ spec: # 资源规范字段
protocol: TCP # 协议
targetPort: 5008 # 容器暴露的端口
name: http-batch # 端口名称
- port: 4089 # service 端口
- port: 3500 # service 端口
protocol: TCP # 协议
targetPort: 4089 # 容器暴露的端口
targetPort: 3500 # 容器暴露的端口
name: http-batch-dapr
selector: # 选择器
app: yifu-batch # 资源名称
......
......@@ -33,7 +33,7 @@ spec: # 资源规范字段
#dapr.io/sidecar-memory-limit: "800Mi" #Dapr sidecar可以使用的最大内存量。默认情况下未设置 请参阅 https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/ 的有效值。
#dapr.io/sidecar-cpu-request: 1 #Dapr sidecar要求的 CPU 数量
#dapr.io/sidecar-memory-request #Dapr sidecar 请求的内存数量
dapr.io/http-max-request-size: "100" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-max-request-size: "600" #增加http和grpc服务器请求正文参数的最大大小,单位为MB,以处理大文件的上传。 默认值为 4 MB
dapr.io/http-read-buffer-size: "16" #Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a Too big request header
#dapr.io/sidecar-listen-addresses: "0.0.0.0" 开通外部访问,仅限测试环境
# 更多dapr配置请参考 https://www.bookstack.cn/read/dapr-1.5-zh/cc77b74e2cc2f4d4.md
......
......@@ -618,7 +618,7 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(insurancePreVo.getId())) {
newMap.put(insurancePreVo.getId(), insurancePreVo);
}
if (CommonConstants.FOUR_STRING.equals(insurancePreVo.getModelType())) {
if (!CommonConstants.FOUR_STRING.equals(insurancePreVo.getModelType())) {
// 初始化信息
initInsurancePreInfo(employeeRegistrationPre, insurancePreVo, user, id);
// 1:重复性判断
......
......@@ -141,4 +141,33 @@ public class TElectronicArchiveDetailController {
tElectronicArchiveDetailService.selectedExportArchives(requestList, response);
}
/**
* 根据查询条件导出电子档案
* <p>
* 功能说明:
* 1. 根据查询条件(姓名、身份证、项目编码、项目名称、客户名称、客户编码、资料类型、档案所在地等)查询电子档案明细
* 2. 导出查询结果中所有人员的电子档案附件
* 3. 导出格式与批量下载功能保持一致
* 4. 一级文件夹:项目编码-姓名-身份证
* 5. 二级文件夹:资料类型,该文件夹下为具体附件
* 6. 压缩包命名规则为:电子档案条件导出_时间戳.zip
* 7. 压缩包中包含:所有人员的项目编码-姓名-身份证号的文件夹 和 一个结果反馈表(同级)
* 8. 只导出TAttaInfo表中status为可用(0)的附件
* </p>
*
* @param searchVo 查询条件
* @param response HTTP响应
* @author huych
* @date 2025-12-30
*/
@Operation(summary = "根据查询条件导出电子档案", description = "根据查询条件导出电子档案,支持姓名、身份证、项目、客户、资料类型等条件")
@PostMapping("/exportByCondition")
public void exportArchivesByCondition(
@RequestBody TElectronicArchiveDetailSearchVo searchVo,
HttpServletResponse response) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
tElectronicArchiveDetailService.exportArchivesByCondition(searchVo, response);
}
}
......@@ -55,4 +55,11 @@ public interface TElectronicArchiveDetailService extends IService<TElectronicArc
*/
void selectedExportArchives(List<ArchiveSelectedExportRequestVO> requestList, HttpServletResponse response);
/**
* 根据查询条件导出电子档案
* @param searchVo 查询条件
* @param response HTTP响应
*/
void exportArchivesByCondition(TElectronicArchiveDetailSearchVo searchVo, HttpServletResponse response);
}
......@@ -1019,4 +1019,306 @@ public class TElectronicArchiveDetailServiceImpl extends ServiceImpl<TElectronic
}
return false;
}
/**
* 根据查询条件导出电子档案
* <p>
* 功能说明:
* 1. 根据查询条件查询符合条件的电子档案明细列表
* 2. 导出所有查询结果的电子档案附件
* 3. 导出格式与批量下载功能保持一致
* 4. 一级文件夹:项目编码-姓名-身份证
* 5. 二级文件夹:资料类型,该文件夹下为具体附件
* 6. 压缩包命名规则为:电子档案条件导出_时间戳.zip
* 7. 只导出status为可用(1)的明细和可用(0)的附件
* </p>
*
* @param searchVo 查询条件
* @param response HTTP响应
* @author huych
* @date 2025-12-30
*/
@Override
public void exportArchivesByCondition(TElectronicArchiveDetailSearchVo searchVo, HttpServletResponse response) {
// 反馈列表
List<ArchiveDownloadFeedbackVO> feedbackList = new ArrayList<>();
// 用于存储需要导出的档案及其附件
Map<String, ArchiveDownloadInfo> downloadMap = new LinkedHashMap<>();
try {
// 1. 根据查询条件查询电子档案明细列表
initSearchVo(searchVo);
// 构建查询条件
LambdaQueryWrapper<TElectronicArchiveDetail> wrapper = buildQueryWrapper(searchVo);
// 查询符合条件的档案明细列表
List<TElectronicArchiveDetail> detailList = baseMapper.selectList(wrapper);
// 2. 检查是否有查询结果
if (CollUtil.isEmpty(detailList)) {
response.setContentType("application/json;charset=UTF-8");
response.getWriter().write("{\"code\":1,\"msg\":\"未找到符合条件的电子档案\"}");
return;
}
log.info("根据查询条件找到{}条电子档案明细,开始准备导出", detailList.size());
// 3. 遍历每个明细,准备下载信息
for (TElectronicArchiveDetail detail : detailList) {
try {
prepareExportByDetail(detail, downloadMap, feedbackList);
} catch (Exception e) {
log.error("准备导出档案失败,明细ID:{},姓名:{},身份证:{}",
detail.getId(), detail.getEmpName(), detail.getEmpIdcard(), e);
feedbackList.add(createExportFeedbackVO(detail, "系统异常:" + e.getMessage()));
}
}
// 4. 检查是否有可导出的档案
if (downloadMap.isEmpty()) {
response.setContentType("application/json;charset=UTF-8");
response.getWriter().write("{\"code\":1,\"msg\":\"没有可导出的档案附件\"}");
return;
}
// 5. 设置响应头
String fileName = "电子档案条件导出_" +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + ".zip";
response.setContentType("application/zip");
response.setCharacterEncoding("UTF-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION,
"attachment; filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 6. 创建ZIP输出流
try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) {
// 7. 下载并打包档案文件
for (Map.Entry<String, ArchiveDownloadInfo> entry : downloadMap.entrySet()) {
String folderName = entry.getKey();
ArchiveDownloadInfo downloadInfo = entry.getValue();
try {
downloadArchiveFiles(zipOut, folderName, downloadInfo);
// 更新反馈状态为成功
updateExportFeedbackStatus(feedbackList, downloadInfo, "成功", "");
} catch (Exception e) {
log.error("导出档案文件失败,文件夹:{}", folderName, e);
// 更新反馈状态为失败
updateExportFeedbackStatus(feedbackList, downloadInfo, "失败", "导出文件失败:" + e.getMessage());
}
}
// 8. 生成并添加反馈Excel表
addFeedbackExcel(zipOut, feedbackList);
zipOut.finish();
}
} catch (Exception e) {
log.error("根据查询条件导出电子档案失败", e);
}
}
/**
* 构建查询条件
*
* @param searchVo 查询VO
* @return 查询条件
*/
private LambdaQueryWrapper<TElectronicArchiveDetail> buildQueryWrapper(TElectronicArchiveDetailSearchVo searchVo) {
LambdaQueryWrapper<TElectronicArchiveDetail> wrapper = Wrappers.<TElectronicArchiveDetail>lambdaQuery()
.eq(TElectronicArchiveDetail::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TElectronicArchiveDetail::getStatus, ArchiveConstants.DETAIL_STATUS_ENABLED);
// 姓名(模糊查询)
if (StrUtil.isNotBlank(searchVo.getEmpName())) {
wrapper.like(TElectronicArchiveDetail::getEmpName, searchVo.getEmpName());
}
// 身份证号(精确查询)
if (StrUtil.isNotBlank(searchVo.getEmpIdcard())) {
wrapper.eq(TElectronicArchiveDetail::getEmpIdcard, searchVo.getEmpIdcard());
}
// 项目编码(精确查询)
if (StrUtil.isNotBlank(searchVo.getDeptNo())) {
wrapper.eq(TElectronicArchiveDetail::getDeptNo, searchVo.getDeptNo());
}
// 项目名称(模糊查询)
if (StrUtil.isNotBlank(searchVo.getDeptName())) {
wrapper.like(TElectronicArchiveDetail::getDeptName, searchVo.getDeptName());
}
// 客户名称(模糊查询)
if (StrUtil.isNotBlank(searchVo.getCustomerName())) {
wrapper.like(TElectronicArchiveDetail::getCustomerName, searchVo.getCustomerName());
}
// 客户编码(精确查询)
if (StrUtil.isNotBlank(searchVo.getCustomerCode())) {
wrapper.eq(TElectronicArchiveDetail::getCustomerCode, searchVo.getCustomerCode());
}
// 资料类型(IN查询)
if (CollUtil.isNotEmpty(searchVo.getTypeList())) {
wrapper.and(w -> {
for (String type : searchVo.getTypeList()) {
w.or().like(TElectronicArchiveDetail::getMaterialType, type);
}
});
}
// 档案所在地-省
if (searchVo.getFileProvince() != null) {
wrapper.eq(TElectronicArchiveDetail::getFileProvince, searchVo.getFileProvince());
}
// 档案所在地-市
if (searchVo.getFileCity() != null) {
wrapper.eq(TElectronicArchiveDetail::getFileCity, searchVo.getFileCity());
}
// 档案所在地-县
if (searchVo.getFileTown() != null) {
wrapper.eq(TElectronicArchiveDetail::getFileTown, searchVo.getFileTown());
}
// 创建人
if (StrUtil.isNotBlank(searchVo.getCreateBy())) {
wrapper.eq(TElectronicArchiveDetail::getCreateBy, searchVo.getCreateBy());
}
// 创建时间区间
if (searchVo.getCreateTimes() != null && searchVo.getCreateTimes().length == 2) {
if (searchVo.getCreateTimes()[0] != null) {
wrapper.ge(TElectronicArchiveDetail::getCreateTime, searchVo.getCreateTimes()[0]);
}
if (searchVo.getCreateTimes()[1] != null) {
wrapper.le(TElectronicArchiveDetail::getCreateTime, searchVo.getCreateTimes()[1]);
}
}
return wrapper;
}
/**
* 准备单个明细的导出信息
*
* @param detail 档案明细
* @param downloadMap 下载信息Map
* @param feedbackList 反馈列表
*/
private void prepareExportByDetail(TElectronicArchiveDetail detail,
Map<String, ArchiveDownloadInfo> downloadMap,
List<ArchiveDownloadFeedbackVO> feedbackList) {
// 1. 查询该明细下所有可用附件
List<TAttaInfo> allAttaList = attaInfoService.list(Wrappers.<TAttaInfo>lambdaQuery()
.eq(TAttaInfo::getDomainId, detail.getId())
.eq(TAttaInfo::getRelationType, ArchiveConstants.ATTA_RELATION_TYPE_ZIP)
.eq(TAttaInfo::getStatus, ArchiveConstants.ATTA_STATUS_ENABLED));
// 2. 如果没有附件,添加失败反馈
if (CollUtil.isEmpty(allAttaList)) {
feedbackList.add(createExportFeedbackVO(detail, "该人员在此项目下没有可用的附件"));
return;
}
// 3. 构建文件夹名称:项目编码-姓名-身份证
String folderName = detail.getDeptNo() + "-" + detail.getEmpName() + "-" + detail.getEmpIdcard();
// 4. 按资料类型分组附件
Map<String, List<TAttaInfo>> materialTypeAttaMap = new LinkedHashMap<>();
for (TAttaInfo atta : allAttaList) {
String materialType = extractMaterialTypeFromPath(atta.getAttaSrc());
if (StrUtil.isBlank(materialType)) {
materialType = "其他";
}
materialTypeAttaMap.computeIfAbsent(materialType, k -> new ArrayList<>()).add(atta);
}
// 5. 添加到下载Map
ArchiveDownloadInfo downloadInfo = downloadMap.get(folderName);
if (downloadInfo == null) {
downloadInfo = new ArchiveDownloadInfo();
downloadInfo.setDetail(detail);
downloadInfo.setMaterialTypeAttaMap(materialTypeAttaMap);
downloadMap.put(folderName, downloadInfo);
} else {
// 合并资料类型附件(理论上不会出现重复的folderName,但为了安全起见)
downloadInfo.getMaterialTypeAttaMap().putAll(materialTypeAttaMap);
}
downloadInfo.setMaterialType(String.join(",", materialTypeAttaMap.keySet()));
// 6. 添加成功的反馈(状态暂时为"处理中",实际导出完成后更新)
feedbackList.add(createExportSuccessFeedbackVO(detail, materialTypeAttaMap.keySet()));
}
/**
* 创建导出失败反馈VO
*
* @param detail 档案明细
* @param failReason 失败原因
* @return 反馈VO
*/
private ArchiveDownloadFeedbackVO createExportFeedbackVO(TElectronicArchiveDetail detail, String failReason) {
ArchiveDownloadFeedbackVO feedback = new ArchiveDownloadFeedbackVO();
feedback.setEmpName(detail.getEmpName());
feedback.setEmpIdcard(detail.getEmpIdcard());
feedback.setDeptNo(detail.getDeptNo());
feedback.setDeptName(detail.getDeptName());
feedback.setMaterialType(detail.getMaterialType());
feedback.setDownloadStatus("失败");
feedback.setFailReason(failReason);
return feedback;
}
/**
* 创建导出成功反馈VO
*
* @param detail 档案明细
* @param materialTypes 资料类型集合
* @return 反馈VO
*/
private ArchiveDownloadFeedbackVO createExportSuccessFeedbackVO(TElectronicArchiveDetail detail,
Set<String> materialTypes) {
ArchiveDownloadFeedbackVO feedback = new ArchiveDownloadFeedbackVO();
feedback.setEmpName(detail.getEmpName());
feedback.setEmpIdcard(detail.getEmpIdcard());
feedback.setDeptNo(detail.getDeptNo());
feedback.setDeptName(detail.getDeptName());
feedback.setMaterialType(String.join(",", materialTypes));
feedback.setDownloadStatus("处理中");
feedback.setFailReason("");
return feedback;
}
/**
* 更新导出反馈状态
*
* @param feedbackList 反馈列表
* @param downloadInfo 下载信息
* @param status 状态
* @param failReason 失败原因
*/
private void updateExportFeedbackStatus(List<ArchiveDownloadFeedbackVO> feedbackList,
ArchiveDownloadInfo downloadInfo,
String status,
String failReason) {
TElectronicArchiveDetail detail = downloadInfo.getDetail();
for (ArchiveDownloadFeedbackVO feedback : feedbackList) {
if (feedback.getEmpName().equals(detail.getEmpName()) &&
feedback.getEmpIdcard().equals(detail.getEmpIdcard()) &&
feedback.getDeptNo().equals(detail.getDeptNo())) {
feedback.setDownloadStatus(status);
feedback.setFailReason(failReason);
}
}
}
}
......@@ -1032,7 +1032,8 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
R<EkpDeptContractInfoVo> info = ekpDaprUtils.selectContractInfoByDetptNo(infoVo);
if (Common.isNotNull(info) && Common.isNotNull(info.getData())) {
EkpDeptContractInfoVo returnVo = info.getData();
employeeContractPreVo.setContractEnd(returnVo.getContractEndTime());
employeeContractPreVo.setContractEnd(null != returnVo.getContractEndTime() ?
DateUtil.stringToDate(returnVo.getContractEndTime()) : null);
} else {
employeeContractPreVo.setContractEnd(null);
}
......
......@@ -21,7 +21,7 @@ public class EkpDeptContractInfoVo implements Serializable {
/**
* 合同截至日期
**/
private Date contractEndTime;
private String contractEndTime;
/**
* 项目编码
**/
......
......@@ -630,16 +630,19 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
//入账方式:0:逐笔记账;2:并笔记账
bizContent.setSettleMode("0");
//总笔数
bizContent.setInstrCount(1);
bizContent.setInstrCount(2);
//总金额:以分为单位
bizContent.setTotalAmount(1L);
bizContent.setTotalAmount(2L);
//报文压缩内容:zip算法压缩rd区后再BASE64编码,约定取第一个文件
bizContent.setZip("");
List<MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2> rd = new ArrayList<>();
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 rdV2 = buildPayRecord(seqNo);
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 rdV2 = buildPayRecord();
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 rdV1 = buildPayRecord1();
rd.add(rdV2);
rd.add(rdV1);
bizContent.setRd(rd);
request.setServiceUrl("https://gw.open.icbc.com.cn/api/mybank/enterprise/pay/payent/V2");
request.setBizContent(bizContent);
......@@ -701,14 +704,14 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
}
}
private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecord(String seqNo) {
private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecord() {
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord =
new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2();
//业务唯一编号:相同指令不重复
payRecord.setUniBusiId(generateUniBusiId());
//指令顺序号:每笔指令的序号,本包内不重复
payRecord.setiSeqNo(seqNo);
payRecord.setiSeqNo(generateSeqNo());
//预约日期
// payRecord.setScheduleDate("20251126");
//对公对私标志:0:对公;1:个人
......@@ -728,9 +731,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
payRecord.setPayeeCnname("安徽易服智享信息科技有限公司");
//收款方账户英文名称
// payRecord.setPayeeEnname("");
//收款方系统内外标志:1:工行;2:他行
//收款方系统内外标志:1:工行;2:他行 必填
payRecord.setIoFlag("1");
//同城异地标志:1:同城;2:异地
//同城异地标志:1:同城;2:异地 非必填
payRecord.setSameCityFlag("1");
//收款方所在城市名称
// payRecord.setPayeeCity("合肥市");
......@@ -745,7 +748,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
//用途中文描述:用途代码和用途中文描述二选一上送
payRecord.setPurpose("转账");
//摘要
payRecord.setSummary("测试转账");
payRecord.setSummary("11");
//英文备注
// payRecord.setSummaryEn(record.getSummaryEn());
//附言:不得有非法字符,包括 ' " : %
......@@ -773,10 +776,55 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return payRecord;
}
private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecord1() {
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord =
new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2();
//业务唯一编号:相同指令不重复
payRecord.setUniBusiId(generateUniBusiId());
//指令顺序号:每笔指令的序号,本包内不重复
payRecord.setiSeqNo(generateSeqNo());
//预约日期
// payRecord.setScheduleDate("20251126");
//对公对私标志:0:对公;1:个人
payRecord.setPayeeType("1");
//币种:ISO币种,仅支持人民币
payRecord.setCurrency("CNY");
//记账处理方式:1:加急;2:普通;3:跨行快汇
payRecord.setPayType("1");
//付款方账户名称
payRecord.setPayerCnname("安徽皖信人力资源管理有限公司");
payRecord.setPayerAccount("1302010109024596014");
//付款方账户英文名称:账号付款时,中文名称、英文名称至少输入一项
payRecord.setPayerEnname("");
//收款方账号:收方不支持NRA账号
payRecord.setPayeeAccount("6222620250010165293");
//收款方账户名称
payRecord.setPayeeCnname("李连琴");
//收款方账户英文名称
// payRecord.setPayeeEnname("");
//收款方系统内外标志:1:工行;2:他行 必填
payRecord.setIoFlag("2");
//同城异地标志:1:同城;2:异地 非必填
payRecord.setSameCityFlag("");
payRecord.setAmount(1L);
payRecord.setPurpose("转账");
//摘要
payRecord.setSummary("12");
//收款方行号:跨行指令要求对方行行号和行名上送正确
payRecord.setPayeeBankNo("301290000007");
//收款方行名
payRecord.setPayeeBankName("交通银行股份有限公司");
return payRecord;
}
private String generateUniBusiId() {
return "UNI" + System.currentTimeMillis() + ThreadLocalRandom.current().nextInt(1000, 9999);
}
private String generateSeqNo() {
return "AHWX" + System.currentTimeMillis() + ThreadLocalRandom.current().nextInt(1000, 9999);
}
private void initValue(MybankEnterpriseTradeQhisdResponseV1.MybankEnterpriseTradeQhisdResponseRdV1 entry,
EKPEntryPushParam pushParam,String bankName,String bankNo) throws ParseException {
pushParam.setFd_recipName(entry.getRecipName());
......
......@@ -9,6 +9,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 参保人员信息VO
......@@ -85,4 +86,9 @@ public class UnFundInfoVo implements Serializable {
*/
private BigDecimal providentCardinal;
/**
* 公积金起缴日期
*/
private Date providentStart;
}
package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 参保人员信息VO
......@@ -65,4 +71,59 @@ public class UnSocialFundInfoVo implements Serializable {
*/
private String dispatchTime;
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "养老起缴日期", isDate = true)
@Schema(description = "养老起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老起缴日期")
private Date pensionStart;
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "医疗起缴日期", isDate = true)
@Schema(description = "医疗起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗起缴日期")
private Date medicalStart;
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "失业起缴日期", isDate = true)
@Schema(description = "失业起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业起缴日期")
private Date unemployStart;
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "工伤起缴日期", isDate = true)
@Schema(description = "工伤起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤起缴日期")
private Date workInjuryStart;
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "生育起缴日期", isDate = true)
@Schema(description = "生育起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育起缴日期")
private Date birthStart;
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "大病起缴日期", isDate = true)
@Schema(description = "大病起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病起缴日期")
private Date bigailmentStart;
@ExcelAttribute(name = "委托备注", maxLength = 100)
@Schema(description = "委托备注")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("委托备注")
private String trustRemark;
@ExcelAttribute(name = "备案基数", maxLength = 255)
@Schema(description = "备案基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("备案基数")
private String recordBase;
}
......@@ -1363,6 +1363,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
String cellValue;
String key;
String newValue;
String[] qianMingArr;
for (Row row : sheet) {
for (Cell cell : row) {
if (cell.getCellType() == CellType.STRING) {
......@@ -1370,11 +1371,18 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if (cellValue.startsWith("${") && cellValue.endsWith("}")) {
// 正常的主表的单元格的占位,类似"${empName}"
key = cellValue.substring(2, cellValue.length() - 1);
newValue = getFieldValue(vo, key);
if (!CommonConstants.QIAN_MING.equals(key)) {
cell.setCellValue(newValue);
} else {
if (key.contains(CommonConstants.QIAN_MING)) {
qianMingArr = key.split("&");
if (qianMingArr.length>1) {
key = qianMingArr[1];
} else {
key = "empName";
}
newValue = getFieldValue(vo, key);
setQianMingStyle(cell, newValue);
} else {
newValue = getFieldValue(vo, key);
cell.setCellValue(newValue);
}
} else if (containsPlaceholder(cellValue)) {
// 非正常的主表的单元格的占位,类似"经办人:${empName} 单位名称${unitName}"
......
......@@ -162,6 +162,9 @@ public class ExcelToImage {
int targetHeight = 200; // 高度
// 创建缩放后的公章图像
if (seal == null) {
return image;
}
Image scaledSeal = seal.getScaledInstance(targetWidth, targetHeight, Image.SCALE_SMOOTH);
BufferedImage resizedSeal = new BufferedImage(targetWidth, targetHeight, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = resizedSeal.createGraphics();
......
......@@ -58,10 +58,10 @@ public class RandomFontStyleUtil {
cellStyle.setFont(font);
//设置单元格边框样式
cellStyle.setBorderTop(BorderStyle.THIN);
/*cellStyle.setBorderTop(BorderStyle.THIN);
cellStyle.setBorderBottom(BorderStyle.THIN);
cellStyle.setBorderLeft(BorderStyle.THIN);
cellStyle.setBorderRight(BorderStyle.THIN);
cellStyle.setBorderRight(BorderStyle.THIN);*/
cell.setCellStyle(cellStyle);
cell.setCellValue(value);
......
......@@ -282,6 +282,14 @@
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="pensionStart" column="PENSION_START"/>
<result property="medicalStart" column="MEDICAL_START"/>
<result property="unemployStart" column="UNEMPLOY_START"/>
<result property="workInjuryStart" column="WORK_INJURY_START"/>
<result property="birthStart" column="BIRTH_START"/>
<result property="bigailmentStart" column="BIGAILMENT_START"/>
<result property="recordBase" column="RECORD_BASE"/>
<result property="trustRemark" column="TRUST_REMARK"/>
</resultMap>
<resultMap id="unFundInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.UnFundInfoVo">
......@@ -299,6 +307,7 @@
<result property="unitProvidentPer" column="UNIT_PROVIDENT_PER"/>
<result property="personalProvidentPer" column="PERSONAL_PROVIDENT_PER"/>
<result property="providentCardinal" column="UNIT_PROVIDENG_CARDINAL"/>
<result property="providentStart" column="PROVIDENT_START"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -1245,6 +1254,14 @@
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
d.CREATE_NAME as dispatchName,
a.PENSION_START,
a.MEDICAL_START,
a.UNEMPLOY_START,
a.WORK_INJURY_START,
a.BIRTH_START,
a.BIGAILMENT_START,
a.RECORD_BASE,
a.TRUST_REMARK,
DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime
FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
......@@ -1270,6 +1287,7 @@
DATE_FORMAT(d.CREATE_TIME, '%Y-%m-%d %H:%i:%s') as dispatchTime,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
a.PROVIDENT_START,
a.UNIT_PROVIDENG_CARDINAL
FROM t_social_fund_info a
inner join t_dispatch_info d on a.DISPATCH_ID = d.ID
......
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