Commit 8867accd authored by fangxinjiang's avatar fangxinjiang

薪资人员列表 查询 详情 导出

parent 1ed49f3a
package com.yifu.cloud.plus.v1.yifu.archives.vo; package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -12,9 +13,10 @@ import java.io.Serializable; ...@@ -12,9 +13,10 @@ import java.io.Serializable;
*/ */
@Data @Data
public class UpProjectSocialFundVo implements Serializable { public class UpProjectSocialFundVo implements Serializable {
// 社保状态 // 社保状态 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
@Schema(name = "社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减")
String socialStatus; String socialStatus;
// 公积金状态 // 公积金状态 社保状态(字典): 0 无社保 1 处理中 2.正常 3.已派减
String fundStatus; String fundStatus;
// 项目编码 // 项目编码
String departNo; String departNo;
......
...@@ -484,4 +484,8 @@ public interface ErrorCodes { ...@@ -484,4 +484,8 @@ public interface ErrorCodes {
* 派增异常: 已存在对应手机号码的在用员工档案 * 派增异常: 已存在对应手机号码的在用员工档案
*/ */
String EMP_DISPATCH_EMP_MOBILE_REPEAT = "emp.dispatch.emp.mobile.repeat"; String EMP_DISPATCH_EMP_MOBILE_REPEAT = "emp.dispatch.emp.mobile.repeat";
/**
* 派增异常: 同一身份证不可分多行派单
*/
String EMP_DISPATCH_EXIST = "emp_dispatch_exist";
} }
...@@ -185,6 +185,8 @@ emp.dispatch.social.diy.injury.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5355\u6D3E ...@@ -185,6 +185,8 @@ emp.dispatch.social.diy.injury.error=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5355\u6D3E
emp.dispatch.emp.mobile.repeat=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5DF2\u5B58\u5728\u5BF9\u5E94\u624B\u673A\u53F7\u7801\u7684\u5728\u7528\u5458\u5DE5\u6863\u6848 emp.dispatch.emp.mobile.repeat=\u6D3E\u589E\u5F02\u5E38\uFF1A \u5DF2\u5B58\u5728\u5BF9\u5E94\u624B\u673A\u53F7\u7801\u7684\u5728\u7528\u5458\u5DE5\u6863\u6848
emp_dispatch_exist=\u6D3E\u589E\u5F02\u5E38\uFF1A \u540C\u4E00\u8EAB\u4EFD\u8BC1\u4E0D\u53EF\u5206\u591A\u884C\u6D3E\u5355
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package com.yifu.cloud.plus.v1.yifu.salary.entity; package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -46,6 +47,7 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -46,6 +47,7 @@ public class TSalaryEmployee extends BaseEntity {
* 主键 * 主键
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ExcelIgnore
@ExcelProperty("主键") @ExcelProperty("主键")
private String id; private String id;
/** /**
...@@ -70,7 +72,15 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -70,7 +72,15 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "客户id", maxLength = 32) @ExcelAttribute(name = "客户id", maxLength = 32)
@Length(max = 32, message = "客户id不能超过32个字符") @Length(max = 32, message = "客户id不能超过32个字符")
@ExcelProperty("客户id") @ExcelProperty("客户id")
@ExcelIgnore
private String unitId; private String unitId;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/** /**
* 客户名称 * 客户名称
*/ */
...@@ -84,6 +94,7 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -84,6 +94,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "客户编码", maxLength = 32) @ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符") @Length(max = 32, message = "客户编码不能超过32个字符")
@ExcelProperty("客户编码") @ExcelProperty("客户编码")
@ExcelIgnore
private String unitNo; private String unitNo;
/** /**
* 项目id * 项目id
...@@ -91,6 +102,7 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -91,6 +102,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelAttribute(name = "项目id", maxLength = 32) @ExcelAttribute(name = "项目id", maxLength = 32)
@Length(max = 32, message = "项目id不能超过32个字符") @Length(max = 32, message = "项目id不能超过32个字符")
@ExcelProperty("项目id") @ExcelProperty("项目id")
@ExcelIgnore
private String deptId; private String deptId;
/** /**
* 项目名称 * 项目名称
...@@ -113,6 +125,18 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -113,6 +125,18 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "开户行总行不能超过50个字符") @Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行") @ExcelProperty("开户行总行")
private String bankName; private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省")
@ExcelProperty("开户行省")
private Integer bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市")
@ExcelProperty("开户行市")
private Integer bankCity;
/** /**
* 开户行支行 * 开户行支行
*/ */
...@@ -127,25 +151,6 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -127,25 +151,6 @@ public class TSalaryEmployee extends BaseEntity {
@Length(max = 50, message = "银行卡号不能超过50个字符") @Length(max = 50, message = "银行卡号不能超过50个字符")
@ExcelProperty("银行卡号") @ExcelProperty("银行卡号")
private String bankNo; private String bankNo;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省")
@ExcelProperty("开户行省")
private Integer bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市")
@ExcelProperty("开户行市")
private Integer bankCity;
/** /**
* 手机号码 * 手机号码
*/ */
......
...@@ -255,5 +255,11 @@ public class TSalaryStandard extends BaseEntity { ...@@ -255,5 +255,11 @@ public class TSalaryStandard extends BaseEntity {
@Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符") @Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符")
@ExcelProperty("推送月份(YYYYMM)") @ExcelProperty("推送月份(YYYYMM)")
private String sendMonth; private String sendMonth;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
} }
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* @Author fxj
* @Date 2022/8/8
* @Description
* @Version 1.0
*/
@Data
public class TSalaryStandardExportVo implements Serializable {
/**
* 状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)
*/
@ExcelAttribute(name = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)")
@NotBlank(message = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空")
@ExcelProperty("状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)")
private Integer status;
/**
* 推送月份(YYYYMM)
*/
@ExcelAttribute(name = "推送月份", isNotEmpty = true, errorInfo = "推送月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "推送月份(YYYYMM)不能为空")
@Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符")
@ExcelProperty("推送月份")
private String sendMonth;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称",errorInfo = "项目名称不能为空", maxLength = 50)
@NotBlank(message = "项目名称不能为空")
@Length(max = 50, message = "部门名称不能超过50个字符")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 32)
@Length(max = 32, message = "项目编码不能超过32个字符")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 项目金额
*/
@ExcelAttribute(name = "项目金额")
@ExcelProperty("项目金额")
private BigDecimal settlementAmount;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
/**
* 工资月份(YYYYMM)
*/
@ExcelAttribute(name = "工资月份(YYYYMM)", isNotEmpty = true, errorInfo = "工资月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "工资月份(YYYYMM)不能为空")
@Length(max = 6, message = "工资月份(YYYYMM)不能超过6个字符")
@ExcelProperty("薪酬月份")
private String salaryMonth;
/**
* 表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬
*/
@ExcelAttribute(name = "表单类型", isDataId = true, readConverterExp = "0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬")
@NotBlank(message = "表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬不能为空")
@Length(max = 32, message = "表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬不能超过32个字符")
@ExcelProperty("表单类型")
private String formType;
/**
* 创建时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "创建时间")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
...@@ -132,7 +132,7 @@ public class TSalaryEmployeeController { ...@@ -132,7 +132,7 @@ public class TSalaryEmployeeController {
/** /**
* 薪酬人员表 批量导出 * 薪酬人员表 批量导出
* *
* @author hgw * @author fxj
* @date 2022-08-05 11:40:14 * @date 2022-08-05 11:40:14
**/ **/
@Operation(description = "导出薪酬人员表 hasPermission('salary_tsalaryemployee-export')") @Operation(description = "导出薪酬人员表 hasPermission('salary_tsalaryemployee-export')")
......
...@@ -118,7 +118,7 @@ public class TSalaryStandardController { ...@@ -118,7 +118,7 @@ public class TSalaryStandardController {
/** /**
* 标准薪酬工资表 批量导出 * 标准薪酬工资表 批量导出
* *
* @author hgw * @author fxj
* @date 2022-08-05 11:40:14 * @date 2022-08-05 11:40:14
**/ **/
@Operation(description = "导出标准薪酬工资表 hasPermission('salary_tsalarystandard-export')") @Operation(description = "导出标准薪酬工资表 hasPermission('salary_tsalarystandard-export')")
......
...@@ -19,10 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper; ...@@ -19,10 +19,15 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; 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 org.apache.ibatis.annotations.Mapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 标准薪酬工资表 * 标准薪酬工资表
* *
...@@ -44,4 +49,8 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> { ...@@ -44,4 +49,8 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
* @return * @return
*/ */
IPage<TSalaryStandard> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard); IPage<TSalaryStandard> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
List<TSalaryStandardExportVo> getSalaryStandardExport( @Param("tSalaryStandard") TSalaryStandardSearchVo searchVo);
int getSalaryStandardExportCount(TSalaryStandardSearchVo searchVo);
} }
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.IService; ...@@ -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.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; 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 com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -47,7 +48,7 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> { ...@@ -47,7 +48,7 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo); void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo);
List<TSalaryStandard> noPageDiy(TSalaryStandardSearchVo searchVo); List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo);
/** /**
* 标准薪酬工资表审核页面简单分页查询 * 标准薪酬工资表审核页面简单分页查询
......
...@@ -76,7 +76,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -76,7 +76,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
*/ */
@Override @Override
public void listExport(HttpServletResponse response, TSalaryEmployeeSearchVo searchVo) { public void listExport(HttpServletResponse response, TSalaryEmployeeSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "薪酬人员表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<TSalaryEmployee> list = new ArrayList<>(); List<TSalaryEmployee> list = new ArrayList<>();
long count = noPageCountDiy(searchVo); long count = noPageCountDiy(searchVo);
...@@ -167,6 +167,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -167,6 +167,12 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
if (Common.isNotNull(entity.getCreateName())) { if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TSalaryEmployee::getCreateName, entity.getCreateName()); wrapper.eq(TSalaryEmployee::getCreateName, entity.getCreateName());
} }
if (Common.isNotNull(entity.getEmpName())) {
wrapper.eq(TSalaryEmployee::getEmpName, entity.getEmpName());
}
if (Common.isNotNull(entity.getEmpIdcard())) {
wrapper.eq(TSalaryEmployee::getEmpIdcard, entity.getEmpIdcard());
}
return wrapper; return wrapper;
} }
......
...@@ -36,6 +36,7 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; ...@@ -36,6 +36,7 @@ import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard; 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.mapper.TSalaryStandardMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService; 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.TSalaryStandardSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -76,9 +77,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -76,9 +77,9 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
*/ */
@Override @Override
public void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo) { public void listExport(HttpServletResponse response, TSalaryStandardSearchVo searchVo) {
String fileName = "不良记录批量导出" + DateUtil.getThisTime() + ".xlsx"; String fileName = "标准薪酬工资表批量导出" + DateUtil.getThisTime() + ".xlsx";
//获取要导出的列表 //获取要导出的列表
List<TSalaryStandard> list = new ArrayList<>(); List<TSalaryStandardExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo); long count = noPageCountDiy(searchVo);
ServletOutputStream out = null; ServletOutputStream out = null;
try { try {
...@@ -88,7 +89,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -88,7 +89,7 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭 // 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list); //EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandard.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TSalaryStandardExportVo.class).build();
int index = 0; int index = 0;
if (count > CommonConstants.ZERO_INT) { if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; ) { for (int i = 0; i <= count; ) {
...@@ -97,8 +98,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -97,8 +98,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT); searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo); list = noPageDiy(searchVo);
if (Common.isNotNull(list)) { if (Common.isNotNull(list)) {
ExcelUtil<TSalaryStandard> util = new ExcelUtil<>(TSalaryStandard.class); ExcelUtil<TSalaryStandardExportVo> util = new ExcelUtil<>(TSalaryStandardExportVo.class);
for (TSalaryStandard vo : list) { for (TSalaryStandardExportVo vo : list) {
util.convertEntity(vo, null, null, null); util.convertEntity(vo, null, null, null);
} }
} }
...@@ -135,39 +136,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -135,39 +136,12 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
} }
@Override @Override
public List<TSalaryStandard> noPageDiy(TSalaryStandardSearchVo searchVo) { public List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandard> wrapper = buildQueryWrapper(searchVo); return baseMapper.getSalaryStandardExport(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandard::getId, idList);
}
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
}
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper);
} }
private Long noPageCountDiy(TSalaryStandardSearchVo searchVo) { private int noPageCountDiy(TSalaryStandardSearchVo searchVo) {
LambdaQueryWrapper<TSalaryStandard> wrapper = buildQueryWrapper(searchVo); return baseMapper.getSalaryStandardExportCount(searchVo);
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryStandard::getId, idList);
}
return baseMapper.selectCount(wrapper);
}
private LambdaQueryWrapper buildQueryWrapper(TSalaryStandardSearchVo entity) {
LambdaQueryWrapper<TSalaryStandard> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(TSalaryStandard::getCreateTime, entity.getCreateTimes()[0])
.le(TSalaryStandard::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(TSalaryStandard::getCreateName, entity.getCreateName());
}
return wrapper;
} }
@Override @Override
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
<result property="unitName" column="UNIT_NAME"/> <result property="unitName" column="UNIT_NAME"/>
<result property="sendTime" column="SEND_TIME"/> <result property="sendTime" column="SEND_TIME"/>
<result property="sendMonth" column="SEND_MONTH"/> <result property="sendMonth" column="SEND_MONTH"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
...@@ -94,7 +95,8 @@ ...@@ -94,7 +95,8 @@
a.UNIT_NAME, a.UNIT_NAME,
a.UNIT_NO, a.UNIT_NO,
a.SEND_TIME, a.SEND_TIME,
a.SEND_MONTH a.SEND_MONTH,
a.INVOICE_TITLE
</sql> </sql>
<sql id="tSalaryStandard_where"> <sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null"> <if test="tSalaryStandard != null">
...@@ -219,23 +221,60 @@ ...@@ -219,23 +221,60 @@
FROM t_salary_standard a FROM t_salary_standard a
<where> <where>
1=1 1=1
<if test="tSalaryStandard != null"> <include refid="where_page"/>
<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''"> </where>
AND a.DEPT_NAME like concat(#{'%',#{tSalaryStandard.deptName},'%') </select>
</if> <!--tSalaryStandard简单分页查询-->
<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''"> <select id="getSalaryStandardExport" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo">
AND a.DEPT_NO = #{tSalaryStandard.deptNo} SELECT
</if> a.STATUS,
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''"> a.SEND_MONTH,
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth} a.DEPT_NAME,
</if> a.DEPT_NO,
<if test="tSalaryStandard.status == null"> a.SETTLEMENT_AMOUNT,
AND a.STATUS = 1 OR a.STATUS = 2 a.ID,
</if> a.DEPT_ID,
<if test="tSalaryStandard.status != null"> a.BELONG_DEPT_ID,
AND a.STATUS = #{tSalaryStandard.status} a.BELONG_DEPT_CODE,
</if> a.SETTLEMENT_MONTH,
</if> a.INVOICE_TITLE,
a.CREATE_NAME,
a.SALARY_MONTH,
a.FORM_TYPE,
a.CREATE_TIME
FROM t_salary_standard a
<where>
1=1
<include refid="where_page"/>
</where>
</select>
<!--tSalaryStandard简单分页查询-->
<select id="getSalaryStandardExportCount" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_salary_standard a
<where>
1=1
<include refid="where_page"/>
</where> </where>
</select> </select>
<sql id="where_page">
<if test="tSalaryStandard != null">
<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
AND a.DEPT_NAME like concat(#{'%',#{tSalaryStandard.deptName},'%')
</if>
<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
AND a.DEPT_NO = #{tSalaryStandard.deptNo}
</if>
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if>
<if test="tSalaryStandard.status == null">
AND a.STATUS = 1 OR a.STATUS = 2
</if>
<if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status}
</if>
</if>
</sql>
</mapper> </mapper>
...@@ -100,7 +100,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable { ...@@ -100,7 +100,7 @@ public class TDispatchReduceVo extends RowIndex implements Serializable {
/** /**
* 委托备注 * 委托备注
*/ */
@ExcelAttribute(name = "委托备注") @ExcelAttribute(name = "委托备注" , maxLength = 200)
@Schema(description = "委托备注" ) @Schema(description = "委托备注" )
@ExcelProperty("委托备注" ) @ExcelProperty("委托备注" )
private String trustRemark; private String trustRemark;
......
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