Commit c4606483 authored by fangxinjiang's avatar fangxinjiang

有工资无社保 & 最低工资提醒 & 代码优化

parent 2f6ff279
......@@ -546,7 +546,7 @@ public class FddContractInfoServiceImpl extends ServiceImpl<FddContractInfoMappe
BufferedOutputStream fos = new BufferedOutputStream(response.getOutputStream());
response.reset();
response.setContentType("application/zip;");
response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode("合同.zip", CommonConstants.UTF8));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, "attachment; filename=" + URLEncoder.encode("合同.zip", CommonConstants.UTF8));
fos.write(rspData.getFileBytes());
}
}
......
......@@ -211,9 +211,9 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TEmpBadRecord.class).build();
......
......@@ -921,9 +921,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同").doWrite(list);
......@@ -961,9 +961,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeContractExportVO.class).includeColumnFiledNames(contractInfo.getExportFields())
.sheet("员工合同【合并历史】").doWrite(list);
......
......@@ -1979,9 +1979,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CommonConstants.UTF8));
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("人员档案").doWrite(list);
......@@ -2020,9 +2020,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
util.convertEntity(vo, null, null, null);
}
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeExportVO.class).includeColumnFiledNames(employeeInfo.getExportFields())
.sheet("离职档案").doWrite(list);
......
......@@ -1223,9 +1223,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
for (EmployeeProjectExportVO vo : list) {
util.convertEntity(vo, null, null, null);
}
response.setContentType("multipart/form-data");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding(CommonConstants.UTF8);
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, EmployeeProjectExportVO.class).includeColumnFiledNames(includeColumnFiledNames).sheet("项目档案")
.doWrite(list);
......
......@@ -42,7 +42,7 @@ public class AuthUtils {
@SneakyThrows
public String[] extractAndDecodeHeader(String header) {
byte[] base64Token = header.substring(6).getBytes("UTF-8");
byte[] base64Token = header.substring(6).getBytes(CommonConstants.UTF8);
byte[] decoded;
try {
decoded = Base64.decode(base64Token);
......
......@@ -19,9 +19,11 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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;
......@@ -184,5 +186,18 @@ public class SysMessageSalary extends BaseEntity {
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("客户名称")
private String customerName;
/**
* 原因大类 根据数据字典来判断
*/
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = false)
private Integer reasonType;
/**
* 反馈原因
*/
@Schema(description = "反馈原因", name = "reasonType")
@ExcelAttribute(name = "反馈原因", maxLength = 32)
@ExcelProperty(value = "反馈原因")
private Integer feedBack;
}
package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
......@@ -121,9 +122,15 @@ public class THaveSalaryNosocial extends BaseEntity {
/**
* 原因大类 根据数据字典来判断
*/
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer reasonType;
/**
* 反馈原因
*/
@Schema(description = "反馈原因", name = "reasonType")
@ExcelAttribute(name = "反馈原因", maxLength = 32, needExport = true)
@ExcelProperty(value = "反馈原因")
private String feedBack;
}
/*
* 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.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
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.salary.entity.SysMessageSalary;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 最低工资提醒-每月更新一次
*
* @author fxj
* @date 2022-08-05 11:40:14
*/
@Data
public class SysMessageSalaryExportVo extends SysMessageSalary {
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称", isNotEmpty = true, errorInfo = "客户名称不能为空", maxLength = 50)
@NotBlank(message = "客户名称不能为空")
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("客户名称")
private String customerName;
/**
* 部门名称
*/
@ExcelAttribute(name = "部门名称", isNotEmpty = true, errorInfo = "部门名称不能为空", maxLength = 50)
@NotBlank(message = "部门名称不能为空")
@Length(max = 50, message = "部门名称不能超过50个字符")
@ExcelProperty("部门名称")
private String departName;
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", maxLength = 50)
@Length(max = 50, message = "employeeName不能超过50个字符")
@ExcelProperty("员工姓名")
private String employeeName;
/**
* employeeIdnum
*/
@ExcelAttribute(name = "employeeIdnum", maxLength = 50)
@Length(max = 50, message = "employeeIdnum不能超过50个字符")
@ExcelProperty("employeeIdnum")
private String employeeIdnum;
/**
* 工资月
*/
@ExcelAttribute(name = "工资月", maxLength = 10)
@Length(max = 10, message = "工资月不能超过10个字符")
@ExcelProperty("工资月")
private String salaryMonth;
/**
* 实发工资
*/
@ExcelAttribute(name = "实发工资", isNotEmpty = true, errorInfo = "实发工资不能为空")
@NotBlank(message = "实发工资不能为空")
@ExcelProperty("实发工资")
private BigDecimal actualSalary;
/**
* 应发工资
*/
@ExcelAttribute(name = "应发工资")
@ExcelProperty("应发工资")
private BigDecimal relaySalary;
/**
* 省
*/
@ExcelAttribute(name = "省")
@ExcelProperty("省")
private Integer province;
/**
* 市
*/
@ExcelAttribute(name = "市")
@ExcelProperty("市")
private Integer city;
/**
* 县
*/
@ExcelAttribute(name = "县")
@ExcelProperty("县")
private Integer town;
/**
* 最低工资标准
*/
@ExcelAttribute(name = "最低工资标准")
@ExcelProperty("最低工资标准")
private BigDecimal salaryBase;
/**
* 工资制表人-创建人
*/
@ExcelAttribute(name = "工资制表人-创建人", maxLength = 32)
@Length(max = 32, message = "工资制表人-创建人不能超过32个字符")
@ExcelProperty("创建人")
private String salaryMakeMan;
/**
* 反馈
*/
@ExcelAttribute(name = "反馈", maxLength = 300)
@Length(max = 300, message = "反馈不能超过300个字符")
@ExcelProperty("反馈")
private String feedback;
/**
* 原因大类 根据数据字典来判断
*/
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer reasonType;
}
......@@ -25,7 +25,7 @@ import java.time.LocalDateTime;
/**
* 最低工资提醒-每月更新一次
*
* @author hgw
* @author fxj
* @date 2022-08-05 11:40:14
*/
@Data
......
......@@ -28,6 +28,7 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelAttribute(name = "客户名称", maxLength = 50,needExport=true)
@Schema(description = "客户名称", name = "customerName")
@ExcelProperty(value = "客户名称")
private String customerName;
/**
* 结算主体名称
......@@ -36,6 +37,7 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
@Length(max = 50, message = "结算主体名称不能超过50个字符")
@ExcelAttribute(name = "结算主体名称", isNotEmpty = true, errorInfo = "结算主体名称不能为空", maxLength = 50,needExport=true)
@Schema(description = "结算主体名称", name = "settlementOrganName")
@ExcelProperty(value = "项目名称")
private String settlementOrganName;
/**
* 员工名称
......@@ -43,6 +45,7 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
@Length(max = 32, message = "员工名称不能超过32个字符")
@ExcelAttribute(name = "员工名称", maxLength = 32,needExport=true)
@Schema(description = "员工名称", name = "employeeName")
@ExcelProperty(value = "员工名称")
private String employeeName;
/**
* 身份证号
......@@ -50,22 +53,16 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelAttribute(name = "身份证号", maxLength = 32,needExport=true)
@Schema(description = "身份证号", name = "employeeIdCard")
@ExcelProperty(value = "身份证号")
private String employeeIdCard;
/**
* 员工类型
*/
@TableField(exist = false)
@ExcelAttribute(name = "员工类型", errorInfo = "员工类型不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_TYPE, needExport = true)
@Schema(description = "员工类型", name = "empType")
private String empType;
/**
* 工资月份
*/
@NotBlank(message = "工资月份不能为空")
@ExcelAttribute(name = "工资月份", isNotEmpty = true, errorInfo = "工资月份不能为空",needExport=true)
@Schema(description = "工资月份", name = "month")
@ExcelProperty(value = "工资月份")
private String month;
/**
......@@ -73,23 +70,16 @@ public class THaveSalaryNoSocialExportVo extends THaveSalaryNosocial implements
*/
@Schema(description = "应发工资", name = "relaySalary")
@ExcelAttribute(name = "应发工资", isNotEmpty = true, errorInfo = "应发工资不能为空", needExport = true)
@ExcelProperty(value = "应发工资")
private String relaySalary;
/**
* 在职状态 (0在职;1离职)
*/
@TableField(exist = false)
@ExcelAttribute(name = "在职状态", errorInfo = "在职状态 0是/1否不能为空", maxLength = 1, isDataId = true, readConverterExp = "0=在职,1=离职", needExport = true)
@Schema(description = "在职状态 0是/1否", name = "workFlag")
private String workFlag;
/**
* 原因大类 根据数据字典来判断
* 反馈原因
*/
@TableField(exist = false)
@Schema(description = "原因大类 根据数据字典来判断 ", name = "reasonType")
@ExcelAttribute(name = "原因大类", errorInfo = "原因大类不能为空", maxLength = 32, isDataId = true, dataType = ExcelAttributeConstants.HAVE_SALARY_NO_SOCIAL_TYPE, needExport = true)
private Integer reasonType;
@Schema(description = "反馈原因", name = "reasonType")
@ExcelAttribute(name = "反馈原因", maxLength = 32, needExport = true)
@ExcelProperty(value = "反馈原因")
private String feedBack;
/**
* 创建者-姓名
......
......@@ -30,8 +30,6 @@ import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 原表表头与配置关联表
......
......@@ -23,10 +23,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
......
......@@ -118,13 +118,13 @@ public class THaveSalaryNosocialController {
/**
* @Author fxj
* @Description 消息提醒导出
* @Description 有工资无社保消息提醒导出
* @Date 15:28 2022/8/17
* @Param
* @return
**/
@SysLog("消息提醒导出")
@Operation(description = "导出")
@SysLog("有工资无社保消息提醒导出")
@Operation(description = "有工资无社保消息提醒导出")
@PostMapping("/export")
public void export(HttpServletResponse response,
THaveSalaryNosocialSearchVo searchVo) {
......@@ -138,11 +138,13 @@ public class THaveSalaryNosocialController {
* @Param
* @return
**/
@Operation(description = "反馈")
@SysLog("有工资无社保消息提醒反馈")
@Operation(description = "有工资无社保消息提醒反馈")
@PostMapping("/feedback")
public R<String> feedback(@RequestParam(name = "reasonType",required = true) Integer reasonType,
@RequestParam(name = "id",required = true) String id) {
return tHaveSalaryNosocialService.feedback(reasonType,id);
public R<String> feedback(@RequestParam(name = "id",required = true) String id,
@RequestParam(name = "reasonType",required = true) Integer reasonType,
@RequestParam(name = "feedBack",required = true) String feedBack) {
return tHaveSalaryNosocialService.feedback(reasonType,id,feedBack);
}
......
......@@ -38,7 +38,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.Date;
......
......@@ -26,11 +26,11 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusSearchVo;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......
......@@ -26,11 +26,11 @@ import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryPaymentRes;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryPaymentRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MTitleConfig;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MTitleConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 原表表头与配置关联表
......
......@@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -58,17 +58,13 @@ public interface SysMessageSalaryMapper extends BaseMapper<SysMessageSalary> {
**/
void deleteAllBySettleMonth(@Param("settleMonth") String settleMonth);
List<SysMessageSalary> getByIdExport(String[] ids);
List<SysMessageSalaryExportVo> noPageDiy(@Param("sysMessageSalary")SysMessageSalarySearchVo searchVo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql);
List<SysMessageSalary> getExport(@Param("sysMessageSalary") SysMessageSalary vo, @Param("settleDomainVos") List<TSettleDomainSelectVo> settleDomainVos);
List<SysMessageSalaryHandelExportVo> getByIdHandleExport(String[] ids);
List<SysMessageSalaryHandelExportVo> getHandleExport(@Param("sysMessageSalary") SysMessageSalaryHandelExportVo vo);
List<SysMessageSalary> getLastTHaveSalaryNosocial(@Param("lastOneMonth")String lastOneMonth,@Param("lastTwoMonth") String lastTwoMonth,@Param("lastThreeMonth") String lastThreeMonth);
List<SysMessageSalaryTemplExportVo> getTempExport(@Param("settleMonth")String settleMonth);
int noPageCountDiy(@Param("sysMessageSalary")SysMessageSalarySearchVo searchVo,
@Param("settleDomainIds")List<String> settleDomains,
@Param("idsStr") List<String> idsStr,
@Param("sql")String sql);
}
......@@ -3,7 +3,6 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
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.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TDeptSee;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TDeptSee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 项目薪资查询权限配置表-薪资配置1
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TPauseSalary;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TPauseSalary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 暂停发表
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount2022;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount2022;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 工资报账主表2022
......
......@@ -18,12 +18,12 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
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.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAtta;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 薪酬人员表
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryExcelCheck;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryExcelCheck;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 工资EXCEL校验配置表
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryLock;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryLock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 薪资导入、删除锁定表(锁定后不可导入删除,除非清理掉数据)
......
......@@ -18,12 +18,12 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
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.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReport;
import org.apache.ibatis.annotations.Mapper;
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 org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 统计-本期申报
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReportMarket;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsCurrentReportMarket;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 统计-本期申报-回盘数据
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsLabor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsRemuneration;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 统计-工资薪金
......
......@@ -18,10 +18,10 @@
package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalaryRule;
import org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxSalaryRule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 个税申报手动刷新限制表
......
......@@ -3,12 +3,12 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
/**
* 最低工资提醒-每月更新一次
......@@ -29,37 +29,26 @@ public interface SysMessageSalaryService extends IService<SysMessageSalary> {
IPage<SysMessageSalary> getSysMessageSalaryHandlePage(Page<SysMessageSalary> page, SysMessageSalary sysMessageSalary);
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
* @Author fxj
* @Description 新增-普通工资
* @Date 19:43 2022/8/17
**/
void insertSalaryBySettleMonth(@Param("settleMonth") String settleMonth);
/**
* @param settleMonth 结算月
* @Description: 生成前,先删除老数据
* @Author: hgw
* @Date: 2019/11/21 17:28
* @return: void
**/
* @Author fxj
* @Description 生成前,先删除老数据
* @Date 19:42 2022/8/17
* @Param settleMonth 结算月
* @return
**/
void deleteAllBySettleMonth(String settleMonth);
void createSysMessageSalaryTemp(String settleMonth);
List<SysMessageSalary> getByIdExport(String[] ids);
List<SysMessageSalary> getExport(SysMessageSalary vo);
List<SysMessageSalaryHandelExportVo> getByIdHandleExport(String[] ids);
List<SysMessageSalaryHandelExportVo> getHandleExport(SysMessageSalaryHandelExportVo vo);
List<SysMessageSalaryTemplExportVo> getTempExport(String settleMonth);
List<SysMessageSalary> getLastTHaveSalaryNosocial(String lastOneMonth, String lastTwoMonth, String lastThreeMonth);
void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo);
void createSysMessageSalaryTemp(String settleMonth);
R<String> feedback(Integer reasonType, String id, String feedBack);
}
......@@ -17,10 +17,11 @@
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import java.util.List;
/**
......
......@@ -5,11 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 有资没有社保(首页提醒定时任务)
......@@ -32,17 +30,8 @@ public interface THaveSalaryNosocialService extends IService<THaveSalaryNosocial
void generate(String settleMonth);
List<THaveSalaryNosocial> getByIdExport(String[] ids);
List<THaveSalaryNosocial> getExport(THaveSalaryNosocial vo);
List<THaveSalaryNosocialHandleExportVo> getByIdHandleExport(String[] ids);
List<THaveSalaryNosocialHandleExportVo> getHandleExport(THaveSalaryNosocial vo);
List<THaveSalaryNosocial> getLastTHaveSalaryNosocial(String lastOneMonth,String lastTwoMonth,String lastThreeMonth);
void listExport(HttpServletResponse response, THaveSalaryNosocialSearchVo searchVo);
R<String> feedback(Integer reasonType, String id);
R<String> feedback(Integer reasonType, String id, String feedBack);
}
......@@ -6,9 +6,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccountItem;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
......
......@@ -17,16 +17,14 @@
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.vo.TSalaryAccountSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
......
......@@ -17,13 +17,14 @@
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TStatisticsBonus;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
......
......@@ -17,14 +17,13 @@
package com.yifu.cloud.plus.v1.yifu.salary.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -9,25 +12,31 @@ import com.google.common.collect.Maps;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.SysMessageSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.service.SysMessageSalaryTempService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalaryTemp;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalarySearchVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -86,12 +95,10 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
}
/**
* @param settleMonth
* @Description: 新增-普通工资
* @Author: hgw
* @Date: 2019/11/21 18:10
* @return: java.util.List<com.yifu.cloud.v1.hrms.api.vo.SysMessageSalaryVo>
**/
* @Author fxj
* @Description 新增-普通工资
* @Date 18:19 2022/8/17
**/
@Transactional
@Override
public void insertSalaryBySettleMonth(String settleMonth) {
......@@ -144,49 +151,6 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
baseMapper.deleteAllBySettleMonth(settleMonth);
}
@Override
public List<SysMessageSalary> getByIdExport(String[] ids) {
return baseMapper.getByIdExport(ids);
}
@Override
public List<SysMessageSalary> getExport(SysMessageSalary vo) {
YifuUser user = SecurityUtils.getUser();
/*if (!SecurityUtils.isHaveAllOrg(ServiceNameConstants.SERVICE_NAME_WXHR, user)) {
R<List<TSettleDomainSelectVo>> remoteGetTSettleDomainVo = preRemoteBasicArchivesService.getInnerSettleDomainSelectVosByExtendUser(SecurityUtils.getUser());
if (remoteGetTSettleDomainVo == null) {
throw new CheckedException("调用结算主体服务失败");
}
if (CommonConstants.SUCCESS != remoteGetTSettleDomainVo.getCode()) {
throw new CheckedException("调用结算主体返回失败");
}
List<TSettleDomainSelectVo> remoteSettleDomainVoData = remoteGetTSettleDomainVo.getData();
return baseMapper.getExport(vo, remoteSettleDomainVoData);
} else {
}*/
return baseMapper.getExport(vo, null);
}
@Override
public List<SysMessageSalaryTemplExportVo> getTempExport(String settleMonth) {
return baseMapper.getTempExport(settleMonth);
}
@Override
public List<SysMessageSalaryHandelExportVo> getByIdHandleExport(String[] ids) {
return baseMapper.getByIdHandleExport(ids);
}
@Override
public List<SysMessageSalaryHandelExportVo> getHandleExport(SysMessageSalaryHandelExportVo vo) {
return baseMapper.getHandleExport(vo);
}
@Override
public List<SysMessageSalary> getLastTHaveSalaryNosocial(String lastOneMonth, String lastTwoMonth, String lastThreeMonth) {
return baseMapper.getLastTHaveSalaryNosocial(lastOneMonth, lastTwoMonth, lastThreeMonth);
}
@Override
public void createSysMessageSalaryTemp(String month) {
......@@ -235,4 +199,107 @@ public class SysMessageSalaryServiceImpl extends ServiceImpl<SysMessageSalaryMap
}
/**
* @Author fxj
* @Description 最低工资提醒导出
* @Date 18:12 2022/8/17
**/
@Override
public void listExport(HttpServletResponse response, SysMessageSalarySearchVo searchVo) {
String fileName = "最低工资提醒导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表
List<SysMessageSalaryExportVo> list = new ArrayList<>();
// TODO
List<String> settleDomainIds =null;
List<String> ids = null;
String sql = null;
int count = noPageCountDiy(searchVo,settleDomainIds,ids,sql);
ServletOutputStream out = null;
try {
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));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, SysMessageSalaryExportVo.class).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
for (int i = 0; i <= count; ) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo,settleDomainIds,ids,sql);
if (Common.isNotNull(list)){
ExcelUtil<SysMessageSalaryExportVo> util = new ExcelUtil<>(SysMessageSalaryExportVo.class);
for (SysMessageSalaryExportVo vo:list){
util.convertEntity(vo,null,null,null);
}
}
if (Common.isNotNull(list)){
WriteSheet 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<SysMessageSalaryExportVo> noPageDiy(SysMessageSalarySearchVo searchVo,
List<String> settleDomainIds,
List<String> ids,
String sql) {
return baseMapper.noPageDiy(searchVo,settleDomainIds,ids,sql);
}
private int noPageCountDiy(SysMessageSalarySearchVo searchVo,
List<String> settleDomainIds,
List<String> ids,
String sql) {
return baseMapper.noPageCountDiy(searchVo,settleDomainIds,ids,sql);
}
/**
* @Author fxj
* @Description 反馈信息
* @Date 17:23 2022/8/17
* @Param
* @return
**/
@Override
public R<String> feedback(Integer reasonType, String id, String feedBack) {
SysMessageSalary entity = baseMapper.selectById(id);
if (Common.isEmpty(entity)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
entity.setReasonType(reasonType);
entity.setFeedback(feedBack);
int res = baseMapper.updateById(entity);
if (res == CommonConstants.ONE_INT_NEGATE){
return R.failed(CommonConstants.SAVE_FAILED);
}
return R.ok(null,CommonConstants.SAVE_SUCCESS);
}
}
......@@ -16,19 +16,20 @@
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.util.Common;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TApprovalRecordMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
/**
* 审批记录表
*
......
......@@ -4,7 +4,6 @@ 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.archives.vo.TSettleDomainListVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
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.R;
......@@ -15,11 +14,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TConfigSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Author fxj
* @Description 工资报账配置
......
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import cn.hutool.core.util.ArrayUtil;
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;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Maps;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord;
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.CommonConstants;
......@@ -23,14 +20,12 @@ import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.THaveSalaryNosocialMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.THaveSalaryNosocialService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialHandleExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNosocialSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.vo.HaveSalaryNoSocialVo;
......@@ -167,41 +162,6 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
}
@Override
public List<THaveSalaryNosocial> getByIdExport(String[] ids) {
return baseMapper.getByIdExport(ids);
}
@Override
public List<THaveSalaryNosocial> getExport(THaveSalaryNosocial vo) {
YifuUser user = SecurityUtils.getUser();
/* TODO if (!SecurityUtils.isHaveAllOrg(ServiceNameConstants.SERVICE_NAME_WXHR, user)) {
R<List<TSettleDomainSelectVo>> remoteGetTSettleDomainVo =
preRemoteBasicArchivesService.getInnerSettleDomainSelectVosByExtendUser(SecurityUtils.getUser());
if (remoteGetTSettleDomainVo == null || remoteGetTSettleDomainVo.getData() == null) {
throw new CheckedException("未获取到相关结算信息");
}
return baseMapper.getExport(vo, remoteGetTSettleDomainVo.getData());
}*/
return baseMapper.getExport(vo, null);
}
@Override
public List<THaveSalaryNosocialHandleExportVo> getByIdHandleExport(String[] ids) {
return baseMapper.getByIdHandleExport(ids);
}
@Override
public List<THaveSalaryNosocialHandleExportVo> getHandleExport(THaveSalaryNosocial vo) {
return baseMapper.getHandleExport(vo);
}
@Override
public List<THaveSalaryNosocial> getLastTHaveSalaryNosocial(String lastOneMonth, String lastTwoMonth, String lastThreeMonth) {
return baseMapper.getLastTHaveSalaryNosocial(lastOneMonth,lastTwoMonth,lastThreeMonth);
}
public List<THaveSalaryNoSocialExportVo> noPageDiy(THaveSalaryNosocialSearchVo searchVo,
List<String> settleDomainIds,
List<String> ids,
......@@ -236,9 +196,9 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, THaveSalaryNoSocialExportVo.class).build();
int index = 0;
......@@ -294,12 +254,13 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
* @return
**/
@Override
public R<String> feedback(Integer reasonType, String id) {
public R<String> feedback(Integer reasonType, String id, String feedBack) {
THaveSalaryNosocial entity = baseMapper.selectById(id);
if (Common.isEmpty(entity)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
entity.setReasonType(reasonType);
entity.setFeedBack(feedBack);
int res = baseMapper.updateById(entity);
if (res == CommonConstants.ONE_INT_NEGATE){
return R.failed(CommonConstants.SAVE_FAILED);
......
......@@ -16,43 +16,15 @@
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
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.salary.entity.TPauseSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPauseSalaryVo;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TPauseSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TPauseSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPauseSalarySearchVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
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.vo.TPauseSalarySearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
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;
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.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
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;
/**
* 暂停发表
*
......
......@@ -11,11 +11,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountItemMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountItemService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.math.BigDecimal;
import java.util.*;
......
......@@ -16,14 +16,8 @@
*/
package com.yifu.cloud.plus.v1.yifu.salary.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;
......@@ -31,22 +25,21 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
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.salary.entity.THaveSalaryNosocial;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryAccountMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.AccountCheckVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.ArrayList;
......@@ -88,9 +81,9 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "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();
int index = 0;
......
......@@ -95,9 +95,9 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryEmployee.class).build();
......
......@@ -33,14 +33,19 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprSocialProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.constants.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.entity.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.MSalaryEstimate;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TApprovalRecord;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryAccount;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.*;
import com.yifu.cloud.plus.v1.yifu.salary.service.MSalaryEstimateService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TApprovalRecordService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryAccountService;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService;
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.TSalaryStandardVo;
......@@ -53,10 +58,9 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
/**
* 标准薪酬工资表
......@@ -105,9 +109,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandardExportVo.class).build();
int index = 0;
......
......@@ -16,21 +16,6 @@
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusVo;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
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.vo.TStatisticsBonusSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
......@@ -40,15 +25,29 @@ 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsBonus;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsBonusMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsBonusService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsBonusVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
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.stream.Collectors;
/**
......@@ -85,9 +84,9 @@ public class TStatisticsBonusServiceImpl extends ServiceImpl<TStatisticsBonusMap
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsBonus.class).build();
int index = 0;
......
......@@ -81,9 +81,9 @@ public class TStatisticsCurrentReportMarketServiceImpl extends ServiceImpl<TStat
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsCurrentReportMarket.class).build();
......
......@@ -81,9 +81,9 @@ public class TStatisticsCurrentReportServiceImpl extends ServiceImpl<TStatistics
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsCurrentReport.class).build();
......
......@@ -16,20 +16,6 @@
*/
package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
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.vo.TStatisticsDeclarerSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
......@@ -38,13 +24,25 @@ 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
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.*;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsDeclarer;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TStatisticsDeclarerMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TStatisticsDeclarerService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TStatisticsDeclarerVo;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
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;
......@@ -84,9 +82,9 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
}
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "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();
int index = 0;
......
......@@ -83,9 +83,9 @@ public class TStatisticsLaborServiceImpl extends ServiceImpl<TStatisticsLaborMap
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsLabor.class).build();
int index = 0;
......
......@@ -79,9 +79,9 @@ public class TStatisticsRemunerationServiceImpl extends ServiceImpl<TStatisticsR
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsRemuneration.class).build();
int index = 0;
......
......@@ -81,9 +81,9 @@ public class TStatisticsTaxSalaryServiceImpl extends ServiceImpl<TStatisticsTaxS
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TStatisticsTaxSalary.class).build();
......
......@@ -6,7 +6,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ExcelException;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -20,7 +19,6 @@ import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountItemVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryAccountVo;
import lombok.Data;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable;
......
......@@ -261,82 +261,56 @@
</delete>
<select id="getByIdExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary">
SELECT
<include refid="Base_Column_List"/>
FROM sys_message_salary a
where 1=1
<if test="array.length > 0">
and id in
<foreach collection="array" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="array.length == 0">
and 1=2
</if>
</select>
<select id="getExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary">
SELECT
<include refid="Base_Column_List"/>,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
<include refid="sysMessageSalarySql"/>
<include refid="sysMessageSalary_where"/>
</where>
</select>
<select id="getByIdHandleExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo">
SELECT
<include refid="Base_Column_List"/>
FROM sys_message_salary a
where 1=1
<if test="array.length > 0">
and id in
<foreach collection="array" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="array.length == 0">
and 1=2
</if>
<!--noPageDiy查询-->
<select id="noPageDiy" resultMap="sysMessageSalaryMap">
SELECT
<include refid="Base_Column_List"/>,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include refid="export_sql"/>
</where>
</select>
</select>
<!--noPageCountDiy查询-->
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include refid="export_sql"/>
</where>
</select>
<sql id="export_sql">
<include refid="sysMessageSalary_where"/>
<if test="idsStr != null and idsStr.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items}
</foreach>
</if>
<!--数据权限判断-->
<if test="settleDomainIds != null">
<if test="settleDomainIds.size() > 0">
and a.SETTLE_DOMAIN_ID in
<foreach collection="settleDomainIds" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
<if test="settleDomainVos.size() == 0">
and 1=2
</if>
</if>
<if test="settleDomainVos == null">
and 1=1
</if>
<if test='sql != null and sql != ""'>
and <![CDATA[sql]]>
</if>
</sql>
<select id="getHandleExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryHandelExportVo">
SELECT
<include refid="Base_Column_List"/>,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=2) or (b.id is null))
<include refid="sysMessageSalary_where"/>
</where>
</select>
<select id="getLastTHaveSalaryNosocial" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.SysMessageSalary">
SELECT
<include refid="Base_Column_List"/>,
b.*
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
where a.settle_month in(#{lastOneMonth},#{lastTwoMonth},#{lastThreeMonth}) and b.REASON_TYPE is not null
</select>
<select id="getTempExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.SysMessageSalaryTemplExportVo">
SELECT
<include refid="Base_Column_List"/>,
b.*, t.times
FROM sys_message_salary a
left join t_feed_back b on a.ID=b.RELATE_ID
left join sys_message_salary_temp t on a.id=t.RELATE_ID
where a.settle_month in(#{settleMonth}) and t.id is not null
</select>
</mapper>
......@@ -11,6 +11,7 @@
<result property="customerName" column="CUSTOMER_NAME"/>
<result property="settlementOrganName" column="SETTLEMENT_ORGAN_NAME"/>
<result property="settlementOrganNo" column="SETTLEMENT_ORGAN_NO"/>
<result property="feedBack" column="FEEDBACK"/>
<result property="month" column="month"/>
</resultMap>
<resultMap id="haveSalaryNoSocialExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.THaveSalaryNoSocialExportVo">
......@@ -21,6 +22,8 @@
<result property="month" column="month"/>
<result property="relaySalary" column="RELAY_SALARY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="feedBack" column="FEEDBACK"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -206,7 +209,8 @@
<include refid="Base_Column_List"/>
,b.*
FROM t_have_salary_nosocial a
<include refid="querPage"/>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include refid="export_where"/>
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
......@@ -215,31 +219,34 @@
left join t_feed_back b on a.ID=b.RELATE_ID
<where>
1=1 and ((b.IGNORE_FLAG=1 and b.TYPE=1) or (b.id is null))
<include refid="tHaveSalaryNosocial_where"/>
<if test="idsStr != null and idsStr.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items}
<include refid="export_where"/>
</where>
</select>
<sql id="export_where">
<include refid="tHaveSalaryNosocial_where"/>
<if test="idsStr != null and idsStr.size > 0">
AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items}
</foreach>
</if>
<!--数据权限判断-->
<if test="settleDomainIds != null">
<if test="settleDomainIds.size() > 0">
and a.SETTLE_DOMAIN_ID in
<foreach collection="settleDomainIds" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
<!--数据权限判断-->
<if test="settleDomainIds != null">
<if test="settleDomainIds.size() > 0">
and a.SETTLE_DOMAIN_ID in
<foreach collection="settleDomainIds" item="param" index="index" open="(" close=")" separator=",">
#{param}
</foreach>
</if>
<if test="settleDomainVos.size() == 0">
and 1=2
</if>
</if>
<if test="settleDomainVos == null">
and 1=1
<if test="settleDomainVos.size() == 0">
and 1=2
</if>
<if test='sql != null and sql != ""'>
and <![CDATA[sql]]>
</if>
</where>
</select>
</if>
<if test="settleDomainVos == null">
and 1=1
</if>
<if test='sql != null and sql != ""'>
and <![CDATA[sql]]>
</if>
</sql>
</mapper>
......@@ -79,9 +79,9 @@ public class TAuditInfoServiceImpl extends ServiceImpl<TAuditInfoMapper, TAuditI
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TAuditInfo.class).build();
......
......@@ -80,9 +80,9 @@ public class TDispatchDayConfServiceImpl extends ServiceImpl<TDispatchDayConfMap
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TDispatchDayConf.class).build();
......
......@@ -124,9 +124,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "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();
int index = 0;
......
......@@ -98,9 +98,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("预估费用").doWrite(list)
ExcelWriter excelWriter = EasyExcel.write(out, TForecastLibraryExportVo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
......
......@@ -82,9 +82,9 @@ public class TPaymentInfoImportLogServiceImpl extends ServiceImpl<TPaymentInfoIm
for (TPaymentInfoImportLogVo vo : list) {
util.convertEntity(vo, null, null, null);
}
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, TPaymentInfoImportLogVo.class).includeColumnFiledNames(getExportFieldNameDetailByClass(TPaymentInfoImportLogVo.class)).sheet("社保导入日志")
.doWrite(list);
......
......@@ -143,9 +143,9 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, TPaymentInfo.class).includeColumnFiledNames(searchVo.getExportFields()).build();
int index = 0;
......
......@@ -882,9 +882,9 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
for (TPreDispatchExportVo vo : list) {
util.convertEntity(vo, null, null, null);
}
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel.write(out, TPreDispatchExportVo.class).includeColumnFiledNames(tPreDispatchInfo.getExportFields()).sheet("预派单")
.doWrite(list);
......
......@@ -80,9 +80,9 @@ public class TProvidentFundServiceImpl extends ServiceImpl<TProvidentFundMapper,
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TProvidentFund.class).build();
......
......@@ -80,9 +80,9 @@ public class TSocialFundHistoryServiceImpl extends ServiceImpl<TSocialFundHistor
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TSocialFundHistory.class).build();
......
......@@ -103,9 +103,9 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "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();
int index = 0;
......
......@@ -79,9 +79,9 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TSocialInfo.class).build();
......
......@@ -86,9 +86,9 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
ServletOutputStream out = null;
try {
out = response.getOutputStream();
response.setContentType("multipart/form-data");
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName , "UTF-8"));
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , CommonConstants.UTF8));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, ${className}.class).build();
......
......@@ -36,7 +36,7 @@ public class I18nUtil {
// load prop
Resource resource = new ClassPathResource(i18nFile);
EncodedResource encodedResource = new EncodedResource(resource, "UTF-8");
EncodedResource encodedResource = new EncodedResource(resource, CommonConstants.UTF8);
prop = PropertiesLoaderUtils.loadProperties(encodedResource);
}
catch (IOException e) {
......
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