Commit 51b6e34b authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.4-EXPORT' into develop

# Conflicts:
#	yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
#	yifu-mail/yifu-mail-biz/src/main/resources/application-test.yml
#	yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryEmployeeServiceImpl.java
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
#	yifu-social/yifu-social-biz/src/main/resources/application-dev.yml
#	yifu-social/yifu-social-biz/src/main/resources/application-test.yml
parents 5b9065b2 0165c16d
......@@ -34,7 +34,7 @@ spec: # 资源规范字段
#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-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/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
......
......@@ -59,7 +59,7 @@ spec: # 资源规范字段
value: Asia/Shanghai
resources: #资源配置限制
limits: # 最大使用
memory: "2048Mi"
memory: "4096Mi"
#cpu: 300m # CPU,1核心 = 1000m
requests: # 容器运行时,最低资源需求,也就是说最少需要多少资源容器才能正常运行
#cpu: 100m
......
......@@ -510,4 +510,19 @@ public class TEmployeeContractInfo extends BaseEntity {
@ExcelAttribute(name = "减少原因")
@Schema(description = "减少原因")
private String reduceReason;
/**
* @Author fxj
* 查询数据起
**/
@Schema(description = "查询limit 开始")
@TableField(exist = false)
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
@Schema(description = "查询limit 数据条数")
@TableField(exist = false)
private int limitEnd;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/**
* @Author fxj
......@@ -21,4 +25,30 @@ public class EducationSearchVo extends TEmpEducation {
*/
@Schema(description = "创建时间区间")
private LocalDateTime[] createTimes;
/**
* @Author fxj
* 查询数据起
**/
private int limitStart;
/**
* @Author fxj
* 查询数据止
**/
private int limitEnd;
@TableField(exist = false)
@Schema(description = "导出的表头的Set")
private Set<String> exportFields;
//派单开始时间(查询专用)
@ExcelAttribute(name = "创建开始时间")
@TableField(exist = false)
private LocalDateTime createTimeStart;
//派单截止时间(查询专用)
@ExcelAttribute(name = "创建截止时间")
@TableField(exist = false)
private LocalDateTime createTimeEnd;
private List<String> idList;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.Max;
import java.io.Serializable;
import java.util.Date;
/**
* 员工学历信息表
*
* @author fxj
* @date 2022-06-18 09:39:46
*/
@Data
@Schema(description = "员工学历信息表")
public class TEmpEducationExportVo implements Serializable {
/**
* 主键
*/
@HeadFontStyle(fontHeightInPoints = 11)
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
@ExcelProperty("唯一标识")
private String id;
/**
* 员工姓名
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 20)
@Schema(description = "员工姓名")
@ExcelProperty("员工姓名")
private String empName;
/**
* 身份证号
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 20)
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 学校名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 50)
@Schema(description = "学校名称")
@ExcelProperty("学校")
private String school;
/**
* 院系名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 50)
@Schema(description = "院系名称")
@ExcelProperty("院系名称")
private String collageSystem;
/**
* 专业
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 50)
@Schema(description = "专业")
@ExcelProperty("专业")
private String major;
/**
* 学历名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 50)
@Schema(description = "学历名称")
@ExcelAttribute(name = "学历", isNotEmpty = true,errorInfo = "学历不可为空", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
@ExcelProperty("学历")
private String educationName;
/**
* 学历类型:全日制、自考、函授等
*/
@ExcelAttribute(name = "学历类型", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION_TYPE)
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description = "学历类型:全日制、自考、函授等")
@ExcelProperty("学历类型")
private String type;
/**
* 最高学历标识0是/1否
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description = "最高学历标识0是/1否")
@ExcelProperty("最高学历")
private String highIdentification;
/**
* 学制类型
*/
@ExcelAttribute(name = "学制类型", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION_SYSTEM)
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description = "学制类型")
@ExcelProperty("学制类型")
private String educationSystem;
/**
* 入学时间
*/
@HeadFontStyle(fontHeightInPoints = 11)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "入学时间")
@ExcelProperty("入学时间")
private String entryDate;
/**
* 结业日期
*/
@HeadFontStyle(fontHeightInPoints = 11)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "结业日期")
@ExcelProperty("毕业日期")
private String gradutionDate;
/**
* 证书名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 50)
@Schema(description = "证书名称")
@ExcelProperty("证书名称")
private String certificationName;
/**
* 备注
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Max(value = 200)
@Schema(description = "备注")
@ExcelProperty("备注")
private String remark;
}
......@@ -22,9 +22,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -34,6 +39,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
......@@ -173,4 +179,15 @@ public class TEmpEducationController {
public R<List<ErrorMessage>> importListUpate(@RequestBody MultipartFile file) {
return tEmpEducationService.importEmpEducationUpdateDiy(file.getInputStream());
}
/**
* @Author fxj
* @Description 批量导出人员学历信息
* @Date 14:01 2023/1/16
**/
@Operation(summary = "批量导出人员学历信息", description = "批量导出人员学历信息")
@SysLog("批量导出人员学历信息")
@PostMapping("/exportEmpEducation")
public void exportEmpEducation(@RequestBody(required = false) EducationSearchVo searchVo, HttpServletResponse response) {
tEmpEducationService.exportEmpEducation(searchVo, response);
}
}
......@@ -207,6 +207,24 @@ public class TSettleDomainController {
return listVo;
}
/**
* @param
* @Author: wangan
* @Date: 2019/10/18
* @Description:获取所有客户单位的项目信息
**/
@Inner
@PostMapping("/selectAllSettleDomainSelectVo")
public TSettleDomainListVo selectAllSettleDomainSelectVo() {
List<TSettleDomainSelectVo> list = tSettleDomainService.selectAllSettleDomainSelectVos();
TSettleDomainListVo listVo = new TSettleDomainListVo();
listVo.setListSelectVO(list);
if (Common.isNotNull(list)){
listVo.setMapSelectVo(list.stream().collect(Collectors.toMap(TSettleDomain::getId, k->k)));
}
return listVo;
}
/**
* @param
* @Author: wangan
......
......@@ -19,9 +19,13 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpEducationExportVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 员工学历信息表
*
......@@ -32,4 +36,8 @@ import org.apache.ibatis.annotations.Param;
public interface TEmpEducationMapper extends BaseMapper<TEmpEducation> {
int updateHighIdentification(@Param("empIdcard") String empIdcard);
List<TEmpEducationExportVo> noPageDiy(@Param("searchVo")EducationSearchVo searchVo,@Param("idList")List<String> idList);
int noPageCountDiy(@Param("searchVo")EducationSearchVo searchVo,@Param("idList")List<String> idList);
}
......@@ -21,6 +21,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -47,8 +50,13 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
List<TEmployeeContractInfo> getTEmployeeContractList(@Param("tEmployeeContractInfo") TEmployeeContractInfo tEmployeeContractInfo);
List<EmployeeContractExportVO> getTEmployeeContractExport(@Param("tEmployeeContractInfo") TEmployeeContractInfo tEmployeeContractInfo);
Integer selectCountContractExport(@Param("tEmployeeContractInfo") TEmployeeContractInfo tEmployeeContractInfo);
List<EmployeeContractExportVO> getTEmployeeContractExportHistory(@Param("tEmployeeContractInfo") TEmployeeContractInfo tEmployeeContractInfo);
Integer selectCountHistoryContractExport(@Param("tEmployeeContractInfo") TEmployeeContractInfo tEmployeeContractInfo);
TEmployeeContractInfo getOneContractByApplyNo(@Param("applyNo") String applyNo);
/**
......
......@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
......@@ -56,4 +57,5 @@ public interface TEmpEducationService extends IService<TEmpEducation> {
R<List<ErrorMessage>> importEmpEducationUpdateDiy(InputStream inputStream);
void exportEmpEducation(EducationSearchVo searchVo, HttpServletResponse response);
}
......@@ -19,10 +19,12 @@ package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -34,10 +36,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TAttaInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EducationSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateExcelVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVO;
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.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
......@@ -47,9 +47,14 @@ import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
......@@ -437,6 +442,12 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
.le(TEmpEducation::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateTimeStart())){
wrapper.ge(TEmpEducation::getCreateTime,entity.getCreateTimeStart());
}
if (Common.isNotNull(entity.getCreateTimeEnd())){
wrapper.le(TEmpEducation::getCreateTime,entity.getCreateTimeEnd());
}
if (Common.isNotNull(entity.getEmpName())){
wrapper.likeRight(TEmpEducation::getEmpName,entity.getEmpName());
}
......@@ -448,4 +459,81 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
}
return wrapper;
}
/**
* 获取导出的人员学历列表
*/
@Override
public void exportEmpEducation(EducationSearchVo searchVo, HttpServletResponse response) {
String fileName = "人员学历批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TEmpEducationExportVo> list = new ArrayList<>();
if (Common.isNotNull(searchVo.getCreateTimes()) &&
searchVo.getCreateTimes().length == CommonConstants.TWO_INT){
searchVo.setCreateTimeEnd(searchVo.getCreateTimes()[1]);
searchVo.setCreateTimeStart(searchVo.getCreateTimes()[0]);
}
long count = noPageCountDiy(searchVo,Common.getList(searchVo.getIds()));
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelUtil<TEmpEducationExportVo> util = new ExcelUtil<>(TEmpEducationExportVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
ExcelWriter excelWriter = EasyExcel.write(out, TEmpEducationExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap)).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,Common.getList(searchVo.getIds()));
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("人员学历批量导出"+index).build();
excelWriter.write(list,writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)){
list.clear();
}
}
}else {
WriteSheet writeSheet = EasyExcel.writerSheet("人员学历批量导出"+index).build();
excelWriter.write(list,writeSheet);
}
if (Common.isNotNull(list)){
list.clear();
}
out.flush();
excelWriter.finish();
}catch (Exception e){
log.error("人员学历批量导出执行异常" ,e);
}finally {
try {
if (null != out) {
out.close();
}
} catch (IOException e) {
log.error("人员学历批量导出执行异常", e);
}
}
}
private List<TEmpEducationExportVo> noPageDiy(EducationSearchVo searchVo,List<String> idList) {
return baseMapper.noPageDiy(searchVo,idList);
}
private long noPageCountDiy(EducationSearchVo searchVo,List<String> idList) {
return baseMapper.noPageCountDiy(searchVo,idList);
}
}
......@@ -69,6 +69,7 @@ import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 员工合同
......@@ -1130,24 +1131,46 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (contractInfo != null && contractInfo.getExportFields() != null && !contractInfo.getExportFields().isEmpty()) {
String fileName = "员工合同批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExport(contractInfo);
List<EmployeeContractExportVO> list = new ArrayList<>();
ServletOutputStream out = null;
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
Integer count = baseMapper.selectCountContractExport(contractInfo);
try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcelFactory.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeContractExportVO.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(contractInfo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
contractInfo.setLimitStart(i);
contractInfo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmployeeContractExport(contractInfo);
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("员工合同" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("员工合同" + index).build();
excelWriter.write(list, writeSheet);
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error("员工合同导出异常:", e);
} finally {
......@@ -1170,24 +1193,46 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (contractInfo != null && contractInfo.getExportFields() != null && !contractInfo.getExportFields().isEmpty()) {
String fileName = "员工合同批量导出【合并历史】" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
List<EmployeeContractExportVO> list = new ArrayList<>();
ServletOutputStream out = null;
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
Integer count = baseMapper.selectCountHistoryContractExport(contractInfo);
try {
ExcelUtil<EmployeeContractExportVO> util = new ExcelUtil<>(EmployeeContractExportVO.class);
for (EmployeeContractExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcelFactory.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同【合并历史】").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeContractExportVO.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(contractInfo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
contractInfo.setLimitStart(i);
contractInfo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("员工合同【合并历史】" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("员工合同【合并历史】" + index).build();
excelWriter.write(list, writeSheet);
}
out.flush();
excelWriter.finish();
} catch (Exception e) {
log.error(EmployeeConstants.CONCART_ALL_EXPORT_EXCEPTION, e);
} finally {
......
......@@ -74,7 +74,7 @@ spring:
#所有上传文件最大大小
max-request-size: 100MB
#单个文件最大大小
max-file-size: 50MB
max-file-size: 100MB
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
......
......@@ -46,15 +46,100 @@
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="major" column="MAJOR"/>
<result property="remark" column="REMARK"/>
<result property="certificationName" column="CERTIFICATION_NAME"/>
</resultMap>
<resultMap id="tEmpEducationExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpEducationExportVo">
<id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="entryDate" column="ENTRY_DATE"/>
<result property="educationName" column="EDUCATION_NAME"/>
<result property="gradutionDate" column="GRADUTION_DATE"/>
<result property="school" column="SCHOOL"/>
<result property="educationSystem" column="EDUCATION_SYSTEM"/>
<result property="highIdentification" column="HIGH_IDENTIFICATION"/>
<result property="type" column="TYPE"/>
<result property="collageSystem" column="COLLAGE_SYSTEM"/>
<result property="major" column="MAJOR"/>
<result property="remark" column="REMARK"/>
<result property="certificationName" column="CERTIFICATION_NAME"/>
</resultMap>
<update id="updateHighIdentification" parameterType="java.lang.String">
update t_emp_education
set HIGH_IDENTIFICATION='1'
WHERE EMP_IDCARD=#{empIdcard}
</update>
<!--人员学历导出查询count fxj 2023-01-16-->
<select id="noPageDiy" resultMap="tEmpEducationExportMap">
select
a.id,
a.EMP_NAME,
a.EMP_IDCARD,
a.ENTRY_DATE,
a.EDUCATION_NAME,
a.GRADUTION_DATE,
a.SCHOOL,
a.EDUCATION_SYSTEM,
case when a.HIGH_IDENTIFICATION = 0 then "是"
when a.HIGH_IDENTIFICATION = 1 then "否"
else null end as "HIGH_IDENTIFICATION" ,
a.type,
a.COLLAGE_SYSTEM,
a.MAJOR,
a.REMARK,
a.CERTIFICATION_NAME
from t_emp_education a
<where>
a.DELETE_FLAG = '0'
<include refid="education_where_export"/>
</where>
order by a.CREATE_TIME desc
<if test="searchVo != null">
<if test="searchVo.limitStart != null">
limit #{searchVo.limitStart},#{searchVo.limitEnd}
</if>
</if>
</select>
<!--人员学历导出查询count fxj 2023-01-16-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
select
count(1)
from t_emp_education a
<where>
a.DELETE_FLAG = '0'
<include refid="education_where_export"/>
</where>
</select>
<sql id="education_where_export">
<if test="searchVo != null">
<if test="idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="idList == null">
<if test="searchVo.createTimeStart != null">
AND a.CREATE_TIME >= #{searchVo.createTimeStart}
</if>
<if test="searchVo.createTimeEnd != null">
AND a.CREATE_TIME <![CDATA[ <= ]]> #{searchVo.createTimeEnd}
</if>
<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
AND a.EMP_NAME like concat(#{searchVo.empName},'%')
</if>
<if test="searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
</if>
<if test="searchVo.createName != null and searchVo.createName.trim() != ''">
AND a.CREATE_NAME = #{searchVo.createName}
</if>
</if>
</if>
</sql>
</mapper>
......@@ -445,11 +445,61 @@
order by a.APPLY_NO desc
</select>
<!--导出合同数量查询-->
<select id="selectCountContractExport" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
<!--导出-->
<select id="getTEmployeeContractExport" resultMap="tEmployeeContrctInfoExportMap">
SELECT
<include refid="Base_Export_Column_List"/>,a.type
a.APPLY_NO,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
a.CONTRACT_START,
a.CONTRACT_END,
a1.AREA_NAME as "FILE_PROVINCE",
a2.AREA_NAME as "FILE_CITY",
a3.AREA_NAME as "FILE_TOWN",
a.SUBJECT_DEPART,
a.DEPT_NO,
a.EMP_NATRUE,
a.CONTRACT_NAME,
a.CONTRACT_SUB_NAME,
a.SITUATION,
a.CONTRACT_TYPE,
a.CONTRACT_PARTY,
a.SUBJECT_UNIT,
CASE WHEN a.AUDIT_STATUS=0 THEN "待提交"
WHEN a.AUDIT_STATUS =1 THEN "待审核"
WHEN a.AUDIT_STATUS =2 THEN "审核通过"
WHEN a.AUDIT_STATUS =3 THEN "审核不通过"
ELSE a.AUDIT_STATUS END as "AUDIT_STATUS",
if(a.IN_USE = 0,'可用','不可用') IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
a.CREATE_NAME,
CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签"
WHEN a.type =2 THEN "派增-续签"
WHEN a.type =3 THEN "派减-作废"
WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type",
a.CREATE_TIME
FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.FILE_CITY
LEFT JOIN sys_area a3 on a3.id=a.FILE_TOWN
<where>
a.DELETE_FLAG = 0
<include refid="tEmployeeContractInfo_where"/>
......@@ -459,17 +509,68 @@
</where>
GROUP BY a.id
order by a.APPLY_NO desc
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</select>
<!--导出历史合并合同数量查询-->
<select id="selectCountHistoryContractExport" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null and a.SITUATION != '作废' and a.SITUATION != '终止'
<include refid="tEmployeeContractInfo_where"/>
<if test="tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''">
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
<!--导出历史合并-->
<select id="getTEmployeeContractExportHistory" resultMap="tEmployeeContrctInfoExportMap">
SELECT
<include refid="Base_Export_Column_List"/>
,count(1) CREATE_NUM,
a.APPLY_NO,
a.EMP_NO,
a.EMP_NAME,
a.EMP_IDCARD,
a.CONTRACT_START,
a.CONTRACT_END,
a1.AREA_NAME as "FILE_PROVINCE",
a2.AREA_NAME as "FILE_CITY",
a3.AREA_NAME as "FILE_TOWN",
a.SUBJECT_DEPART,
a.DEPT_NO,
a.EMP_NATRUE,
a.CONTRACT_NAME,
a.CONTRACT_SUB_NAME,
a.SITUATION,
a.CONTRACT_TYPE,
a.CONTRACT_PARTY,
a.SUBJECT_UNIT,
CASE WHEN a.AUDIT_STATUS=0 THEN "待提交"
WHEN a.AUDIT_STATUS =1 THEN "待审核"
WHEN a.AUDIT_STATUS =2 THEN "审核通过"
WHEN a.AUDIT_STATUS =3 THEN "审核不通过"
ELSE a.AUDIT_STATUS END as "AUDIT_STATUS",
if(a.IN_USE = 0,'可用','不可用') IN_USE,
if(a.IS_FILE = 0,'有附件','无附件') FILES,
if(a.IS_FILE = 0,'已归档','未归档') IS_FILE,
a.CREATE_NAME,
CASE WHEN a.type=0 THEN "派增-社保派单"
WHEN a.type =1 THEN "派增-无社保新签"
WHEN a.type =2 THEN "派增-续签"
WHEN a.type =3 THEN "派减-作废"
WHEN a.type =4 THEN "派减-终止"
ELSE a.type END as "type",
a.CREATE_TIME,
count(1) CREATE_NUM,
min(a.CONTRACT_START) START_DATE,
max(a.CONTRACT_END) END_DATE,
GROUP_CONCAT(concat(a.CONTRACT_START,'~',ifnull(a.CONTRACT_END,'')) ORDER BY a.CONTRACT_START asc) HISTORY
FROM t_employee_contract_info a
LEFT JOIN sys_area a1 on a1.id=a.FILE_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.FILE_CITY
LEFT JOIN sys_area a3 on a3.id=a.FILE_TOWN
<where>
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null and a.SITUATION != '作废' and a.SITUATION != '终止'
<include refid="tEmployeeContractInfo_where"/>
......@@ -479,6 +580,7 @@
</where>
GROUP BY a.EMP_IDCARD,a.SETTLE_DOMAIN
order by a.APPLY_NO desc
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</select>
<!--tEmployeeContractInfo简单分页查询-->
......
......@@ -343,6 +343,8 @@ public interface CommonConstants {
String ID = "ID";
String PARAM_IS_NOT_ERROR = "传参异常,请检查参数";
int EXCEL_EXPORT_LIMIT = 60000;
// 给量大的表导出使用
int EXCEL_EXPORT_LIMIT_3 = 30000;
String USER = "用户";
......
......@@ -116,6 +116,21 @@ public class ArchivesDaprUtil {
return res;
}
/**
* @Author fxj
* @Description 获取所有客户单位的项目信息
* @Date 21:18 2022/7/18
* @Param
* @return
**/
public R<TSettleDomainListVo> selectAllSettleDomainSelectVo(){
R<TSettleDomainListVo> res = HttpDaprUtil.invokeMethodPost(daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId(),"/tsettledomain/selectAllSettleDomainSelectVo","", TSettleDomainListVo.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("获取所有客户单位的项目信息失败!");
}
return res;
}
/**
* @Author fxj
* @Description 获取所有客户单位的项目信息
......
......@@ -4742,6 +4742,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//更新新的项目编码,结算方式,预估保费,实际保费
updateWrapper.eq(TInsuranceDetail :: getId,success.getId())
.set(TInsuranceDetail :: getDeptNo,success.getNewDeptNo())
.set(TInsuranceDetail :: getDeptName,success.getNewDeptName())
.set(TInsuranceDetail :: getUnitNo,success.getNewCustomerCode())
.set(TInsuranceDetail :: getUnitName,success.getNewCustomerName())
.set(TInsuranceDetail :: getSettleType,newSettleType)
.set(TInsuranceDetail :: getActualPremium,actualPremium)
.set(TInsuranceDetail :: getEstimatePremium,estimatePremium)
......
......@@ -15,7 +15,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:43306/yifu_mail?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:43306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author hgw
* @description 薪资人员导入vo
* @date 2023/1/17
*/
@Getter
@Setter
public class SalaryEmployeeImportVo {
private List<TSalaryEmployee> empList;
private TSettleDomain dept;
private String isUpdate;
}
......@@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;
/**
* 申报对象表
......@@ -55,4 +56,10 @@ public class TStatisticsDeclarerSearchVo extends TStatisticsDeclarer {
@Schema(description = "查询limit 数据条数")
private int limitEnd;
/**
* 多选导出或删除等操作
*/
@Schema(description = "选中ID")
private List<String> idList;
}
......@@ -29,6 +29,7 @@ import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryEmployeeImportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import io.swagger.v3.oas.annotations.Operation;
......@@ -180,4 +181,20 @@ public class TSalaryEmployeeController {
public R<List<ErrorMessage>> batchUpdateSalaryEmployee(@RequestBody MultipartFile file) {
return tSalaryEmployeeService.batchUpdateSalaryEmployee(file.getInputStream());
}
/**
* @param vo
* @Description: 批量新增或更新人员
* @Author: hgw
* @Date: 2023/1/17 15:35
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
@Operation(description = "批量新增或更新人员")
@SysLog("批量新增或更新人员")
@PostMapping("/importEmployee")
@PreAuthorize("@pms.hasPermission('tsalaryemployee_import_employee')")
public R<List<ErrorMessage>> importEmployee(@RequestBody SalaryEmployeeImportVo vo) {
return tSalaryEmployeeService.importEmployee(vo);
}
}
......@@ -84,12 +84,12 @@ public class TStatisticsCurrentReportController {
@Operation(description = "导出统计-本期申报 hasPermission('salary_tstatisticscurrentreport-export')")
@PostMapping("/export")
@PreAuthorize("@pms.hasPermission('salary_tstatisticscurrentreport-export')")
public void export(HttpServletResponse response, @RequestBody TStatisticsCurrentReportSearchVo searchVo) {
if (Common.isEmpty(searchVo.getDeclareMonth())) {
public void export(HttpServletResponse response, @RequestBody TStatisticsCurrentReportSearchVo tStatisticsCurrentReport) {
if (Common.isEmpty(tStatisticsCurrentReport.getDeclareMonth())) {
String nowMonth = DateUtil.addMonth(0); //本月
searchVo.setDeclareMonth(nowMonth);
tStatisticsCurrentReport.setDeclareMonth(nowMonth);
}
tStatisticsCurrentReportService.listExport(response, searchVo);
tStatisticsCurrentReportService.listExport(response, tStatisticsCurrentReport);
}
/**
......
......@@ -21,8 +21,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportSearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 统计-本期申报
*
......@@ -51,4 +57,12 @@ public interface TStatisticsCurrentReportMapper extends BaseMapper<TStatisticsCu
**/
int deleteByYearMonth(@Param("yearMonth") String yearMonth);
/**
* @Description: 导出
* @Author: hgw
* @Date: 2023/1/16 17:44
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport>
**/
List<TStatisticsCurrentReport> getCurrentReportExport(@Param("tStatisticsCurrentReport") TStatisticsCurrentReportSearchVo tStatisticsCurrentReport, @Param("idList")List<String> idList);
}
......@@ -54,4 +54,12 @@ public interface TStatisticsDeclarerMapper extends BaseMapper<TStatisticsDeclare
* @return:
**/
List<TStatisticsDeclarer> doStatisticsTaxDeclarerYear(@Param("nowMonth") String nowMonth);
/**
* @Description: 导出
* @Author: huyc
* @Date: 2023/1/12 14:52
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.social.vo.TForecastLibraryVo>
**/
List<TStatisticsDeclarer> exportDeclarer(@Param("tStatisticsDeclarer") TStatisticsDeclarer tStatisticsDeclarer);
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryEmployeeImportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
......@@ -69,6 +70,15 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
**/
R<List<ErrorMessage>> batchUpdateSalaryEmployee(InputStream inputStream);
/**
* @param vo
* @Description: 批量新增或更新人员
* @Author: hgw
* @Date: 2023/1/17 15:38
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
R<List<ErrorMessage>> importEmployee(SalaryEmployeeImportVo vo);
TSalaryEmployee getByEmpIdCard(String empIdCard);
/**
......
......@@ -46,7 +46,7 @@ public interface TStatisticsCurrentReportService extends IService<TStatisticsCur
* @Date: 2022/8/19 17:04
* @return: void
**/
void listExport(HttpServletResponse response, TStatisticsCurrentReportSearchVo searchVo);
void listExport(HttpServletResponse response, TStatisticsCurrentReportSearchVo tStatisticsCurrentReport);
/**
* @param yearMonth
......
......@@ -17,16 +17,15 @@
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpSalaryParamVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpSocialViewVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
......@@ -88,38 +87,24 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryAccount.class).includeColumnFiledNames(searchVo.getExportFields()).build();
ExcelWriter excelWriter = EasyExcelFactory.write(out, TSalaryAccount.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
WriteSheet writeSheet;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TSalaryAccount> util;
for (int i = 0; i <= count; ) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_3) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_3);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TSalaryAccount.class);
for (TSalaryAccount vo : list) {
if (CommonConstants.THREE_STRING.equals(vo.getFormType())){
vo.setRelaySalary(vo.getRelaySalaryUnit());
vo.setSalaryTax(BigDecimalUtils.safeAdd(vo.getSalaryTax(),vo.getSalaryTaxUnit()));
}
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("工资报账主表(工资条)" + index).build();
writeSheet = EasyExcelFactory.writerSheet("工资报账主表(工资条)" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("工资报账主表(工资条)" + index).build();
writeSheet = EasyExcelFactory.writerSheet("工资报账主表(工资条)" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
......
......@@ -136,29 +136,22 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcelFactory.write(out, TSalaryStandardExportVo.class).build();
int index = 0;
WriteSheet writeSheet;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_3) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_3);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TSalaryStandardExportVo> util = new ExcelUtil<>(TSalaryStandardExportVo.class);
for (TSalaryStandardExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("项目薪酬表" + index).build();
writeSheet = EasyExcelFactory.writerSheet("项目薪酬表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("项目薪酬表" + index).build();
writeSheet = EasyExcelFactory.writerSheet("项目薪酬表" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
......
......@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -32,6 +33,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsCurrentReportMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsCurrentReportService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportSearchVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -69,11 +72,11 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
* @return
*/
@Override
public void listExport(HttpServletResponse response, TStatisticsCurrentReportSearchVo searchVo) {
public void listExport(HttpServletResponse response, TStatisticsCurrentReportSearchVo tStatisticsCurrentReport) {
String fileName = "本期申报批量导出" + DateUtil.getThisTime() + CommonConstants.XLSX;
//获取要导出的列表
List<TStatisticsCurrentReport> list = new ArrayList<>();
long count = noPageCountDiy(searchVo);
long count = noPageCountDiy(tStatisticsCurrentReport);
ServletOutputStream out = null;
try {
out = response.getOutputStream();
......@@ -81,34 +84,24 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsCurrentReport.class).includeColumnFiledNames(searchVo.getExportFields()).build();
ExcelWriter excelWriter = EasyExcelFactory.write(out, TStatisticsCurrentReport.class).includeColumnFiledNames(tStatisticsCurrentReport.getExportFields()).build();
int index = 0;
WriteSheet writeSheet;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TStatisticsCurrentReport> util;
for (int i = 0; i <= count; ) {
for (int i = 0; i <= count; i = i + CommonConstants.EXCEL_EXPORT_LIMIT_3) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
tStatisticsCurrentReport.setLimitStart(i);
tStatisticsCurrentReport.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_3);
list = noPageDiy(tStatisticsCurrentReport);
if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TStatisticsCurrentReport.class);
for (TStatisticsCurrentReport vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("本期申报" + index).build();
writeSheet = EasyExcelFactory.writerSheet("本期申报" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
i = i + CommonConstants.EXCEL_EXPORT_LIMIT;
if (Common.isNotNull(list)) {
list.clear();
}
}
} else {
WriteSheet writeSheet = EasyExcel.writerSheet("本期申报" + index).build();
writeSheet = EasyExcelFactory.writerSheet("本期申报" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
......@@ -129,16 +122,8 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
}
}
private List<TStatisticsCurrentReport> noPageDiy(TStatisticsCurrentReportSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsCurrentReport> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TStatisticsCurrentReport::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
return baseMapper.selectList(wrapper);
private List<TStatisticsCurrentReport> noPageDiy(TStatisticsCurrentReportSearchVo tStatisticsCurrentReport) {
return baseMapper.getCurrentReportExport(tStatisticsCurrentReport, Common.getList(tStatisticsCurrentReport.getIds()));
}
private Long noPageCountDiy(TStatisticsCurrentReportSearchVo searchVo) {
......
......@@ -93,23 +93,20 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsDeclarer.class).build();
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("预估费用").doWrite(list)
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsDeclarer.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
WriteSheet writeSheet;
ExcelUtil<TStatisticsDeclarer> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
if (Common.isNotNull(searchVo.getIds())) {
searchVo.setIdList(Common.getList(searchVo.getIds()));
}
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(TStatisticsDeclarer.class);
for (TStatisticsDeclarer vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("申报对象表"+index).build();
excelWriter.write(list,writeSheet);
......@@ -142,19 +139,10 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
}
}
@Override
public List<TStatisticsDeclarer> noPageDiy(TStatisticsDeclarerSearchVo searchVo) {
LambdaQueryWrapper<TStatisticsDeclarer> wrapper = buildQueryWrapper(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)){
wrapper.in(TStatisticsDeclarer::getId,idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0){
wrapper.last(" limit "+ searchVo.getLimitStart() +","+ searchVo.getLimitEnd());
}
return baseMapper.selectList(wrapper);
}
@Override
public List<TStatisticsDeclarer> noPageDiy(TStatisticsDeclarerSearchVo searchVo) {
return baseMapper.exportDeclarer(searchVo);
}
@Override
public R updateFlagById(String id, String isDeclare, String undeclareReason) {
......
......@@ -188,4 +188,5 @@ public class SalaryConstants {
public static final String CITY_ERROR = "开户行市错误!";
public static final String CUR_TAX_INFO = "当前项目薪酬人员已维护计税月份,计税月份沿用系统原值,其他字段已更新!";
public static final String EKP_NO_RETURN = "推送EKP无结果返回";
public static final String TAX_MONTH_LENGTH = "计税月份错误";
}
......@@ -274,6 +274,7 @@
a.SUM_BABY_MONEY,
a.SUM_PRIVATE_PENSION
</sql>
<sql id="tSalaryAccount_where">
<if test="tSalaryAccount != null">
<if test="tSalaryAccount.id != null and tSalaryAccount.id.trim() != ''">
......@@ -659,7 +660,46 @@
<select id="noPageDiy" resultMap="tSalaryAccountMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount">
SELECT
<include refid="Base_Column_List"/>
a.ID,
a.INVOICE_TITLE,
a.SALARY_MONTH,
a.EMP_NAME,
a.EMP_IDCARD,
a.BANK_NO,
a.BANK_NAME,
a.DEPT_NO,
a.DEPT_NAME,
a.SALARY_GIVE_TIME,
a.DEDU_SOCIAL_MONTH,
a.DEDU_PROVIDENT_MONTH,
a.SETTLEMENT_MONTH,
a.ANNUAL_BONUS_TYPE,
a.TAX_MONTH,
a.IS_DEDUCT_SOCIAL,
a.IS_DEDUCT_FUND,
a.EMP_PHONE,
a.BANK_SUB_NAME,
ap.AREA_NAME BANK_PROVINCE,
ac.AREA_NAME BANK_CITY,
a.IS_PERSON_TAX,
ifnull(a.RELAY_SALARY,0) + ifnull(a.RELAY_SALARY_UNIT,0) RELAY_SALARY,
a.ACTUAL_SALARY,
ifnull(a.SALARY_TAX,0) + ifnull(a.SALARY_TAX_UNIT,0) SALARY_TAX,
a.CREATE_NAME,
a.CREATE_TIME,
a.UNIT_SOCIAL,
a.PERSON_SOCIAL,
a.UNIT_FUND,
a.PERSON_FUND,
a.COST_REDUCTION,
a.ANNUAL_BONUS_TAX,
a.SUM_CHILD_EDU_MONEY,
a.SUM_HOUSING_LOAN_MONEY,
a.SUM_HOUSING_RENT_MONEY,
a.SUM_SUPPORT_ELDERLY_MONEY,
a.SUM_CONTINUING_EDUCATION_MONEY,
a.SUM_BABY_MONEY,
a.SUM_PRIVATE_PENSION
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201'">
t_salary_account a
......@@ -667,6 +707,8 @@
<if test="searchVo.salaryMonthStart != null and searchVo.salaryMonthStart.trim() &lt; '202201' ">
t_salary_account_hro_2021 a
</if>
left join sys_area ap on ap.id=a.BANK_PROVINCE
left join sys_area ac on ac.id=a.BANK_CITY
<where>
a.DELETE_FLAG = 0 and not EXISTS (
select 1 from t_dept_see d where a.DEPT_NO = d.DEPT_NO and d.CAN_SEE = 1
......
......@@ -352,7 +352,7 @@
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExport" resultMap="salaryStandardExportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo">
SELECT
a.STATUS,
case a.STATUS when 0 then '待提交' when 1 then '待审核' when 2 then '待推送明细' when 3 then '发送成功' when 5 then '审核不通过' when 6 then '确认不通过' when 10 then '发送失败' when 11 then '已审核生成收入中' when 12 then '已审核生成收入失败' end as STATUS,
a.SEND_MONTH,
a.DEPT_NAME,
a.DEPT_NO,
......@@ -366,7 +366,7 @@
a.INVOICE_TITLE,
a.CREATE_NAME,
a.SALARY_MONTH,
a.FORM_TYPE,
case a.FORM_TYPE when 0 then '薪资' when 1 then '绩效' when 2 then '其他' when 3 then '劳务费' when 4 then '稿酬' end as FORM_TYPE,
a.CREATE_TIME
FROM
<if test="searchVo.salaryMonthStart == null or searchVo.salaryMonthStart.trim() >= '202201' ">
......
......@@ -275,4 +275,55 @@
DELETE FROM t_statistics_current_report WHERE DECLARE_MONTH = #{yearMonth}
</delete>
<!--导出-->
<select id="getCurrentReportExport" resultMap="tStatisticsCurrentReportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsCurrentReportSearchVo">
SELECT
a.id,
a.INVOICE_TITLE,
a.SETTLE_DEPART_ID,
a.SETTLE_DEPART_NO,
a.SETTLE_DEPART_NAME,
a.declare_MONTH,
a.EMP_ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.cost_reduction,
a.child_eduInfo_money,
a.housing_rentalInfo_money,
a.housing_loan_Interest_expense_money,
a.support_elderly_expense_money,
a.continuing_education_expense_money,
a.REAL_SALARY,
a.PERSONAL_PENSION_MONEY,
a.PERSONAL_MEDICAL_MONEY,
a.PERSONAL_UNEMPLOYMENT_MONEY,
a.PERSONAL_SOCIAL,
a.PERSONAL_PROVIDENT_FEE,
a.enterprise_annuity,
a.taxable,
a.tax_fee,
a.QUICK_DEDUCATION,
a.salary_tax,
a.UNIT_ID,
a.UNIT_NO,
a.UNIT_NAME,
a.SPECIAL_DEDU_MONEY,
a.sum_baby_money,
a.SUM_PRIVATE_PENSION,
if(a.IS_NEW_EMPLOYEE ='0','否','是') IS_NEW_EMPLOYEE,
a.CREATE_MONTH,
a.EMP_PHONE
FROM t_statistics_current_report a
<where>
1=1
<include refid="tStatisticsCurrentReport_where"/>
</where>
order by a.DECLARE_MONTH desc
<if test="tStatisticsCurrentReport != null">
<if test="tStatisticsCurrentReport.limitStart != null">
limit #{tStatisticsCurrentReport.limitStart},#{tStatisticsCurrentReport.limitEnd}
</if>
</if>
</select>
</mapper>
......@@ -87,6 +87,35 @@
</if>
</if>
</sql>
<sql id="tStatisticsDeclarer_export_where">
<if test="tStatisticsDeclarer != null">
<if test="tStatisticsDeclarer.idList != null">
AND a.ID in
<foreach item="idStr" index="index" collection="tStatisticsDeclarer.idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tStatisticsDeclarer.id != null and tStatisticsDeclarer.id.trim() != ''">
AND a.ID = #{tStatisticsDeclarer.id}
</if>
<if test="tStatisticsDeclarer.declareUnit != null and tStatisticsDeclarer.declareUnit.trim() != ''">
AND a.DECLARE_UNIT like concat(#{tStatisticsDeclarer.declareUnit},'%')
</if>
<if test="tStatisticsDeclarer.declareMonth != null and tStatisticsDeclarer.declareMonth.trim() != ''">
AND a.DECLARE_MONTH = #{tStatisticsDeclarer.declareMonth}
</if>
<if test="tStatisticsDeclarer.empName != null and tStatisticsDeclarer.empName.trim() != ''">
AND a.EMP_NAME = #{tStatisticsDeclarer.empName}
</if>
<if test="tStatisticsDeclarer.empIdcard != null and tStatisticsDeclarer.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tStatisticsDeclarer.empIdcard}
</if>
<if test="tStatisticsDeclarer.isZeroDeclare != null and tStatisticsDeclarer.isZeroDeclare.trim() != ''">
AND a.IS_ZERO_DECLARE = #{tStatisticsDeclarer.isZeroDeclare}
</if>
</if>
</sql>
<!--tStatisticsDeclarer简单分页查询-->
<select id="getTStatisticsDeclarerPage" resultMap="tStatisticsDeclarerMap">
SELECT
......@@ -99,6 +128,35 @@
order by a.DECLARE_MONTH desc
</select>
<!--tStatisticsDeclarer简单分页查询-->
<select id="exportDeclarer" resultMap="tStatisticsDeclarerMap">
SELECT
a.DECLARE_UNIT,
a.DECLARE_MONTH,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_PHONE,
CASE WHEN a.OCCUPATION_TYPE=0 THEN "雇员"
WHEN a.OCCUPATION_TYPE =1 THEN "其他"
ELSE a.OCCUPATION_TYPE END as "OCCUPATION_TYPE",
CASE WHEN a.IS_ZERO_DECLARE=0 THEN "是"
WHEN a.IS_ZERO_DECLARE =1 THEN "否"
ELSE a.IS_ZERO_DECLARE END as "IS_ZERO_DECLARE",
CASE WHEN a.IS_DECLARE=0 THEN "是"
WHEN a.IS_DECLARE =1 THEN "否"
ELSE a.IS_DECLARE END as "IS_DECLARE",
a.UNDECLARE_REASON
FROM t_statistics_declarer a
<where>
1=1
<include refid="tStatisticsDeclarer_export_where"/>
</where>
order by a.DECLARE_MONTH desc
<if test="tStatisticsDeclarer.limitStart != null">
limit #{tStatisticsDeclarer.limitStart},#{tStatisticsDeclarer.limitEnd}
</if>
</select>
<!--统计-->
<select id="doStatisticsTaxDeclarer" resultMap="tStatisticsDeclarerMap">
SELECT
......
......@@ -207,18 +207,18 @@ public class TPaymentInfoBatchVo {
@ExcelProperty("单位失业基数")
private BigDecimal unitUnemploymentSet;
/**
* 工伤基数
* 单位工伤基数
*/
@ExcelAttribute(name = "工伤基数")
@ExcelAttribute(name = "单位工伤基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数")
@ExcelProperty("单位工伤基数")
private BigDecimal unitInjurySet;
/**
* 生育基数
*/
@ExcelAttribute(name = "生育基数")
@ExcelAttribute(name = "单位生育基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数")
@ExcelProperty("单位生育基数")
private BigDecimal unitBirthSet;
/**
* 单位养老比例
......@@ -291,74 +291,74 @@ public class TPaymentInfoBatchVo {
@ExcelProperty("个人大病比例")
private BigDecimal personalBigailmentPer;
/**
* 单位养老金额
* 单位养老缴费
*/
@ExcelAttribute(name = "单位养老金额")
@ExcelAttribute(name = "单位养老缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位养老金额")
@ExcelProperty("单位养老缴费")
private BigDecimal unitPensionMoney;
/**
* 单位医疗金额
* 单位医疗缴费
*/
@ExcelAttribute(name = "单位医疗金额")
@ExcelAttribute(name = "单位医疗缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位医疗金额")
@ExcelProperty("单位医疗缴费")
private BigDecimal unitMedicalMoney;
/**
* 单位失业金额
* 单位失业缴费
*/
@ExcelAttribute(name = "单位失业金额")
@ExcelAttribute(name = "单位失业缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位失业金额")
@ExcelProperty("单位失业缴费")
private BigDecimal unitUnemploymentMoney;
/**
* 单位工伤金额
* 单位工伤缴费
*/
@ExcelAttribute(name = "单位工伤金额")
@ExcelAttribute(name = "单位工伤缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位工伤金额")
@ExcelProperty("单位工伤缴费")
private BigDecimal unitInjuryMoney;
/**
* 单位生育金额
* 单位生育缴费
*/
@ExcelAttribute(name = "单位生育金额")
@ExcelAttribute(name = "单位生育缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位生育金额")
@ExcelProperty("单位生育缴费")
private BigDecimal unitBirthMoney;
/**
* 单位大病金额
* 单位大病缴费
*/
@ExcelAttribute(name = "单位大病金额")
@ExcelAttribute(name = "单位大病缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位大病金额")
@ExcelProperty("单位大病缴费")
private BigDecimal unitBigmailmentMoney;
/**
* 个人养老金额
* 个人养老缴费
*/
@ExcelAttribute(name = "个人养老金额")
@ExcelAttribute(name = "个人养老缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人养老金额")
@ExcelProperty("个人养老缴费")
private BigDecimal personalPensionMoney;
/**
* 个人医疗金额
* 个人医疗缴费
*/
@ExcelAttribute(name = "个人医疗金额")
@ExcelAttribute(name = "个人医疗缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人医疗金额")
@ExcelProperty("个人医疗缴费")
private BigDecimal personalMedicalMoney;
/**
* 个人失业金额
* 个人失业缴费
*/
@ExcelAttribute(name = "个人失业金额")
@ExcelAttribute(name = "个人失业缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人失业金额")
@ExcelProperty("个人失业缴费")
private BigDecimal personalUnemploymentMoney;
/**
* 个人大病金额
* 个人大病缴费
*/
@ExcelAttribute(name = "个人大病金额")
@ExcelAttribute(name = "个人大病缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人大病金额")
@ExcelProperty("个人大病缴费")
private BigDecimal personalBigmailmentMoney;
/**
......@@ -419,11 +419,11 @@ public class TPaymentInfoBatchVo {
@ExcelProperty("单位公积金比例")
private BigDecimal providentPercent;
/**
* 单位公积金费用
* 单位公积金缴费
*/
@ExcelAttribute(name = "单位公积金费用")
@ExcelAttribute(name = "单位公积金缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位公积金费用")
@ExcelProperty("单位公积金缴费")
private BigDecimal unitProvidentSum;
/**
* 个人公积金基数
......@@ -433,11 +433,11 @@ public class TPaymentInfoBatchVo {
@ExcelProperty("个人公积金基数")
private BigDecimal personalProidentSet;
/**
* 个人公积金费用
* 个人公积金缴费
*/
@ExcelAttribute(name = "个人公积金费用")
@ExcelAttribute(name = "个人公积金缴费")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("个人公积金费用")
@ExcelProperty("个人公积金缴费")
private BigDecimal personalProvidentSum;
/**
......@@ -477,7 +477,7 @@ public class TPaymentInfoBatchVo {
/**
* 打标状态 0 未打标 1 已打标
*/
@ExcelAttribute(name = "打标状态",readConverterExp = "0=未打标,1=已打标")
@ExcelAttribute(name = "打标状态")
@Schema(description ="打标状态 0 未打标 1 已打标")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("打标状态")
......@@ -486,7 +486,7 @@ public class TPaymentInfoBatchVo {
/**
* 推送状态
*/
@ExcelAttribute(name = "推送状态",readConverterExp = "0=已推送,1=未推送")
@ExcelAttribute(name = "推送状态")
@Schema(description ="推送状态 0已推送 1未推送")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("推送状态")
......
......@@ -240,38 +240,38 @@ public class TPaymentInfoExportVo extends RowIndex implements Serializable {
/**
* 单位养老基数
*/
@ExcelAttribute(name = "养老基数")
@ExcelAttribute(name = "单位养老基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数")
@ExcelProperty("单位养老基数")
private BigDecimal unitPensionSet;
/**
* 单位医疗基数
*/
@ExcelAttribute(name = "医疗基数")
@ExcelAttribute(name = "单位医疗基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数")
@ExcelProperty("单位医疗基数")
private BigDecimal unitMedicalSet;
/**
* 单位失业基数
*/
@ExcelAttribute(name = "失业基数")
@ExcelAttribute(name = "单位失业基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数")
@ExcelProperty("单位失业基数")
private BigDecimal unitUnemploymentSet;
/**
* 单位工伤基数
*/
@ExcelAttribute(name = "工伤基数")
@ExcelAttribute(name = "单位工伤基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数")
@ExcelProperty("单位工伤基数")
private BigDecimal unitInjurySet;
/**
* 单位生育基数
*/
@ExcelAttribute(name = "生育基数")
@ExcelAttribute(name = "单位生育基数")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数")
private BigDecimal unitBirthSet;;
@ExcelProperty("单位生育基数")
private BigDecimal unitBirthSet;
/**
* 单位养老金额
*/
......
......@@ -165,28 +165,24 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchInfoExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
ExcelUtil<TDispatchInfoExportVo> util = new ExcelUtil<>(TDispatchInfoExportVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
redisLabelMap.putAll(userMap);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchInfoExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TDispatchInfoExportVo> util;
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = exportDispatch(searchVo);
if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TDispatchInfoExportVo.class);
for (TDispatchInfoExportVo vo : list) {
if (!userMap.isEmpty()) {
vo.setFundHandleUser(null != userMap.get(vo.getFundHandleUser()) ? userMap.get(vo.getFundHandleUser()) : "");
vo.setAuditUserName(null != userMap.get(vo.getAuditUserName()) ? userMap.get(vo.getAuditUserName()) : "");
vo.setFundAuditUser(null != userMap.get(vo.getFundAuditUser()) ? userMap.get(vo.getFundAuditUser()) : "");
vo.setHandleUser(null != userMap.get(vo.getHandleUser()) ? userMap.get(vo.getHandleUser()) : "");
}
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
writeSheet = EasyExcel.writerSheet("派单" + index).build();
excelWriter.write(list, writeSheet);
......
......@@ -17,7 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -119,24 +120,26 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
ExcelUtil<TForecastLibraryExportVo> util = new ExcelUtil<>(TForecastLibraryExportVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("预估费用").doWrite(list)
ExcelWriter excelWriter = EasyExcelFactory.write(out, TForecastLibraryExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
ExcelWriter excelWriter = EasyExcel.write(out, TForecastLibraryExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = exportLibrary(searchVo);
if (Common.isNotNull(list)) {
ExcelUtil<TForecastLibraryExportVo> util = new ExcelUtil<>(TForecastLibraryExportVo.class);
for (TForecastLibraryExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("预估费用" + index).build();
writeSheet = EasyExcel.writerSheet("预估费用" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
......@@ -145,7 +148,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
} else {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("预估费用" + index).build();
WriteSheet writeSheet = EasyExcel.writerSheet("预估费用" + index).build();
excelWriter.write(list, writeSheet);
}
if (Common.isNotNull(list)) {
......
......@@ -116,23 +116,16 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
ExcelWriter excelWriter = EasyExcelFactory.write(out, IncomeExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
WriteSheet writeSheet;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT_3) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT_3);
list = noPageDiy(searchVo, Common.getList(searchVo.getIds()));
if (Common.isNotNull(list)) {
ExcelUtil<IncomeExportVo> util = new ExcelUtil<>(IncomeExportVo.class);
for (IncomeExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (Common.isNotNull(list)) {
WriteSheet writeSheet = EasyExcelFactory.writerSheet("收入明细表" + index).build();
writeSheet = EasyExcelFactory.writerSheet("收入明细表" + index).build();
excelWriter.write(list, writeSheet);
index++;
}
if (Common.isNotNull(list)) {
list.clear();
}
}
......
......@@ -32,6 +32,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO;
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.util.*;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
......@@ -109,22 +111,22 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TSocialFundInfoExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
ExcelUtil<TSocialFundInfoExportVo> util = new ExcelUtil<>(TSocialFundInfoExportVo.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
ExcelWriter excelWriter = EasyExcel.write(out, TSocialFundInfoExportVo.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(searchVo.getExportFields()).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
WriteSheet writeSheet;
ExcelUtil<TSocialFundInfoExportVo> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = export(searchVo);
if (Common.isNotNull(list)) {
util = new ExcelUtil<>(TSocialFundInfoExportVo.class);
for (TSocialFundInfoExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
}
if (list != null) {
writeSheet = EasyExcel.writerSheet("社保公积金查询表" + index).build();
excelWriter.write(list, writeSheet);
......
......@@ -4,7 +4,7 @@ spring:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.65:43306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:43306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: yf_zsk
hikari:
......@@ -32,7 +32,7 @@ spring:
type: CLASS_BASED
tables:
t_payment_info:
actual-data-nodes: ds0.t_payment_info_20$->{17..22}
actual-data-nodes: ds0.t_payment_info_20$->{17..23}
key-generate-strategy:
column: ID
key-generator-name: snowflake
......
......@@ -4,7 +4,7 @@ spring:
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.1.65:43306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.1.65:43306/mvp_social?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
username: root
password: yf_zsk
hikari:
......
......@@ -595,58 +595,166 @@
<!-- 派单导出 -->
<select id="exportDispatch" resultMap="exportMap">
select
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
a.TYPE,
a.SOCIAL_HOUSEHOLD_NAME,
a.PROVIDENT_HOUSEHOLD_NAME,
a.SOCIAL_HANDLE_STATUS,
IF(a.TYPE='0',s.PENSION_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as PENSION_HANDLE,
IF(a.TYPE='0',s.MEDICAL_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as MEDICAL_HANDLE,
IF(a.TYPE='0',s.UNEMPLOY_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as UNEMPLOY_HANDLE,
IF(a.TYPE='0',s.WORK_INJURY_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as WORK_INJURY_HANDLE,
IF(a.TYPE='0',s.BIRTH_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as BIRTH_HANDLE,
IF(a.TYPE='0',s.BIGAILMENT_HANDLE,IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1','3',a.SOCIAL_HANDLE_STATUS)) as BIGAILMENT_HANDLE,
a.FUND_HANDLE_STATUS,
a.CREATE_NAME,
a.ORGAN_NAME,
a.CREATE_TIME,
a.CONTRACT_NAME AS CONTRACT_TYPE,
a.CONTRACT_SUB_NAME,
a.CONTRACT_TERM,
a.CONTRACT_START,
a.CONTRACT_END,
a.AUDIT_REMARK,
a.TRUST_REMARK,
a.LEAVE_DATE,
a.REDUCE_REASON,
a.STATUS,
a.AUDIT_USER_NAME as AUDIT_USER,
a.AUDIT_TIME,
a.FUND_HANDLE_REMARK,
a.SOCIAL_HANDLE_REMARK,
a.FUND_REDUCE_DATE,
c.PROVIDENT_START,
if(a.FUND_ID = NULL,'',a.STATUS) as FUND_AUDIT_STATUS,
c.AUDIT_USER as FUND_AUDIT_USER,
c.HANDLE_USER as FUND_HANDLE_USER,
c.HANDLE_TIME as FUND_HANDLE_TIME,
s.AUDIT_USER as AUDIT_USER_NAME,
if(a.SOCIAL_ID =NULL,'',a.STATUS) as AUDIT_STATUS,
s.SOCIAL_START_DATE,
a.SOCIAL_REDUCE_DATE,
s.RECORD_BASE,
s.HANDLE_USER,
s.HANDLE_TIME,
s.UNIT_PENSION_CARDINAL,
s.UNIT_MEDICAL_CARDINAL,
s.UNIT_UNEMPLOYMENT_CARDINAL,
s.UNIT_BIGAILMENT_CARDINAL,
s.UNIT_WORK_INJURY_CARDINAL,
s.UNIT_BIRTH_CARDINAL
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME,
case when a.TYPE = 0 then "派增"
when a.TYPE = 1 then "派减"
else null end as "TYPE" ,
a.SOCIAL_HOUSEHOLD_NAME,
case when a.STATUS = 0 then "待办理"
when a.STATUS = 1 then "办理成功"
when a.STATUS = 2 then "办理失败"
when a.STATUS = 3 then "部分办理失败"
when a.STATUS = 4 then "办理中"
else null end as "SOCIAL_HANDLE_STATUS",
IF(a.TYPE='0',
case when s.PENSION_HANDLE = 0 then "待办理"
when s.PENSION_HANDLE = 1 then "办理成功"
when s.PENSION_HANDLE = 2 then "办理失败"
when s.PENSION_HANDLE = 3 then "已派减"
else null end,
IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1',"已派减",
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "已派减"
else null end
))
as PENSION_HANDLE,
IF(a.TYPE='0',
case when s.MEDICAL_HANDLE = 0 then "待办理"
when s.MEDICAL_HANDLE = 1 then "办理成功"
when s.MEDICAL_HANDLE = 2 then "办理失败"
when s.MEDICAL_HANDLE = 3 then "已派减"
else null end,
IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1',"已派减",
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "已派减"
else null end
))
as MEDICAL_HANDLE,
IF(a.TYPE='0',
case when s.UNEMPLOY_HANDLE = 0 then "待办理"
when s.UNEMPLOY_HANDLE = 1 then "办理成功"
when s.UNEMPLOY_HANDLE = 2 then "办理失败"
when s.UNEMPLOY_HANDLE = 3 then "已派减"
else null end,
IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1',"已派减",
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "已派减"
else null end
))
as UNEMPLOY_HANDLE,
IF(a.TYPE='0',
case when s.WORK_INJURY_HANDLE = 0 then "待办理"
when s.WORK_INJURY_HANDLE = 1 then "办理成功"
when s.WORK_INJURY_HANDLE = 2 then "办理失败"
when s.WORK_INJURY_HANDLE = 3 then "已派减"
else null end,
IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1',"已派减",
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "已派减"
else null end
))
as WORK_INJURY_HANDLE,
IF(a.TYPE='0',
case when s.BIRTH_HANDLE = 0 then "待办理"
when s.BIRTH_HANDLE = 1 then "办理成功"
when s.BIRTH_HANDLE = 2 then "办理失败"
when s.BIRTH_HANDLE = 3 then "已派减"
else null end,
IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1',"已派减",
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "已派减"
else null end
))
as BIRTH_HANDLE,
IF(a.TYPE='0',
case when s.BIGAILMENT_HANDLE = 0 then "待办理"
when s.BIGAILMENT_HANDLE = 1 then "办理成功"
when s.BIGAILMENT_HANDLE = 2 then "办理失败"
when s.BIGAILMENT_HANDLE = 3 then "已派减"
else null end,
IF(a.TYPE='1' and a.SOCIAL_HANDLE_STATUS = '1',"已派减",
case when a.SOCIAL_HANDLE_STATUS = 0 then "待办理"
when a.SOCIAL_HANDLE_STATUS = 1 then "办理成功"
when a.SOCIAL_HANDLE_STATUS = 2 then "办理失败"
when a.SOCIAL_HANDLE_STATUS = 3 then "已派减"
else null end
))
as BIGAILMENT_HANDLE,
case when a.FUND_HANDLE_STATUS = 0 then "待办理"
when a.FUND_HANDLE_STATUS = 1 then "办理成功"
when a.FUND_HANDLE_STATUS = 2 then "办理失败"
when a.FUND_HANDLE_STATUS = 3 then "已派减"
else null end as FUND_HANDLE_STATUS,
a.CREATE_NAME,
a.ORGAN_NAME,
a.CREATE_TIME,
a.CONTRACT_NAME AS CONTRACT_TYPE,
a.CONTRACT_SUB_NAME,
a.CONTRACT_TERM,
a.CONTRACT_START,
a.CONTRACT_END,
a.AUDIT_REMARK,
a.TRUST_REMARK,
a.LEAVE_DATE,
a.REDUCE_REASON,
case when a.STATUS = 0 then "未提交"
when a.STATUS = 1 then "待审核"
when a.STATUS = 2 then "审核通过"
when a.STATUS = 3 then "审核不通过"
when a.STATUS = 4 then "已办结"
else null end as STATUS,
a.AUDIT_USER_NAME as AUDIT_USER,
a.AUDIT_TIME,
a.FUND_HANDLE_REMARK,
a.SOCIAL_HANDLE_REMARK,
a.FUND_REDUCE_DATE,
c.PROVIDENT_START,
if(a.FUND_ID = NULL,'',
(case when a.STATUS = 0 then "未提交"
when a.STATUS = 1 then "待审核"
when a.STATUS = 2 then "审核通过"
when a.STATUS = 3 then "审核不通过"
when a.STATUS = 4 then "已办结"
else null end )
) as FUND_AUDIT_STATUS,
c.AUDIT_USER as FUND_AUDIT_USER,
c.HANDLE_USER as FUND_HANDLE_USER,
c.HANDLE_TIME as FUND_HANDLE_TIME,
s.AUDIT_USER as AUDIT_USER_NAME,
if(a.SOCIAL_ID =NULL,'',
(case when a.STATUS = 0 then "未提交"
when a.STATUS = 1 then "待审核"
when a.STATUS = 2 then "审核通过"
when a.STATUS = 3 then "审核不通过"
when a.STATUS = 4 then "已办结"
else null end )
) as AUDIT_STATUS,
s.SOCIAL_START_DATE,
a.SOCIAL_REDUCE_DATE,
s.RECORD_BASE,
s.HANDLE_USER,
s.HANDLE_TIME,
s.UNIT_PENSION_CARDINAL,
s.UNIT_MEDICAL_CARDINAL,
s.UNIT_UNEMPLOYMENT_CARDINAL,
s.UNIT_BIGAILMENT_CARDINAL,
s.UNIT_WORK_INJURY_CARDINAL,
s.UNIT_BIRTH_CARDINAL
from t_dispatch_info a
left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund c on c.id=a.FUND_ID
......
......@@ -545,12 +545,12 @@
a.PERSONAL_SOCIAL_SUM,
a.PERSONAL_FUND_SUM,
a.SUM_ALL,
a.FUND_PROVINCE,
a.FUND_CITY,
a.FUND_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a1.AREA_NAME as "FUND_PROVINCE",
a2.AREA_NAME as "FUND_CITY",
a3.AREA_NAME as "FUND_TOWN",
a4.AREA_NAME as "SOCIAL_PROVINCE",
a5.AREA_NAME as "SOCIAL_CITY",
a6.AREA_NAME as "SOCIAL_TOWN",
a.UNIT_PENSION_BASE,
a.UNIT_MEDICAL_BASE,
a.UNIT_UNEMPLOYMENT_BASE,
......@@ -575,11 +575,21 @@
a.PERSONAL_FUND_BASE,
a.UNIT_FUND_PROP,
a.PERSONAL_FUND_PROP,
a.DATA_PUSH,
CASE WHEN a.DATA_PUSH=0 THEN "未同步"
WHEN a.DATA_PUSH =1 THEN "已同步"
ELSE a.DATA_PUSH END as "DATA_PUSH",
a.CREATE_TIME,
a.DIFF_TYPE,
a.DATA_TYPE
CASE WHEN a.DATA_TYPE=0 THEN "社保"
WHEN a.DATA_TYPE =1 THEN "公积金"
ELSE a.DATA_TYPE END as "DATA_TYPE"
from t_forecast_library a
LEFT JOIN sys_area a1 on a1.id=a.FUND_PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.FUND_CITY
LEFT JOIN sys_area a3 on a3.id=a.FUND_TOWN
LEFT JOIN sys_area a4 on a4.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a5 on a5.id=a.SOCIAL_CITY
LEFT JOIN sys_area a6 on a6.id=a.SOCIAL_TOWN
<where>
1=1
<include refid="tForecastLibrary_where"/>
......
......@@ -176,12 +176,30 @@
<!--noPageDiy查询-->
<select id="noPageDiy" resultMap="incomeExportMap">
SELECT
<include refid="Base_Column_List"/>
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.UNIT_NAME,
a.UNIT_NO,
a.DEPT_NAME,
a.DEPT_NO,
if(a.FEE_TYPE=1,'管理费','风险金') FEE_TYPE,
if(a.FEE_MODE=1,'按比例',if(a.FEE_MODE=2,'金额-人数','金额-人次')) FEE_MODE,
a.CHARGES,
case a.SOURCE_TYPE when 1 then '社保' when 2 then '公积金' when 3 then '商险' else '薪资' end SOURCE_TYPE,
a.MONEY,
a.CREATE_MONTH,
a.PAY_MONTH,
a.CREATE_TIME,
a.DATA_CREATE_MONTH,
if(a.SEND_STATUS=0,'未推送','已推送') SEND_STATUS,
a.SEND_TIME,
a.SEND_MONTH,
a.APPLY_NO
FROM t_income a
<where>
1=1
<include refid="export_sql"/>
group by a.id
order by a.CREATE_TIME DESC
<if test="tIncome != null">
<if test="tIncome.limitStart != null">
......
......@@ -773,8 +773,12 @@
a.UNIT_PROVIDENT_SUM,
a.PERSONAL_PROIDENT_SET,
a.PERSONAL_PROVIDENT_SUM,
a.PUSH_STATUS,
a.LOCK_STATUS,
CASE WHEN a.PUSH_STATUS=0 THEN "已推送"
WHEN a.PUSH_STATUS =1 THEN "未推送"
ELSE a.PUSH_STATUS END as "PUSH_STATUS",
CASE WHEN a.LOCK_STATUS=0 THEN "未打标"
WHEN a.LOCK_STATUS =1 THEN "已打标"
ELSE a.LOCK_STATUS END as "LOCK_STATUS",
a.CREATE_NAME,
a.CREATE_TIME
FROM t_payment_info a
......@@ -913,7 +917,7 @@
a.UNIT_PROVIDENT_SUM
FROM t_payment_info a
<where>
a.SOCIAL_ID is not null
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
......@@ -971,7 +975,7 @@
SUM( a.UNIT_PROVIDENT_SUM ) AS UNIT_PROVIDENT_SUM
FROM t_payment_info a
<where>
a.FUND_ID is not null
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
......@@ -992,7 +996,7 @@
CONCAT( a.EMP_IDCARD, '_', a.SOCIAL_PAY_MONTH, '_', a.SOCIAL_CREATE_MONTH ) AS keyGroup
FROM t_payment_info a
<where>
a.SOCIAL_ID is not null
IFNULL(a.SOCIAL_ID,'1') != '1'
<include refid="tPaymentInfo_export_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.SOCIAL_PAY_MONTH,a.SOCIAL_CREATE_MONTH
......@@ -1002,7 +1006,7 @@
CONCAT( a.EMP_IDCARD, '_', a.PROVIDENT_PAY_MONTH, '_', a.PROVIDENT_CREATE_MONTH ) AS keyGroup
FROM t_payment_info a
<where>
a.FUND_ID is not null
IFNULL(a.FUND_ID,'1') != '1'
<include refid="tPaymentInfo_export_where"/>
</where>
GROUP BY a.EMP_IDCARD,a.PROVIDENT_PAY_MONTH,a.PROVIDENT_CREATE_MONTH
......
......@@ -936,113 +936,180 @@
<!--导出-->
<select id="exportList" resultMap="exportMap">
select
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
a.EMP_TYPE,
d.EMP_MOBILE,
a.ID,
a.EMP_NAME,
a.EMP_IDCARD,
case when a.EMP_TYPE = 0 then "外包"
when a.EMP_TYPE = 1 then "派遣"
when a.EMP_TYPE = 2 then "代理"
when a.EMP_TYPE = 3 then "内部员工"
else null end as "EMP_TYPE" ,
d.EMP_MOBILE,
if(a.SETTLE_DOMAIN_CODE = a.SETTLE_DOMAIN_CODE_FUND,a.SETTLE_DOMAIN_CODE,concat(ifnull(a.SETTLE_DOMAIN_CODE,""),if(a.SETTLE_DOMAIN_CODE is null or a.SETTLE_DOMAIN_CODE_FUND is null,"",","),ifnull(a.SETTLE_DOMAIN_CODE_FUND,""))) SETTLE_DOMAIN_CODE,
if(a.SETTLE_DOMAIN_NAME = a.SETTLE_DOMAIN_NAME_FUND,a.SETTLE_DOMAIN_NAME,concat(ifnull(a.SETTLE_DOMAIN_NAME,""),if(a.SETTLE_DOMAIN_NAME is null or a.SETTLE_DOMAIN_NAME_FUND is null,"",","),ifnull(a.SETTLE_DOMAIN_NAME_FUND,""))) SETTLE_DOMAIN_NAME,
if(a.UNIT_NAME = a.UNIT_NAME_FUND,a.UNIT_NAME,concat(ifnull(a.UNIT_NAME,""),if(a.UNIT_NAME is null or a.UNIT_NAME_FUND is null,"",","),ifnull(a.UNIT_NAME_FUND,""))) UNIT_NAME,
d.ID_CARD_PROVINCE,
d.ID_CARD_CITY,
d.ID_CARD_TOWN,
d.ID_CARD_ADDRESS,
d.FILE_PROVINCE,
d.FILE_CITY,
d.FILE_TOWN,
d.POST,
d.TRY_PERIOD,
d.WORKING_HOURS,
d.CONTRACT_NAME,
d.CONTRACT_SUB_NAME,
a.SOCIAL_HOUSEHOLD_NAME CONTRACT_PARTY,
d.CONTRACT_TYPE,
d.CONTRACT_START,
d.CONTRACT_END,
d.CONTRACT_TERM,
d.EDUCATION_NAME,
a.RECORD_BASE,
a.SOCIAL_STATUS,
a.FUND_STATUS,
a.SOCIAL_START_DATE,
a.PROVIDENT_START,
a.SOCIAL_REDUCE_DATE,
a.FUND_REDUCE_DATE,
a.UNIT_SOCIAL_SUM,
a.PERSONAL_SOCIAL_SUM,
a.UNIT_FUND_SUM,
a.PERSONAL_FUND_SUM,
ifnull(a.UNIT_SOCIAL_SUM,0) + ifnull(a.PERSONAL_SOCIAL_SUM,0) + ifnull(a.UNIT_FUND_SUM,0) + ifnull(a.PERSONAL_FUND_SUM,0) ALL_SUM,
a.SOCIAL_HOUSEHOLD_NAME,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.PENSION_START,
a.MEDICAL_START,
a.UNEMPLOY_START,
a.WORK_INJURY_START,
a.BIRTH_START,
a.BIGAILMENT_START,
a.PAYMENT_TYPE,
a1.AREA_NAME as "ID_CARD_PROVINCE",
a2.AREA_NAME as "ID_CARD_CITY",
a3.AREA_NAME as "ID_CARD_TOWN",
d.ID_CARD_ADDRESS,
d1.AREA_NAME as "FILE_PROVINCE",
d2.AREA_NAME as "FILE_CITY",
d3.AREA_NAME as "FILE_TOWN",
d.POST,
d.TRY_PERIOD,
case when d.WORKING_HOURS = 1 then "标准工时"
when d.WORKING_HOURS = 2 then "综合工时"
when d.WORKING_HOURS = 3 then "不定时工时制"
else null end as "WORKING_HOURS" ,
d.CONTRACT_NAME,
d.CONTRACT_SUB_NAME,
a.SOCIAL_HOUSEHOLD_NAME CONTRACT_PARTY,
d.CONTRACT_TYPE,
d.CONTRACT_START,
d.CONTRACT_END,
d.CONTRACT_TERM,
d.EDUCATION_NAME,
a.RECORD_BASE,
case when a.SOCIAL_STATUS = 0 then "派增待审核"
when a.SOCIAL_STATUS = 1 then "派增待办理"
when a.SOCIAL_STATUS = 2 then "派增办理中"
when a.SOCIAL_STATUS = 3 then "派增办理成功"
when a.SOCIAL_STATUS = 4 then "派增部分办理失败"
when a.SOCIAL_STATUS = 5 then "派增办理失败"
when a.SOCIAL_STATUS = 6 then "派减待审核"
when a.SOCIAL_STATUS = 7 then "派减待办理"
when a.SOCIAL_STATUS = 8 then "派减办理成功"
when a.SOCIAL_STATUS = 9 then "派减办理失败"
when a.SOCIAL_STATUS = 10 then "派增审核不通过"
else null end as "SOCIAL_STATUS" ,
case when a.FUND_STATUS = 0 then "派增待审核"
when a.FUND_STATUS = 1 then "派增待办理"
when a.FUND_STATUS = 3 then "派增办理成功"
when a.FUND_STATUS = 4 then "派增办理失败"
when a.FUND_STATUS = 5 then "派减待审核"
when a.FUND_STATUS = 6 then "派减待办理"
when a.FUND_STATUS = 7 then "派减办理成功"
when a.FUND_STATUS = 8 then "派减办理失败"
when a.FUND_STATUS = 9 then "派增审核不通过"
else null end as "FUND_STATUS" ,
a.SOCIAL_START_DATE,
a.PROVIDENT_START,
a.SOCIAL_REDUCE_DATE,
a.FUND_REDUCE_DATE,
a.UNIT_SOCIAL_SUM,
a.PERSONAL_SOCIAL_SUM,
a.UNIT_FUND_SUM,
a.PERSONAL_FUND_SUM,
ifnull(a.UNIT_SOCIAL_SUM,0) + ifnull(a.PERSONAL_SOCIAL_SUM,0) + ifnull(a.UNIT_FUND_SUM,0) + ifnull(a.PERSONAL_FUND_SUM,0) ALL_SUM,
a.SOCIAL_HOUSEHOLD_NAME,
s1.AREA_NAME as "SOCIAL_PROVINCE",
s2.AREA_NAME as "SOCIAL_CITY",
s3.AREA_NAME as "SOCIAL_TOWN",
a.PENSION_START,
a.MEDICAL_START,
a.UNEMPLOY_START,
a.WORK_INJURY_START,
a.BIRTH_START,
a.BIGAILMENT_START,
case when a.PAYMENT_TYPE = 0 then "最低"
when a.PAYMENT_TYPE = 1 then "自定义"
when a.PAYMENT_TYPE = 2 then "最高"
else null end as "PAYMENT_TYPE" ,
a.UNIT_PENSION_CARDINAL,
a.UNIT_PENSION_PER,
a.PERSONAL_PENSION_PER,
a.UNIT_PERSION_MONEY,
a.PERSONAL_PERSION_MONEY,
ifnull(a.UNIT_PERSION_MONEY,0) + ifnull(a.PERSONAL_PERSION_MONEY,0) PERSION_MONEY,
a.UNIT_PENSION_CARDINAL,
a.UNIT_PENSION_PER,
a.PERSONAL_PENSION_PER,
a.UNIT_PERSION_MONEY,
a.PERSONAL_PERSION_MONEY,
ifnull(a.UNIT_PERSION_MONEY,0) + ifnull(a.PERSONAL_PERSION_MONEY,0) PERSION_MONEY,
a.UNIT_MEDICAL_CARDINAL,
a.UNIT_MEDICAL_PER,
a.PERSONAL_MEDICAL_PER,
a.UNIT_MEDICAL_MONEY,
a.PERSONAL_MEDICAL_MONEY,
ifnull(a.UNIT_MEDICAL_MONEY,0) + ifnull(a.PERSONAL_MEDICAL_MONEY,0) MEDICAL_MONEY,
a.UNIT_MEDICAL_CARDINAL,
a.UNIT_MEDICAL_PER,
a.PERSONAL_MEDICAL_PER,
a.UNIT_MEDICAL_MONEY,
a.PERSONAL_MEDICAL_MONEY,
ifnull(a.UNIT_MEDICAL_MONEY,0) + ifnull(a.PERSONAL_MEDICAL_MONEY,0) MEDICAL_MONEY,
a.UNIT_UNEMPLOYMENT_CARDINAL,
a.UNIT_UNEMPLOYMENT_PER,
a.PERSONAL_UNEMPLOYMENT_PER,
a.UNIT_UNEMPLOYMENT_MONEY,
a.PERSONAL_UNEMPLOYMENT_MONEY,
ifnull(a.UNIT_UNEMPLOYMENT_MONEY,0) + ifnull(a.PERSONAL_UNEMPLOYMENT_MONEY,0) UNEMPLOYMENT_MONEY,
a.UNIT_UNEMPLOYMENT_CARDINAL,
a.UNIT_UNEMPLOYMENT_PER,
a.PERSONAL_UNEMPLOYMENT_PER,
a.UNIT_UNEMPLOYMENT_MONEY,
a.PERSONAL_UNEMPLOYMENT_MONEY,
ifnull(a.UNIT_UNEMPLOYMENT_MONEY,0) + ifnull(a.PERSONAL_UNEMPLOYMENT_MONEY,0) UNEMPLOYMENT_MONEY,
a.UNIT_WORK_INJURY_CARDINAL,
a.UNIT_WORK_UNJURY_PER,
a.UNIT_INJURY_MONEY,
a.UNIT_WORK_INJURY_CARDINAL,
a.UNIT_WORK_UNJURY_PER,
a.UNIT_INJURY_MONEY,
a.UNIT_BIRTH_CARDINAL,
a.UNIT_BIRTH_PER,
a.UNIT_BIRTH_MONEY,
a.UNIT_BIRTH_CARDINAL,
a.UNIT_BIRTH_PER,
a.UNIT_BIRTH_MONEY,
a.UNIT_BIGAILMENT_CARDINAL,
a.UNIT_BIGAILMENT_PER,
a.PERSONAL_BIGAILMENT_PER,
a.UNIT_BIGAILMENT_MONEY,
a.PERSONAL_BIGAILMENT_MONEY,
ifnull(a.UNIT_BIGAILMENT_MONEY,0) + ifnull(a.PERSONAL_BIGAILMENT_MONEY,0) BIGAILMENT_MONEY,
a.UNIT_BIGAILMENT_CARDINAL,
a.UNIT_BIGAILMENT_PER,
a.PERSONAL_BIGAILMENT_PER,
a.UNIT_BIGAILMENT_MONEY,
a.PERSONAL_BIGAILMENT_MONEY,
ifnull(a.UNIT_BIGAILMENT_MONEY,0) + ifnull(a.PERSONAL_BIGAILMENT_MONEY,0) BIGAILMENT_MONEY,
a.PROVIDENT_HOUSEHOLD_NAME,
d.FUND_PROVINCE,
d.FUND_CITY,
d.FUND_TOWN,
a.UNIT_PROVIDENG_CARDINAL,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
a.UNIT_FUND_SUM UNIT_FUND_SUM2,
a.PERSONAL_FUND_SUM PERSONAL_FUND_SUM2,
ifnull(a.UNIT_FUND_SUM,0) + ifnull(a.PERSONAL_FUND_SUM,0) FUND_SUM,
a.TRUST_REMARK,
a.PENSION_HANDLE,
a.MEDICAL_HANDLE,
a.UNEMPLOY_HANDLE,
a.WORK_INJURY_HANDLE,
a.BIRTH_HANDLE,
a.BIGAILMENT_HANDLE,
d.EMP_NATIONAL,
d.EMP_REGIS_TYPE
a.PROVIDENT_HOUSEHOLD_NAME,
f1.AREA_NAME as "FUND_PROVINCE",
f2.AREA_NAME as "FUND_CITY",
f3.AREA_NAME as "FUND_TOWN",
a.UNIT_PROVIDENG_CARDINAL,
a.UNIT_PROVIDENT_PER,
a.PERSONAL_PROVIDENT_PER,
a.UNIT_FUND_SUM UNIT_FUND_SUM2,
a.PERSONAL_FUND_SUM PERSONAL_FUND_SUM2,
ifnull(a.UNIT_FUND_SUM,0) + ifnull(a.PERSONAL_FUND_SUM,0) FUND_SUM,
a.TRUST_REMARK,
case when a.PENSION_HANDLE = 0 then "待办理"
when a.PENSION_HANDLE = 1 then "办理成功"
when a.PENSION_HANDLE = 2 then "办理失败"
when a.PENSION_HANDLE = 3 then "已派减"
else null end as "PENSION_HANDLE" ,
case when a.MEDICAL_HANDLE = 0 then "待办理"
when a.MEDICAL_HANDLE = 1 then "办理成功"
when a.MEDICAL_HANDLE = 2 then "办理失败"
when a.MEDICAL_HANDLE = 3 then "已派减"
else null end as "MEDICAL_HANDLE" ,
case when a.UNEMPLOY_HANDLE = 0 then "待办理"
when a.UNEMPLOY_HANDLE = 1 then "办理成功"
when a.UNEMPLOY_HANDLE = 2 then "办理失败"
when a.UNEMPLOY_HANDLE = 3 then "已派减"
else null end as "UNEMPLOY_HANDLE" ,
case when a.WORK_INJURY_HANDLE = 0 then "待办理"
when a.WORK_INJURY_HANDLE = 1 then "办理成功"
when a.WORK_INJURY_HANDLE = 2 then "办理失败"
when a.WORK_INJURY_HANDLE = 3 then "已派减"
else null end as "WORK_INJURY_HANDLE" ,
case when a.BIRTH_HANDLE = 0 then "待办理"
when a.BIRTH_HANDLE = 1 then "办理成功"
when a.BIRTH_HANDLE = 2 then "办理失败"
when a.BIRTH_HANDLE = 3 then "已派减"
else null end as "BIRTH_HANDLE" ,
case when a.BIGAILMENT_HANDLE = 0 then "待办理"
when a.BIGAILMENT_HANDLE = 1 then "办理成功"
when a.BIGAILMENT_HANDLE = 2 then "办理失败"
when a.BIGAILMENT_HANDLE = 3 then "已派减"
else null end as "BIGAILMENT_HANDLE" ,
d.EMP_NATIONAL,
d.EMP_REGIS_TYPE
from t_social_fund_info a
left join t_dispatch_info d on a.DISPATCH_ID=d.ID
LEFT JOIN sys_area a1 on d.ID_CARD_PROVINCE=a1.id
LEFT JOIN sys_area a2 on d.ID_CARD_CITY=a2.id
LEFT JOIN sys_area a3 on d.ID_CARD_TOWN=a3.id
LEFT JOIN sys_area s1 on a.SOCIAL_PROVINCE=s1.id
LEFT JOIN sys_area s2 on a.SOCIAL_CITY=s2.id
LEFT JOIN sys_area s3 on a.SOCIAL_TOWN=s3.id
LEFT JOIN sys_area f1 on d.FUND_PROVINCE=f1.id
LEFT JOIN sys_area f2 on d.FUND_CITY=f2.id
LEFT JOIN sys_area f3 on d.FUND_TOWN=f3.id
LEFT JOIN sys_area d1 on d.FILE_PROVINCE=d1.id
LEFT JOIN sys_area d2 on d.FILE_CITY=d2.id
LEFT JOIN sys_area d3 on d.FILE_TOWN=d3.id
<where>
1=1
<include refid="tSocialFundInfo_where"/>
......
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