Commit cbcc250c authored by fangxinjiang's avatar fangxinjiang

BUG修复

parent cb2eb69c
...@@ -64,14 +64,7 @@ public class TSalaryAccount { ...@@ -64,14 +64,7 @@ public class TSalaryAccount {
@Length(max = 32, message = "工资表ID不能超过32个字符") @Length(max = 32, message = "工资表ID不能超过32个字符")
@ExcelProperty("工资表ID") @ExcelProperty("工资表ID")
private String salaryFormId; private String salaryFormId;
/**
* 薪酬月份
*/
@ExcelAttribute(name = "薪酬月份", isNotEmpty = true, errorInfo = "薪酬月份不能为空", maxLength = 6)
@NotBlank(message = "薪酬月份不能为空")
@Length(max = 6, message = "薪酬月份不能超过6个字符")
@ExcelProperty("薪酬月份")
private String salaryMonth;
/** /**
* 员工 ID * 员工 ID
*/ */
...@@ -93,6 +86,13 @@ public class TSalaryAccount { ...@@ -93,6 +86,13 @@ public class TSalaryAccount {
@Length(max = 25, message = "身份证号不能超过25个字符") @Length(max = 25, message = "身份证号不能超过25个字符")
@ExcelProperty("身份证号") @ExcelProperty("身份证号")
private String empIdcard; private String empIdcard;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号码", maxLength = 11)
@Length(max = 11, message = "手机号码不能超过11个字符")
@ExcelProperty("手机号码")
private String empPhone;
/** /**
* 银行卡号 * 银行卡号
*/ */
...@@ -107,6 +107,25 @@ public class TSalaryAccount { ...@@ -107,6 +107,25 @@ public class TSalaryAccount {
@Length(max = 50, message = "开户行总行不能超过50个字符") @Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行") @ExcelProperty("开户行总行")
private String bankName; private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省", isArea = true)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市", isArea = true, parentField = "bankProvince")
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@ExcelProperty("开户行支行")
private String bankSubName;
/** /**
* 项目id * 项目id
*/ */
...@@ -169,13 +188,21 @@ public class TSalaryAccount { ...@@ -169,13 +188,21 @@ public class TSalaryAccount {
@ExcelProperty("公积金扣缴月份") @ExcelProperty("公积金扣缴月份")
private String deduProvidentMonth; private String deduProvidentMonth;
/** /**
* 报表类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬 * 表单类型0:薪资;1:绩效;2:其他;3:劳务费;4:稿酬
*/ */
@ExcelAttribute(name = "报表类型", readConverterExp = "0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬") @ExcelAttribute(name = "表单类型", readConverterExp = "0=薪资,1=绩效,2=其他,3=劳务费,4=稿酬")
@NotBlank(message = "报表类型不能为空") @NotBlank(message = "表单类型不能为空")
@Length(max = 32, message = "报表类型不能超过32个字符") @Length(max = 32, message = "表单类型不能超过32个字符")
@ExcelProperty("报表类型") @ExcelProperty("表单类型")
private String formType; private String formType;
/**
* 薪酬月份
*/
@ExcelAttribute(name = "薪酬月份", isNotEmpty = true, errorInfo = "薪酬月份不能为空", maxLength = 6)
@NotBlank(message = "薪酬月份不能为空")
@Length(max = 6, message = "薪酬月份不能超过6个字符")
@ExcelProperty("薪酬月份")
private String salaryMonth;
/** /**
* 结算月 * 结算月
*/ */
...@@ -265,13 +292,7 @@ public class TSalaryAccount { ...@@ -265,13 +292,7 @@ public class TSalaryAccount {
@ExcelAttribute(name = "县") @ExcelAttribute(name = "县")
@ExcelProperty("县") @ExcelProperty("县")
private Integer town; private Integer town;
/**
* 手机号
*/
@ExcelAttribute(name = "手机号码", maxLength = 11)
@Length(max = 11, message = "手机号码不能超过11个字符")
@ExcelProperty("手机号码")
private String empPhone;
/** /**
* 是否自有员工0:否;1:是自有员工 * 是否自有员工0:否;1:是自有员工
*/ */
...@@ -295,25 +316,7 @@ public class TSalaryAccount { ...@@ -295,25 +316,7 @@ public class TSalaryAccount {
@ExcelAttribute(name = "本月是否重复金额0:否;1:是重复导入的") @ExcelAttribute(name = "本月是否重复金额0:否;1:是重复导入的")
@ExcelProperty("本月是否重复金额0:否;1:是重复导入的") @ExcelProperty("本月是否重复金额0:否;1:是重复导入的")
private Integer isRepeat; private Integer isRepeat;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省", isArea = true)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市", isArea = true, parentField = "bankProvince")
@ExcelProperty("开户行市")
private String bankCity;
/** /**
* 是否个人承担部分税费:0否1是 * 是否个人承担部分税费:0否1是
*/ */
......
...@@ -19,9 +19,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity; ...@@ -19,9 +19,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
import com.alibaba.excel.annotation.ExcelIgnore; 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.*;
import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat;
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.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -30,6 +29,7 @@ import lombok.EqualsAndHashCode; ...@@ -30,6 +29,7 @@ import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
/** /**
* 薪酬人员表 * 薪酬人员表
...@@ -74,6 +74,20 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -74,6 +74,20 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelProperty("客户id") @ExcelProperty("客户id")
@ExcelIgnore @ExcelIgnore
private String unitId; private String unitId;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 30)
@Length(max = 30, message = "项目编码不能超过30个字符")
@ExcelProperty("项目编码")
private String deptNo;
/** /**
* 封面抬头 * 封面抬头
*/ */
...@@ -104,20 +118,7 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -104,20 +118,7 @@ public class TSalaryEmployee extends BaseEntity {
@ExcelProperty("项目id") @ExcelProperty("项目id")
@ExcelIgnore @ExcelIgnore
private String deptId; private String deptId;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 30)
@Length(max = 30, message = "项目编码不能超过30个字符")
@ExcelProperty("项目编码")
private String deptNo;
/** /**
* 开户行总行 * 开户行总行
*/ */
...@@ -130,13 +131,13 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -130,13 +131,13 @@ public class TSalaryEmployee extends BaseEntity {
*/ */
@ExcelAttribute(name = "开户行省",isArea = true) @ExcelAttribute(name = "开户行省",isArea = true)
@ExcelProperty("开户行省") @ExcelProperty("开户行省")
private Integer bankProvince; private String bankProvince;
/** /**
* 开户行市 * 开户行市
*/ */
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince") @ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@ExcelProperty("开户行市") @ExcelProperty("开户行市")
private Integer bankCity; private String bankCity;
/** /**
* 开户行支行 * 开户行支行
*/ */
...@@ -170,6 +171,5 @@ public class TSalaryEmployee extends BaseEntity { ...@@ -170,6 +171,5 @@ public class TSalaryEmployee extends BaseEntity {
*/ */
@ExcelAttribute(name = "在职状态",isDataId = true,readConverterExp = "0=在职,1=离职") @ExcelAttribute(name = "在职状态",isDataId = true,readConverterExp = "0=在职,1=离职")
@ExcelProperty("在职状态") @ExcelProperty("在职状态")
private Integer fileStatus; private String fileStatus;
} }
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* @Author fxj
* @Date 2022/8/25
* @Description
* @Version 1.0
*/
@Data
public class TSalaryEmployeeExportVo{
/**
* 员工姓名
*/
@ExcelAttribute(name = "员工姓名", isNotEmpty = true, errorInfo = "员工姓名不能为空", maxLength = 32)
@NotBlank(message = "员工姓名不能为空")
@Length(max = 32, message = "员工姓名不能超过32个字符")
@ExcelProperty("员工姓名")
private String empName;
/**
* 身份证号
*/
@ExcelAttribute(name = "身份证号", isNotEmpty = true, errorInfo = "身份证号不能为空", maxLength = 32)
@NotBlank(message = "身份证号不能为空")
@Length(max = 32, message = "身份证号不能超过32个字符")
@ExcelProperty("身份证号")
private String empIdcard;
/**
* 客户id
*/
@ExcelAttribute(name = "客户id", maxLength = 32)
@Length(max = 32, message = "客户id不能超过32个字符")
@ExcelProperty("客户id")
@ExcelIgnore
private String unitId;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过50个字符")
@ExcelProperty("项目名称")
private String deptName;
/**
* 项目编码
*/
@ExcelAttribute(name = "项目编码", maxLength = 30)
@Length(max = 30, message = "项目编码不能超过30个字符")
@ExcelProperty("项目编码")
private String deptNo;
/**
* 封面抬头
*/
@ExcelAttribute(name = "封面抬头", maxLength = 50)
@Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头")
private String invoiceTitle;
/**
* 客户名称
*/
@ExcelAttribute(name = "客户名称", maxLength = 50)
@Length(max = 50, message = "客户名称不能超过50个字符")
@ExcelProperty("客户名称")
private String unitName;
/**
* 客户编码
*/
@ExcelAttribute(name = "客户编码", maxLength = 32)
@Length(max = 32, message = "客户编码不能超过32个字符")
@ExcelProperty("客户编码")
@ExcelIgnore
private String unitNo;
/**
* 项目id
*/
@ExcelAttribute(name = "项目id", maxLength = 32)
@Length(max = 32, message = "项目id不能超过32个字符")
@ExcelProperty("项目id")
@ExcelIgnore
private String deptId;
/**
* 开户行总行
*/
@ExcelAttribute(name = "开户行总行", maxLength = 50)
@Length(max = 50, message = "开户行总行不能超过50个字符")
@ExcelProperty("开户行总行")
private String bankName;
/**
* 开户行省
*/
@ExcelAttribute(name = "开户行省",isArea = true)
@ExcelProperty("开户行省")
private String bankProvince;
/**
* 开户行市
*/
@ExcelAttribute(name = "开户行市",isArea = true,parentField = "bankProvince")
@ExcelProperty("开户行市")
private String bankCity;
/**
* 开户行支行
*/
@ExcelAttribute(name = "开户行支行", maxLength = 50)
@Length(max = 50, message = "开户行支行不能超过50个字符")
@ExcelProperty("开户行支行")
private String bankSubName;
/**
* 银行卡号
*/
@ExcelAttribute(name = "银行卡号", maxLength = 50)
@Length(max = 50, message = "银行卡号不能超过50个字符")
@ExcelProperty("银行卡号")
private String bankNo;
/**
* 手机号码
*/
@ExcelAttribute(name = "手机号码", maxLength = 32)
@Length(max = 32, message = "手机号码不能超过32个字符")
@ExcelProperty("手机号码")
private String empPhone;
/**
* 计税月份
*/
@ExcelAttribute(name = "计税月份", maxLength = 6)
@Length(max = 6, message = "计税月份不能超过6个字符")
@ExcelProperty("计税月份")
private String taxMonth;
/**
* 在职状态(0在职;1离职)
*/
@ExcelAttribute(name = "在职状态",isDataId = true,readConverterExp = "0=在职,1=离职")
@ExcelProperty("在职状态")
private String fileStatus;
}
...@@ -27,7 +27,7 @@ public class TSalaryStandardExportVo implements Serializable { ...@@ -27,7 +27,7 @@ public class TSalaryStandardExportVo implements Serializable {
*/ */
@ExcelAttribute(name = "状态", isDataId = true, readConverterExp = "0=待提交,1=待审核,2=待推送,3=已推送待发放,4=已发放,5=审核不通过,6=确认不通过,7=财务退回,8=结算单调整待审核,9=结算单调整待打印") @ExcelAttribute(name = "状态", isDataId = true, readConverterExp = "0=待提交,1=待审核,2=待推送,3=已推送待发放,4=已发放,5=审核不通过,6=确认不通过,7=财务退回,8=结算单调整待审核,9=结算单调整待打印")
@NotBlank(message = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空") @NotBlank(message = "状态(0待提交1待审核2:待推送3已推送待发放4已发放5审核不通过6确认不通过7财务退回8:结算单调整待审核 9: 结算单调整待打印)不能为空")
@ExcelProperty("状态") @ExcelProperty("薪酬状态")
private String status; private String status;
/** /**
* 推送月份(YYYYMM) * 推送月份(YYYYMM)
...@@ -35,7 +35,7 @@ public class TSalaryStandardExportVo implements Serializable { ...@@ -35,7 +35,7 @@ public class TSalaryStandardExportVo implements Serializable {
@ExcelAttribute(name = "推送月份", isNotEmpty = true, errorInfo = "推送月份(YYYYMM)不能为空", maxLength = 6) @ExcelAttribute(name = "推送月份", isNotEmpty = true, errorInfo = "推送月份(YYYYMM)不能为空", maxLength = 6)
@NotBlank(message = "推送月份(YYYYMM)不能为空") @NotBlank(message = "推送月份(YYYYMM)不能为空")
@Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符") @Length(max = 6, message = "推送月份(YYYYMM)不能超过6个字符")
@ExcelProperty("推送月份") @ExcelProperty("发放月份")
private String sendMonth; private String sendMonth;
/** /**
* 项目名称 * 项目名称
...@@ -65,13 +65,6 @@ public class TSalaryStandardExportVo implements Serializable { ...@@ -65,13 +65,6 @@ public class TSalaryStandardExportVo implements Serializable {
@Length(max = 50, message = "封面抬头不能超过50个字符") @Length(max = 50, message = "封面抬头不能超过50个字符")
@ExcelProperty("封面抬头") @ExcelProperty("封面抬头")
private String invoiceTitle; private String invoiceTitle;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
/** /**
* 工资月份(YYYYMM) * 工资月份(YYYYMM)
*/ */
...@@ -97,4 +90,11 @@ public class TSalaryStandardExportVo implements Serializable { ...@@ -97,4 +90,11 @@ public class TSalaryStandardExportVo implements Serializable {
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
private LocalDateTime createTime; private LocalDateTime createTime;
/**
* 创建者-姓名
*/
@Schema(description = "创建人-姓名")
@TableField(fill = FieldFill.INSERT)
@ExcelProperty("创建人")
private String createName;
} }
...@@ -72,6 +72,7 @@ public class TSalaryAccountController { ...@@ -72,6 +72,7 @@ public class TSalaryAccountController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TSalaryAccount>> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) { public R<IPage<TSalaryAccount>> getTSalaryAccountPage(Page<TSalaryAccount> page, TSalaryAccountSearchVo tSalaryAccount) {
tSalaryAccount.setDeleteFlag(CommonConstants.ZERO_INT);
return new R<>(tSalaryAccountService.getTSalaryAccountPage(page, tSalaryAccount)); return new R<>(tSalaryAccountService.getTSalaryAccountPage(page, tSalaryAccount));
} }
......
...@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -23,6 +23,7 @@ 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.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -71,7 +72,7 @@ public class TSalaryEmployeeController { ...@@ -71,7 +72,7 @@ public class TSalaryEmployeeController {
@Operation(summary = "不分页查询", description = "不分页查询") @Operation(summary = "不分页查询", description = "不分页查询")
@PostMapping("/noPage") @PostMapping("/noPage")
//@PreAuthorize("@pms.hasPermission('salary_tsalaryemployee_get')" ) //@PreAuthorize("@pms.hasPermission('salary_tsalaryemployee_get')" )
public R<List<TSalaryEmployee>> getTSalaryEmployeeNoPage(@RequestBody TSalaryEmployeeSearchVo tSalaryEmployee) { public R<List<TSalaryEmployeeExportVo>> getTSalaryEmployeeNoPage(@RequestBody TSalaryEmployeeSearchVo tSalaryEmployee) {
return R.ok(tSalaryEmployeeService.noPageDiy(tSalaryEmployee)); return R.ok(tSalaryEmployeeService.noPageDiy(tSalaryEmployee));
} }
......
...@@ -68,6 +68,7 @@ public class TSalaryStandardController { ...@@ -68,6 +68,7 @@ public class TSalaryStandardController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TSalaryStandard>> getTSalaryStandardPage(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) { public R<IPage<TSalaryStandard>> getTSalaryStandardPage(Page<TSalaryStandard> page, TSalaryStandardSearchVo tSalaryStandard) {
tSalaryStandard.setDeleteFlag(CommonConstants.ZERO_INT);
return new R<>(tSalaryStandardService.getTSalaryStandardPage(page, tSalaryStandard)); return new R<>(tSalaryStandardService.getTSalaryStandardPage(page, tSalaryStandard));
} }
......
...@@ -21,8 +21,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -21,8 +21,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 薪酬人员表 * 薪酬人员表
* *
...@@ -37,4 +42,6 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> { ...@@ -37,4 +42,6 @@ public interface TSalaryEmployeeMapper extends BaseMapper<TSalaryEmployee> {
* @return * @return
*/ */
IPage<TSalaryEmployee> getTSalaryEmployeePage(Page<TSalaryEmployee> page, @Param("tSalaryEmployee") TSalaryEmployee tSalaryEmployee); IPage<TSalaryEmployee> getTSalaryEmployeePage(Page<TSalaryEmployee> page, @Param("tSalaryEmployee") TSalaryEmployee tSalaryEmployee);
List<TSalaryEmployeeExportVo> noPageDiy( @Param("tSalaryEmployee") TSalaryEmployeeSearchVo searchVo, @Param("idList")List<String> idList);
} }
...@@ -50,7 +50,7 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> { ...@@ -50,7 +50,7 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
*/ */
IPage<TSalaryStandard> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard); IPage<TSalaryStandard> getTSalaryStandardAuditPage(Page<TSalaryStandard> page, @Param("tSalaryStandard") TSalaryStandard tSalaryStandard);
List<TSalaryStandardExportVo> getSalaryStandardExport(@Param("searchVo") TSalaryStandardSearchVo searchVo); List<TSalaryStandardExportVo> getSalaryStandardExport(@Param("searchVo") TSalaryStandardSearchVo searchVo, @Param("idList")List<String> idList);
int getSalaryStandardExportCount(@Param("searchVo")TSalaryStandardSearchVo searchVo); int getSalaryStandardExportCount(@Param("searchVo") TSalaryStandardSearchVo searchVo, @Param("idList")List<String> idList);
} }
...@@ -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.TSalaryEmployee; import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -47,7 +48,7 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> { ...@@ -47,7 +48,7 @@ public interface TSalaryEmployeeService extends IService<TSalaryEmployee> {
void listExport(HttpServletResponse response, TSalaryEmployeeSearchVo searchVo); void listExport(HttpServletResponse response, TSalaryEmployeeSearchVo searchVo);
List<TSalaryEmployee> noPageDiy(TSalaryEmployeeSearchVo searchVo); List<TSalaryEmployeeExportVo> noPageDiy(TSalaryEmployeeSearchVo searchVo);
/** /**
* @param employee * @param employee
......
...@@ -149,8 +149,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -149,8 +149,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
TSalaryEmployee es;//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用 TSalaryEmployee es;//筛选人员,添加判断:非在职,或开户行为空,或 结算主体等于选择的结算主体且在职,都可以存入Map优先备用
for (TSalaryEmployee e : empList) { for (TSalaryEmployee e : empList) {
es = empIdCardMap.get(e.getEmpIdcard()); es = empIdCardMap.get(e.getEmpIdcard());
if (es == null || CommonConstants.ZERO_INT != es.getFileStatus() || Common.isEmpty(es.getBankName()) if (es == null || CommonConstants.ZERO_STRING != es.getFileStatus() || Common.isEmpty(es.getBankName())
|| (e.getDeptId().equals(settleDepart) && CommonConstants.ZERO_INT == e.getFileStatus() || (e.getDeptId().equals(settleDepart) && CommonConstants.ZERO_STRING == e.getFileStatus()
&& Common.isNotNull(e.getBankName()))) { && Common.isNotNull(e.getBankName()))) {
empIdCardMap.put(e.getEmpIdcard(), e); empIdCardMap.put(e.getEmpIdcard(), e);
empNameMap.put(e.getEmpName().replace(" ", ""), e); empNameMap.put(e.getEmpName().replace(" ", ""), e);
......
...@@ -54,6 +54,9 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -54,6 +54,9 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
if (Common.isNotNull(tMinSalary.getTown())){ if (Common.isNotNull(tMinSalary.getTown())){
query.eq(TMinSalary::getTown,tMinSalary.getTown()); query.eq(TMinSalary::getTown,tMinSalary.getTown());
} }
if (Common.isEmpty(tMinSalary.getTown())){
query.isNull(TMinSalary::getTown);
}
query.eq(TMinSalary::getStatus, CommonConstants.ONE_INT); query.eq(TMinSalary::getStatus, CommonConstants.ONE_INT);
long res = baseMapper.selectCount(query); long res = baseMapper.selectCount(query);
if (res > CommonConstants.ZERO_INT){ if (res > CommonConstants.ZERO_INT){
......
...@@ -43,6 +43,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee; ...@@ -43,6 +43,7 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryEmployeeMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService; import com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryEmployeeService;
import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants; import com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeSearchVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeVo; import com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -92,7 +93,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -92,7 +93,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
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<TSalaryEmployeeExportVo> list = new ArrayList<>();
long count = noPageCountDiy(searchVo); long count = noPageCountDiy(searchVo);
ServletOutputStream out = null; ServletOutputStream out = null;
try { try {
...@@ -102,7 +103,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -102,7 +103,7 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName, "UTF-8")); response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.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, TSalaryEmployee.class).build(); ExcelWriter excelWriter = EasyExcel.write(out, TSalaryEmployeeExportVo.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; ) {
...@@ -111,8 +112,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -111,8 +112,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
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<TSalaryEmployee> util = new ExcelUtil<>(TSalaryEmployee.class); ExcelUtil<TSalaryEmployeeExportVo> util = new ExcelUtil<>(TSalaryEmployeeExportVo.class);
for (TSalaryEmployee vo : list) { for (TSalaryEmployeeExportVo vo : list) {
util.convertEntity(vo, null, null, null); util.convertEntity(vo, null, null, null);
} }
} }
...@@ -149,17 +150,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe ...@@ -149,17 +150,8 @@ public class TSalaryEmployeeServiceImpl extends ServiceImpl<TSalaryEmployeeMappe
} }
@Override @Override
public List<TSalaryEmployee> noPageDiy(TSalaryEmployeeSearchVo searchVo) { public List<TSalaryEmployeeExportVo> noPageDiy(TSalaryEmployeeSearchVo searchVo) {
LambdaQueryWrapper<TSalaryEmployee> wrapper = buildQueryWrapper(searchVo); return baseMapper.noPageDiy(searchVo,Common.getList(searchVo.getIds()));
List<String> idList = Common.getList(searchVo.getIds());
if (Common.isNotNull(idList)) {
wrapper.in(TSalaryEmployee::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(TSalaryEmployeeSearchVo searchVo) { private Long noPageCountDiy(TSalaryEmployeeSearchVo searchVo) {
......
...@@ -161,11 +161,13 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe ...@@ -161,11 +161,13 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
@Override @Override
public List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo) { public List<TSalaryStandardExportVo> noPageDiy(TSalaryStandardSearchVo searchVo) {
return baseMapper.getSalaryStandardExport(searchVo); List<String> idList = Common.getList(searchVo.getIds());
return baseMapper.getSalaryStandardExport(searchVo,idList);
} }
private int noPageCountDiy(TSalaryStandardSearchVo searchVo) { private int noPageCountDiy(TSalaryStandardSearchVo searchVo) {
return baseMapper.getSalaryStandardExportCount(searchVo); List<String> idList = Common.getList(searchVo.getIds());
return baseMapper.getSalaryStandardExportCount(searchVo,idList);
} }
@Override @Override
......
...@@ -418,7 +418,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -418,7 +418,7 @@ public class SalaryAccountUtil implements Serializable {
} else { } else {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim()); areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(Integer.parseInt(areaStr)); newEmp.setBankProvince(areaStr);
} else { } else {
error = "第" + (i + 2) + "行:新员工-开户行省错误:" + entity.getBankProvince(); error = "第" + (i + 2) + "行:新员工-开户行省错误:" + entity.getBankProvince();
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
...@@ -427,7 +427,7 @@ public class SalaryAccountUtil implements Serializable { ...@@ -427,7 +427,7 @@ public class SalaryAccountUtil implements Serializable {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim() areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim()); + CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(Integer.parseInt(areaStr)); newEmp.setBankCity(areaStr);
} else { } else {
error = "第" + (i + 2) + "行:新员工-开户行市错误:" + entity.getBankCity(); error = "第" + (i + 2) + "行:新员工-开户行市错误:" + entity.getBankCity();
errorList.add(new ErrorMessage((i + 2), error)); errorList.add(new ErrorMessage((i + 2), error));
...@@ -457,19 +457,19 @@ public class SalaryAccountUtil implements Serializable { ...@@ -457,19 +457,19 @@ public class SalaryAccountUtil implements Serializable {
if (Common.isNotNull(entity.getBankProvince())) { if (Common.isNotNull(entity.getBankProvince())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim()); areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankProvince(Integer.parseInt(areaStr)); newEmp.setBankProvince(areaStr);
} }
if (Common.isNotNull(entity.getBankCity())) { if (Common.isNotNull(entity.getBankCity())) {
areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim() areaStr = ExcelUtil.getRedisAreaValue(CacheConstants.AREA_VALUE + entity.getBankCity().trim()
+ CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim()); + CommonConstants.DOWN_LINE_STRING + entity.getBankProvince().trim());
if (Common.isNotNull(areaStr)) { if (Common.isNotNull(areaStr)) {
newEmp.setBankCity(Integer.parseInt(areaStr)); newEmp.setBankCity(areaStr);
} }
} }
} }
} }
} }
newEmp.setFileStatus(CommonConstants.ZERO_INT); //临时 newEmp.setFileStatus(CommonConstants.ZERO_STRING); //临时
newEmp.setDeptId(dept.getId()); newEmp.setDeptId(dept.getId());
newEmp.setDeptName(dept.getDepartName()); newEmp.setDeptName(dept.getDepartName());
newEmp.setDeptNo(dept.getDepartNo()); newEmp.setDeptNo(dept.getDepartNo());
......
...@@ -48,6 +48,25 @@ ...@@ -48,6 +48,25 @@
<result property="taxMonth" column="TAX_MONTH"/> <result property="taxMonth" column="TAX_MONTH"/>
<result property="fileStatus" column="FILE_STATUS"/> <result property="fileStatus" column="FILE_STATUS"/>
</resultMap> </resultMap>
<resultMap id="salaryEmployeeExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo">
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="unitId" column="UNIT_ID"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="unitNo" column="UNIT_NO"/>
<result property="deptId" column="DEPT_ID"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="bankName" column="BANK_NAME"/>
<result property="bankSubName" column="BANK_SUB_NAME"/>
<result property="bankNo" column="BANK_NO"/>
<result property="invoiceTitle" column="INVOICE_TITLE"/>
<result property="bankProvince" column="BANK_PROVINCE"/>
<result property="bankCity" column="BANK_CITY"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="taxMonth" column="TAX_MONTH"/>
<result property="fileStatus" column="FILE_STATUS"/>
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a.ID, a.ID,
a.EMP_NAME, a.EMP_NAME,
...@@ -154,6 +173,32 @@ ...@@ -154,6 +173,32 @@
<where> <where>
1=1 1=1
<include refid="tSalaryEmployee_where"/> <include refid="tSalaryEmployee_where"/>
</where> ORDER BY a.CREATE_TIME DESC
</where>
</select> </select>
<select id="noPageDiy" resultMap="salaryEmployeeExportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryEmployeeExportVo">
SELECT
<include refid="Base_Column_List"/>
FROM t_salary_employee a
<where>
1=1
<include refid="where_export"/>
ORDER BY a.CREATE_TIME DESC
</where>
<if test="tSalaryEmployee != null">
<if test="tSalaryEmployee.limitStart != null">
limit #{tSalaryEmployee.limitStart},#{tSalaryEmployee.limitEnd}
</if>
</if>
</select>
<sql id="where_export">
<include refid="tSalaryEmployee_where"/>
<if test="idList != null and idList.size>0">
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</sql>
</mapper> </mapper>
...@@ -256,8 +256,11 @@ ...@@ -256,8 +256,11 @@
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM t_salary_standard a FROM t_salary_standard a
left join t_dept_see d on a.DEPT_NO = d.DEPT_NO
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0
<!-- 薪资是否可查看 0 是 1否-->
and d.CAN_SEE= 0
<include refid="tSalaryStandard_where"/> <include refid="tSalaryStandard_where"/>
</where> </where>
ORDER BY a.CREATE_TIME desc ORDER BY a.CREATE_TIME desc
...@@ -304,8 +307,9 @@ ...@@ -304,8 +307,9 @@
a.FORM_TYPE, a.FORM_TYPE,
a.CREATE_TIME a.CREATE_TIME
FROM t_salary_standard a FROM t_salary_standard a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0 AND d.CAN_SEE = 0
<include refid="where_export"/> <include refid="where_export"/>
</where> </where>
ORDER BY a.CREATE_TIME desc ORDER BY a.CREATE_TIME desc
...@@ -320,8 +324,9 @@ ...@@ -320,8 +324,9 @@
SELECT SELECT
count(1) count(1)
FROM t_salary_standard a FROM t_salary_standard a
LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
<where> <where>
a.DELETE_FLAG = 0 a.DELETE_FLAG = 0 AND d.CAN_SEE = 0
<include refid="where_export"/> <include refid="where_export"/>
</where> </where>
</select> </select>
...@@ -336,15 +341,21 @@ ...@@ -336,15 +341,21 @@
<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''"> <if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth} AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
</if> </if>
<if test="tSalaryStandard.status == null"> <!--<if test="tSalaryStandard.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5) AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
</if> </if>-->
<if test="tSalaryStandard.status != null"> <if test="tSalaryStandard.status != null">
AND a.STATUS = #{tSalaryStandard.status} AND a.STATUS = #{tSalaryStandard.status}
</if> </if>
</if> </if>
</sql> </sql>
<sql id="where_export"> <sql id="where_export">
<if test="idList != null and idList.size>0">
AND a.id in
<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="searchVo != null"> <if test="searchVo != null">
<if test="searchVo.deptName != null and searchVo.deptName.trim() != ''"> <if test="searchVo.deptName != null and searchVo.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%') AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
...@@ -355,9 +366,9 @@ ...@@ -355,9 +366,9 @@
<if test="searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''"> <if test="searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''">
AND a.SALARY_MONTH = #{searchVo.salaryMonth} AND a.SALARY_MONTH = #{searchVo.salaryMonth}
</if> </if>
<if test="searchVo.status == null"> <!--<if test="searchVo.status == null">
AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5) AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
</if> </if>-->
<if test="searchVo.status != null"> <if test="searchVo.status != null">
AND a.STATUS = #{searchVo.status} AND a.STATUS = #{searchVo.status}
</if> </if>
......
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