Commit b432c5c8 authored by zhenbin wang's avatar zhenbin wang

feature-wzb:新增代码

parent 1ba33d5a
...@@ -482,6 +482,13 @@ public class EmployeeProjectExportParamVO extends BaseEntity { ...@@ -482,6 +482,13 @@ public class EmployeeProjectExportParamVO extends BaseEntity {
@ExcelProperty(value ="标签") @ExcelProperty(value ="标签")
private String empLabel; private String empLabel;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="合同甲方")
@ExcelAttribute(name = "合同甲方")
private String contractParty;
private String[] socialStatusArray; private String[] socialStatusArray;
private String[] fundStatusArray; private String[] fundStatusArray;
......
...@@ -494,6 +494,13 @@ public class EmployeeProjectExportVO { ...@@ -494,6 +494,13 @@ public class EmployeeProjectExportVO {
@ExcelProperty(value ="社保所在县") @ExcelProperty(value ="社保所在县")
private String socialTown; private String socialTown;
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="合同甲方")
@ExcelAttribute(name = "合同甲方")
private String contractParty;
private String[] socialStatusArray; private String[] socialStatusArray;
private String[] fundStatusArray; private String[] fundStatusArray;
......
...@@ -1108,21 +1108,25 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1108,21 +1108,25 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
* @Date: 2022/11/28 10:05 * @Date: 2022/11/28 10:05
* @return: void * @return: void
**/ **/
private void judgeAuditStatus(TEmployeeContractInfo insert, YifuUser user) { private void judgeAuditStatus(TEmployeeContractInfo insert, YifuUser user) {
if (insert.getAuditStatus() == CommonConstants.ONE_INT if (insert.getAuditStatus() == CommonConstants.ONE_INT
&& (EmployeeConstants.CONTRACT_NAME[0].equals(insert.getContractName()) && (EmployeeConstants.CONTRACT_NAME[0].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[1].equals(insert.getContractName()) || EmployeeConstants.CONTRACT_NAME[1].equals(insert.getContractName())
|| EmployeeConstants.CONTRACT_NAME[2].equals(insert.getContractName()))) { || EmployeeConstants.CONTRACT_NAME[2].equals(insert.getContractName()))) {
//
TSocialFundInfo sf = new TSocialFundInfo(); TSocialFundInfo sf = new TSocialFundInfo();
sf.setEmpIdcard(insert.getEmpIdcard()); sf.setEmpIdcard(insert.getEmpIdcard());
sf.setSettleDomain(insert.getSettleDomain()); sf.setSettleDomain(insert.getSettleDomain());
R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId() R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsocialfundinfo/inner/selectSocialFoundByContract", sf, Integer.class, SecurityConstants.FROM_IN); , "/tsocialfundinfo/inner/selectSocialFoundByContract", sf, Integer.class, SecurityConstants.FROM_IN);
if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) { if(CommonConstants.ONE_STRING.equals(insert.getSituation()) || CommonConstants.TWO_STRING.equals(insert.getSituation()) || CommonConstants.THREE_STRING.equals(insert.getSituation()) || CommonConstants.FOUR_STRING.equals(insert.getSituation())){
insert.setAuditStatus(CommonConstants.TWO_INT); if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) {
insert.setAuditUserName(user.getNickname()); insert.setAuditStatus(CommonConstants.TWO_INT);
insert.setAuditUserName(user.getNickname());
}
} }
} }
} }
......
...@@ -235,7 +235,9 @@ ...@@ -235,7 +235,9 @@
a.CREATE_TIME, a.CREATE_TIME,
b.EMP_EMAIL, b.EMP_EMAIL,
b.EMP_NATRUE AS PROEMP_NATRUE, b.EMP_NATRUE AS PROEMP_NATRUE,
a.EMP_LABEL a.EMP_LABEL,
t.CONTRACT_PARTY
</sql> </sql>
<sql id="tEmployeeProject_where"> <sql id="tEmployeeProject_where">
...@@ -835,6 +837,16 @@ ...@@ -835,6 +837,16 @@
<include refid="Base_Export_List"/> <include refid="Base_Export_List"/>
FROM t_employee_project a FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN (
SELECT
t1.EMP_ID ,t1.CONTRACT_PARTY
FROM
t_employee_contract_info t1
INNER JOIN ( SELECT EMP_ID, MAX( CREATE_TIME ) CREATE_TIME FROM t_employee_contract_info GROUP BY EMP_ID ) t2 ON t2.EMP_ID = t1.EMP_ID
AND t2.CREATE_TIME = t1.CREATE_TIME
WHERE
t1.CONTRACT_TYPE = '1'
) AS t ON t.EMP_ID = a.EMP_ID
LEFT JOIN sys_area a1 on a1.id=b.ID_PROVINCE LEFT JOIN sys_area a1 on a1.id=b.ID_PROVINCE
LEFT JOIN sys_area a2 on a2.id=b.ID_CITY LEFT JOIN sys_area a2 on a2.id=b.ID_CITY
LEFT JOIN sys_area a3 on a3.id=b.ID_TOWN LEFT JOIN sys_area a3 on a3.id=b.ID_TOWN
...@@ -850,7 +862,9 @@ ...@@ -850,7 +862,9 @@
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''"> <if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql} ${tEmployeeProject.authSql}
</if> </if>
</where> </where>
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
<if test="tEmployeeProject != null"> <if test="tEmployeeProject != null">
<if test="tEmployeeProject.limitStart != null"> <if test="tEmployeeProject.limitStart != null">
......
...@@ -32,7 +32,7 @@ public class TMinSalary extends BaseEntity { ...@@ -32,7 +32,7 @@ public class TMinSalary extends BaseEntity {
*/ */
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "id") @ExcelProperty(value = "id")
private String id; private String id;
/** /**
* 省 * 省
...@@ -46,7 +46,7 @@ public class TMinSalary extends BaseEntity { ...@@ -46,7 +46,7 @@ public class TMinSalary extends BaseEntity {
*/ */
@ExcelAttribute(name = "市") @ExcelAttribute(name = "市")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "市") @ExcelProperty(value = "市")
@TableField(updateStrategy = FieldStrategy.IGNORED) @TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer city; private Integer city;
/** /**
...@@ -64,7 +64,7 @@ public class TMinSalary extends BaseEntity { ...@@ -64,7 +64,7 @@ public class TMinSalary extends BaseEntity {
@Length(max = 11, message = "最低工资标准不能超过11个字符") @Length(max = 11, message = "最低工资标准不能超过11个字符")
@ExcelAttribute(name = "最低工资标准", isNotEmpty = true, errorInfo = "最低工资标准不能为空", maxLength = 11) @ExcelAttribute(name = "最低工资标准", isNotEmpty = true, errorInfo = "最低工资标准不能为空", maxLength = 11)
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "最低工资标准") @ExcelProperty(value = "最低工资标准")
private String salaryBase; private String salaryBase;
/** /**
* 1.启用 2.停用 * 1.启用 2.停用
...@@ -72,7 +72,7 @@ public class TMinSalary extends BaseEntity { ...@@ -72,7 +72,7 @@ public class TMinSalary extends BaseEntity {
@NotNull(message = "1.启用 2.停用不能为空") @NotNull(message = "1.启用 2.停用不能为空")
@ExcelAttribute(name = "1.启用 2.停用", isNotEmpty = true, errorInfo = "1.启用 2.停用不能为空") @ExcelAttribute(name = "1.启用 2.停用", isNotEmpty = true, errorInfo = "1.启用 2.停用不能为空")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "1.启用 2.停用") @ExcelProperty(value = "1.启用 2.停用")
private Integer status; private Integer status;
/** /**
* 起始时间 * 起始时间
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.Set;
/**
* @author wzb
* @description 导出列表
* @date 2023-05-05 11:41:21
*/
@Data
public class TMinSalaryExportVo {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "id")
private String id;
/**
* 省
*/
@ExcelAttribute(name = "省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "省")
private Integer province;
/**
* 市
*/
@ExcelAttribute(name = "市")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer city;
/**
* 县
*/
@ExcelAttribute(name = "县")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer town;
/**
* 最低工资标准
*/
@NotBlank(message = "最低工资标准不能为空")
@Length(max = 11, message = "最低工资标准不能超过11个字符")
@ExcelAttribute(name = "最低工资标准", isNotEmpty = true, errorInfo = "最低工资标准不能为空", maxLength = 11)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "最低工资标准")
private String salaryBase;
/**
* 1.启用 2.停用
*/
@NotNull(message = "1.启用 2.停用不能为空")
@ExcelAttribute(name = "1.启用 2.停用", isNotEmpty = true, errorInfo = "1.启用 2.停用不能为空" ,readConverterExp = "1=启用,1=派遣,2=停用不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "1.启用 2.停用")
private Integer status;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Data;
import java.util.List;
/**
* @author wzb
* @description TODO
* @date 2023-05-06 11:18:17
*/
@Data
public class TMinSalaryImportParam {
/**
* excel表格类型
*/
private List<TMinSalaryImportVo> tMinSalaryImportVoList;
}
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data;
import org.apache.poi.ss.formula.functions.Index;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author wzb
* @description TODO
* @date 2023-05-06 10:28:36
*/
@Data
public class TMinSalaryImportVo extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty(value = "ID")
private String id;
/**
* TODO
*/
@ExcelProperty(value = "所在地")
private String location;
/**
* 省
*/
@HeadFontStyle(fontHeightInPoints = 11)
private Integer province;
/**
* 市
*/
@HeadFontStyle(fontHeightInPoints = 11)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer city;
/**
* 县
*/
@HeadFontStyle(fontHeightInPoints = 11)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer town;
/**
* 最低工资标准
*/
@NotBlank(message = "最低工资标准不能为空")
@Length(max = 11, message = "最低工资标准不能超过11个字符")
@ExcelAttribute(name = "最低工资(元)", isNotEmpty = true, errorInfo = "最低工资标准不能为空", maxLength = 11)
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "最低工资(元)")
private String salaryBase;
/**
* 状态
*/
@NotNull(message = "状态不能为空")
@ExcelAttribute(name = "状态", isNotEmpty = true, errorInfo = "状态不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "状态")
private String status;
/**
* 错误标识
*/
private boolean errorFlag = false;
/**
* 错误原因
*/
private String errorMessage;
}
...@@ -16,11 +16,15 @@ ...@@ -16,11 +16,15 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.salary.vo; package com.yifu.cloud.plus.v1.yifu.salary.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;
/** /**
* 最低工资配置-薪资配置4 * 最低工资配置-薪资配置4
...@@ -55,4 +59,12 @@ public class TMinSalarySearchVo extends TMinSalary { ...@@ -55,4 +59,12 @@ public class TMinSalarySearchVo extends TMinSalary {
@Schema(description = "查询limit 数据条数") @Schema(description = "查询limit 数据条数")
private int limitEnd; private int limitEnd;
/**
*
* 区域查询辅助字段:0 不包含下级 1 包含下级
**/
@Schema(description = "0 不包含下级 1 包含下级")
private String areaFlag;
} }
...@@ -6,13 +6,19 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -6,13 +6,19 @@ 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.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService; import com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalaryExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalarySearchVo;
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;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List;
/** /**
...@@ -39,7 +45,7 @@ public class TMinSalaryController { ...@@ -39,7 +45,7 @@ public class TMinSalaryController {
*/ */
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TMinSalary>> getTMinSalaryPage(Page<TMinSalary> page, TMinSalary tMinSalary) { public R<IPage<TMinSalary>> getTMinSalaryPage(Page<TMinSalary> page, TMinSalarySearchVo tMinSalary) {
return new R<>(tMinSalaryService.getTMinSalaryPage(page, tMinSalary)); return new R<>(tMinSalaryService.getTMinSalaryPage(page, tMinSalary));
} }
...@@ -97,4 +103,36 @@ public class TMinSalaryController { ...@@ -97,4 +103,36 @@ public class TMinSalaryController {
return new R<>(tMinSalaryService.removeById(id)); return new R<>(tMinSalaryService.removeById(id));
} }
/**
* 最低工资批量导出
*
* @author wzb
* @param tMinSalary
* @return {@link List< TMinSalaryExportVo>}
*/
@Operation(description = "最低工资批量导出 hasPermission('tminsalary_export')")
@GetMapping("/exportList")
public R<List<TMinSalaryExportVo>> exportList(TMinSalarySearchVo tMinSalary) {
return new R<> (tMinSalaryService.exportList(tMinSalary));
}
/**
* 最低工资批量导入
*
* @author wzb
* @param file
* @return {@link R}
*/
@SneakyThrows
@Operation(description = "批量更新最低工资")
@SysLog("批量更新最低工资")
@PostMapping("/importList")
public R importListAdd(MultipartFile file) {
return tMinSalaryService.importList(file.getInputStream());
}
} }
...@@ -3,10 +3,17 @@ package com.yifu.cloud.plus.v1.yifu.salary.mapper; ...@@ -3,10 +3,17 @@ 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.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.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalaryExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalarySearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
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;
/** /**
* 各地市最低工资标准 * 各地市最低工资标准
* *
...@@ -20,7 +27,34 @@ public interface TMinSalaryMapper extends BaseMapper<TMinSalary> { ...@@ -20,7 +27,34 @@ public interface TMinSalaryMapper extends BaseMapper<TMinSalary> {
* @param tMinSalary 各地市最低工资标准 * @param tMinSalary 各地市最低工资标准
* @return * @return
*/ */
IPage<TMinSalary> getTMinSalaryPage(Page page, @Param("tMinSalary") TMinSalary tMinSalary); IPage<TMinSalary> getTMinSalaryPage(Page page, @Param("tMinSalary") TMinSalarySearchVo tMinSalary);
/**
* 缴费库简单分页查询
* @param tMinSalary 缴费库
* @return
*/
Integer selectCountTMinSalary(@Param("tMinSalary") TMinSalarySearchVo tMinSalary);
/**
* 不分页查询
*
* @author wzb
* @param tMinSalary
* @return {@link List< TMinSalaryExportVo>}
*/
List<TMinSalaryExportVo>getTMinSalaryNoPage(@Param("tMinSalary") TMinSalarySearchVo tMinSalary);
/**
* TODO
*
* @author wzb
* @param areaName
* @return {@link Integer}
*/
Integer selectByAreaName(String areaName);
Integer selectId(String Id);
} }
...@@ -3,8 +3,20 @@ package com.yifu.cloud.plus.v1.yifu.salary.service; ...@@ -3,8 +3,20 @@ package com.yifu.cloud.plus.v1.yifu.salary.service;
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.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractAreaResSearchVo;
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.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalaryExportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalaryImportParam;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalaryImportVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalarySearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/** /**
* @Author fxj * @Author fxj
...@@ -20,10 +32,24 @@ public interface TMinSalaryService extends IService<TMinSalary> { ...@@ -20,10 +32,24 @@ public interface TMinSalaryService extends IService<TMinSalary> {
* @param tMinSalary 各地市最低工资标准 * @param tMinSalary 各地市最低工资标准
* @return * @return
*/ */
IPage<TMinSalary> getTMinSalaryPage(Page<TMinSalary> page, TMinSalary tMinSalary); IPage<TMinSalary> getTMinSalaryPage(Page<TMinSalary> page, TMinSalarySearchVo tMinSalary);
R<Boolean> saveDiy(TMinSalary tMinSalary); R<Boolean> saveDiy(TMinSalary tMinSalary);
R<Boolean> updateByIdDIy(TMinSalary tMinSalary); R<Boolean> updateByIdDIy(TMinSalary tMinSalary);
R importList(InputStream inputStream);
/**
* 最低工资导出
*
* @author wzb
* @param tMinSalary
* @return {@link List< TMinSalaryExportVo>}
*/
List<TMinSalaryExportVo> exportList( TMinSalarySearchVo tMinSalary);
} }
package com.yifu.cloud.plus.v1.yifu.salary.service.impl; package com.yifu.cloud.plus.v1.yifu.salary.service.impl;
import cn.hutool.core.bean.BeanUtil;
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.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
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.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary; import com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryEmployee;
import com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper; import com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper;
import com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService; import com.yifu.cloud.plus.v1.yifu.salary.service.TMinSalaryService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoBatchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TPreDispatchExportVo;
import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialInfoVo;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.awt.*;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @Author fxj * @Author fxj
...@@ -26,15 +55,18 @@ import java.time.LocalDateTime; ...@@ -26,15 +55,18 @@ import java.time.LocalDateTime;
@Service("tMinSalaryService") @Service("tMinSalaryService")
public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSalary> implements TMinSalaryService { public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSalary> implements TMinSalaryService {
/** /**
* 各地市最低工资标准简单分页查询 * 各地市最低工资标准简单分页查询
* @param tMinSalary 各地市最低工资标准 *
* @return * @param tMinSalary 各地市最低工资标准
*/ * @return
@Override */
public IPage<TMinSalary> getTMinSalaryPage(Page<TMinSalary> page, TMinSalary tMinSalary){
return baseMapper.getTMinSalaryPage(page,tMinSalary);
} @Override
public IPage<TMinSalary> getTMinSalaryPage(Page<TMinSalary> page, TMinSalarySearchVo tMinSalary) {
return baseMapper.getTMinSalaryPage(page, tMinSalary);
}
@Override @Override
public R<Boolean> saveDiy(TMinSalary tMinSalary) { public R<Boolean> saveDiy(TMinSalary tMinSalary) {
...@@ -45,24 +77,24 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -45,24 +77,24 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
tMinSalary.setCreateTime(LocalDateTime.now()); tMinSalary.setCreateTime(LocalDateTime.now());
tMinSalary.setCreateBy(String.valueOf(user.getId())); tMinSalary.setCreateBy(String.valueOf(user.getId()));
LambdaQueryWrapper<TMinSalary> query = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TMinSalary> query = new LambdaQueryWrapper<>();
if (Common.isNotNull(tMinSalary.getProvince())){ if (Common.isNotNull(tMinSalary.getProvince())) {
query.eq(TMinSalary::getProvince,tMinSalary.getProvince()); query.eq(TMinSalary::getProvince, tMinSalary.getProvince());
} }
if (Common.isNotNull(tMinSalary.getCity())){ if (Common.isNotNull(tMinSalary.getCity())) {
query.eq(TMinSalary::getCity,tMinSalary.getCity()); query.eq(TMinSalary::getCity, tMinSalary.getCity());
} }
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())){ if (Common.isEmpty(tMinSalary.getTown())) {
query.isNull(TMinSalary::getTown); query.isNull(TMinSalary::getTown);
} }
long res = baseMapper.selectCount(query); long res = baseMapper.selectCount(query);
if (res > CommonConstants.ZERO_INT){ if (res > CommonConstants.ZERO_INT) {
return R.failed("已存在对应区域在用的配置信息"); return R.failed("已存在对应区域在用的配置信息");
} }
baseMapper.insert(tMinSalary); baseMapper.insert(tMinSalary);
return R.ok(true,CommonConstants.SAVE_SUCCESS); return R.ok(true, CommonConstants.SAVE_SUCCESS);
} }
@Override @Override
...@@ -72,30 +104,149 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -72,30 +104,149 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
return R.failed("获取登录用户信息失败!"); return R.failed("获取登录用户信息失败!");
} }
TMinSalary entity = baseMapper.selectById(tMinSalary.getId()); TMinSalary entity = baseMapper.selectById(tMinSalary.getId());
if (Common.isNotNull(entity)){ if (Common.isNotNull(entity)) {
LambdaQueryWrapper<TMinSalary> query = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TMinSalary> query = new LambdaQueryWrapper<>();
if (Common.isNotNull(tMinSalary.getProvince())){ if (Common.isNotNull(tMinSalary.getProvince())) {
query.eq(TMinSalary::getProvince,tMinSalary.getProvince()); query.eq(TMinSalary::getProvince, tMinSalary.getProvince());
} }
if (Common.isNotNull(tMinSalary.getCity())){ if (Common.isNotNull(tMinSalary.getCity())) {
query.eq(TMinSalary::getCity,tMinSalary.getCity()); query.eq(TMinSalary::getCity, tMinSalary.getCity());
} }
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())){ if (Common.isEmpty(tMinSalary.getTown())) {
query.isNull(TMinSalary::getTown); query.isNull(TMinSalary::getTown);
} }
query.ne(TMinSalary::getId,tMinSalary.getId()); query.ne(TMinSalary::getId, tMinSalary.getId());
long res = baseMapper.selectCount(query); long res = baseMapper.selectCount(query);
if (res > CommonConstants.ZERO_INT){ if (res > CommonConstants.ZERO_INT) {
return R.failed("已存在对应区域在用的配置信息"); return R.failed("已存在对应区域在用的配置信息");
} }
baseMapper.updateById(tMinSalary); baseMapper.updateById(tMinSalary);
return R.ok(true,CommonConstants.UPDATE_SUCCESS); return R.ok(true, CommonConstants.UPDATE_SUCCESS);
}else { } else {
return R.failed(false,CommonConstants.SAVE_FAILED); return R.failed(false, CommonConstants.SAVE_FAILED);
} }
} }
@Override
public List<TMinSalaryExportVo> exportList(TMinSalarySearchVo tMinSalary) {
return baseMapper.getTMinSalaryNoPage(tMinSalary);
}
/**
* 最低工资导出
*
* @author wzb
* @param inputStream
* @return {@link R}
*/
@Override
public R importList(InputStream inputStream) {
List<TMinSalaryImportVo> tMinSalaryImportVoList = new ArrayList<>();
try {
EasyExcel.read(inputStream, TMinSalaryImportVo.class, new ReadListener<TMinSalaryImportVo>() {
@Override
public void invoke(TMinSalaryImportVo data, AnalysisContext context) {
ReadRowHolder readRowHolder = context.readRowHolder();
Integer rowIndex = readRowHolder.getRowIndex();
data.setRowIndex(rowIndex + 1);
StringBuilder errorMessage = new StringBuilder("");
if (Common.isEmpty(data.getId())) {
data.setErrorFlag(true);
errorMessage.append("更新的ID为空;");
}
if (Common.isEmpty(data.getLocation())) {
data.setErrorFlag(true);
errorMessage.append("所在地为空;");
}
if (Common.isEmpty(data.getSalaryBase())) {
data.setErrorFlag(true);
errorMessage.append("最低工资标准为空;");
}
if (Common.isEmpty(data.getStatus())) {
data.setErrorFlag(true);
errorMessage.append("状态为空;");
}
if (CommonConstants.ZERO_INT==baseMapper.selectId(data.getId())) {
data.setErrorFlag(true);
errorMessage.append("不是系统内的数据;");
}
if (data.isErrorFlag()){
data.setErrorMessage(errorMessage.toString());
}
tMinSalaryImportVoList.add(data);
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
}
private void saveData() {
List<TMinSalaryImportVo> salaryImportsSuccessList = tMinSalaryImportVoList.stream().filter(e -> e.isErrorFlag() != true).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(salaryImportsSuccessList)){
//将成功的数据转换成需要入库的格式
salaryImportsSuccessList.stream().forEach(e ->{
TMinSalary selectOne = new TMinSalary();
selectOne.setId(e.getId());
String location[]=e.getLocation().split("/");
for (int i=0 ;i<location.length;i++){
if(i==0){
int province=baseMapper.selectByAreaName(location[i]);
selectOne.setProvince(province);
}
if (i==1){
int city=baseMapper.selectByAreaName(location[i]);
selectOne.setCity(city);
}
if (i==2){
int town=baseMapper.selectByAreaName(location[i]);
selectOne.setTown(town);;
}
}
if(e.getStatus().equals("启用")){
selectOne.setStatus(CommonConstants.ONE_INT);
}
if(e.getStatus().equals("停用")) {
selectOne.setStatus(CommonConstants.TWO_INT);
}
selectOne.setSalaryBase(e.getSalaryBase());
selectOne.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(selectOne);
});
}
}
}).sheet().doRead();
} catch (Exception e) {
log.error(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR, e);
return R.failed(CommonConstants.IMPORT_DATA_ANALYSIS_ERROR);
}
//返回给前端的错误数据
List<TMinSalaryImportVo> errorImportErrorList = tMinSalaryImportVoList.stream().filter(e -> e.isErrorFlag() == true).collect(Collectors.toList());
return R.ok(errorImportErrorList);
}
} }
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</resultMap> </resultMap>
<!--tMinSalary简单分页查询--> <!--tMinSalary简单分页查询-->
<select id="getTMinSalaryPage" resultMap="tMinSalaryMap"> <select id="getTMinSalaryPage" resultMap="tMinSalaryMap" resultType="com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary">
SELECT SELECT
id, id,
province, province,
...@@ -36,6 +36,34 @@ ...@@ -36,6 +36,34 @@
<if test="tMinSalary.id != null and tMinSalary.id.trim() != ''"> <if test="tMinSalary.id != null and tMinSalary.id.trim() != ''">
AND id = #{tMinSalary.id} AND id = #{tMinSalary.id}
</if> </if>
<if test='tMinSalary.areaFlag == null || tMinSalary.areaFlag == "1"'>
<if test="tMinSalary.town == null">
<if test="tMinSalary.city != null">
AND CITY = '${tMinSalary.city}'
</if>
<if test="tMinSalary.city== null">
<if test="tMinSalary.province != null">
AND PROVINCE = '${tMinSalary.province}'
</if>
</if>
</if>
<if test="tMinSalary.town != null and tMinSalary.town.trim() != ''">
AND TOWN = '${tMinSalary.town}'
</if>
</if>
<if test='tMinSalary.areaFlag == "0"'>
<if test="tMinSalary.province!= null and tMinSalary.city == null">
AND
PROVINCE = '${tMinSalary.province}' and CITY is null or CITY =''
</if>
<if test="tMinSalary.city != null and tMinSalary.town == null">
AND
CITY = '${tMinSalary.city}' and TOWN is null or TOWN =''
</if>
<if test="tMinSalary.town != null ">
AND TOWN = '${tMinSalary.town}'
</if>
</if>
<if test="tMinSalary.province != null"> <if test="tMinSalary.province != null">
AND province = #{tMinSalary.province} AND province = #{tMinSalary.province}
</if> </if>
...@@ -64,5 +92,154 @@ ...@@ -64,5 +92,154 @@
ORDER BY CREATE_TIME DESC ORDER BY CREATE_TIME DESC
</select> </select>
<select id="getTMinSalaryNoPage" resultType="com.yifu.cloud.plus.v1.yifu.salary.vo.TMinSalaryExportVo">
SELECT
id,
province,
city,
town,
salary_base,
status
FROM t_min_salary
<where>
1=1
<if test="tMinSalary.id != null and tMinSalary.id.trim() != ''">
AND id = #{tMinSalary.id}
</if>
<if test='tMinSalary.areaFlag == null || tMinSalary.areaFlag == "1"'>
<if test="tMinSalary.town == null">
<if test="tMinSalary.city != null">
AND CITY = '${tMinSalary.city}'
</if>
<if test="tMinSalary.city== null">
<if test="tMinSalary.province != null">
AND PROVINCE = '${tMinSalary.province}'
</if>
</if>
</if>
<if test="tMinSalary.town != null and tMinSalary.town.trim() != ''">
AND TOWN = '${tMinSalary.town}'
</if>
</if>
<if test='tMinSalary.areaFlag == "0"'>
<if test="tMinSalary.province!= null and tMinSalary.city == null">
AND
PROVINCE = '${tMinSalary.province}' and CITY is null or CITY =''
</if>
<if test="tMinSalary.city != null and tMinSalary.town == null">
AND
CITY = '${tMinSalary.city}' and TOWN is null or TOWN =''
</if>
<if test="tMinSalary.town != null ">
AND TOWN = '${tMinSalary.town}'
</if>
</if>
<if test="tMinSalary.province != null">
AND province = #{tMinSalary.province}
</if>
<if test="tMinSalary.city != null">
AND city = #{tMinSalary.city}
</if>
<if test="tMinSalary.town != null">
AND town = #{tMinSalary.town}
</if>
<if test="tMinSalary.salaryBase != null and tMinSalary.salaryBase.trim() != ''">
AND salary_base = #{tMinSalary.salaryBase}
</if>
<if test="tMinSalary.status != null">
AND status = #{tMinSalary.status}
</if>
<if test="tMinSalary.startDate != null">
AND start_date = #{tMinSalary.startDate}
</if>
<if test="tMinSalary.endDate != null">
AND end_date = #{tMinSalary.endDate}
</if>
<if test="tMinSalary.createBy != null and tMinSalary.createBy.trim() != ''">
AND create_user = #{tMinSalary.createBy}
</if>
</where>
ORDER BY CREATE_TIME DESC
</select>
<!--tPaymentInfo数量查询-->
<select id="selectCountTMinSalary" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_min_salary a
<where>
1=1
<if test="tMinSalary.id != null and tMinSalary.id.trim() != ''">
AND id = #{tMinSalary.id}
</if>
<if test='tMinSalary.areaFlag == null || tMinSalary.areaFlag == "1"'>
<if test="tMinSalary.town == null">
<if test="tMinSalary.city != null">
AND (CITY = '${tMinSalary.city}' = '${tMinSalary.city}')
</if>
<if test="tMinSalary.city== null">
<if test="tMinSalary.province != null">
AND (PROVINCE = '${tMinSalary.province}' = '${tMinSalary.province}')
</if>
</if>
</if>
<if test="tMinSalary.town != null and tMinSalary.town.trim() != ''">
AND (TOWN = '${tMinSalary.town}' = '${tMinSalary.town}')
</if>
</if>
<if test='tMinSalary.areaFlag == "0"'>
<if test="tMinSalary.province != null and tMinSalary.province.trim() != '' and tMinSalary.city == null">
AND (
(PROVINCE = '${tMinSalary.province}' and (a.CITY is null or a.CITY =''))
</if>
<if test="tMinSalary.city != null and tMinSalary.city.trim() != '' and tMinSalary.town == null">
AND (
(CITY = '${tMinSalary.city}' and (TOWN is null or TOWN =''))
</if>
<if test="tMinSalary.town != null and tMinSalary.town.trim() != ''">
AND (TOWN = '${tMinSalary.town}' or TOWN = '${tMinSalary.town}')
</if>
</if>
<if test="tMinSalary.province != null">
AND province = #{tMinSalary.province}
</if>
<if test="tMinSalary.city != null">
AND city = #{tMinSalary.city}
</if>
<if test="tMinSalary.town != null">
AND town = #{tMinSalary.town}
</if>
<if test="tMinSalary.salaryBase != null and tMinSalary.salaryBase.trim() != ''">
AND salary_base = #{tMinSalary.salaryBase}
</if>
<if test="tMinSalary.status != null">
AND status = #{tMinSalary.status}
</if>
<if test="tMinSalary.startDate != null">
AND start_date = #{tMinSalary.startDate}
</if>
<if test="tMinSalary.endDate != null">
AND end_date = #{tMinSalary.endDate}
</if>
<if test="tMinSalary.createBy != null and tMinSalary.createBy.trim() != ''">
AND create_user = #{tMinSalary.createBy}
</if>
</where>
ORDER BY CREATE_TIME DESC
</select>
<select id="selectByAreaName" resultType="integer">
select id from sys_area
WHERE AREA_NAME=#{areaName}
limit 1
</select>
<select id="selectId" resultType="java.lang.Integer">
select count(1)
from t_min_salary
WHERE ID=#{Id}
</select>
</mapper> </mapper>
...@@ -47,9 +47,21 @@ public class FundHandleExportVo implements Serializable { ...@@ -47,9 +47,21 @@ public class FundHandleExportVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("身份证号" ) @ExcelProperty("身份证号" )
private String empIdcard; private String empIdcard;
/**
* 员工类型
*/
@ExcelAttribute(name = "员工类型", readConverterExp = "0=外包,1=派遣,2=代理,3=内部员工")
@Schema(description = "员工类型:0外包1派遣2代理3内部员工")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
/** /**
* 所属单位 * 所属单位
*/ */
@ExcelAttribute(name = "客户名称", isNotEmpty = true,needExport = true) @ExcelAttribute(name = "客户名称", isNotEmpty = true,needExport = true)
@Schema(description = "客户名称(所属单位)") @Schema(description = "客户名称(所属单位)")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
...@@ -194,7 +206,6 @@ public class FundHandleExportVo implements Serializable { ...@@ -194,7 +206,6 @@ public class FundHandleExportVo implements Serializable {
@ExcelProperty("离职原因" ) @ExcelProperty("离职原因" )
private String reduceReason; private String reduceReason;
/*******************************导出字段结束*************************************************/ /*******************************导出字段结束*************************************************/
} }
...@@ -27,6 +27,14 @@ public class SocialHandleSearchVo extends TDispatchInfo { ...@@ -27,6 +27,14 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@TableField(exist = false) @TableField(exist = false)
private LocalDateTime createTimeEnd; private LocalDateTime createTimeEnd;
/**
* 多选导出或删除等操作
*/
@TableField(exist = false)
@Schema(description = "员工类型下拉多选" )
@ExcelIgnore
String[]empTypeList;
/** /**
* 社保户 * 社保户
*/ */
......
...@@ -46,6 +46,12 @@ public class TDispatchAuditExportVo { ...@@ -46,6 +46,12 @@ public class TDispatchAuditExportVo {
@ExcelProperty("派单类型") @ExcelProperty("派单类型")
private String type; private String type;
@ExcelAttribute(name = "员工类型", readConverterExp = "0=外包,1=派遣,2=代理,3=内部员工")
@Schema(description = "员工类型:0外包1派遣2代理3内部员工")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("员工类型")
private String empType;
@Schema(description = "创建时间") @Schema(description = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
......
...@@ -44,9 +44,15 @@ public class TDispatchInfoSearchVo extends TDispatchInfo { ...@@ -44,9 +44,15 @@ public class TDispatchInfoSearchVo extends TDispatchInfo {
@Schema(description = "选中的idList") @Schema(description = "选中的idList")
private List<String> idList; private List<String> idList;
/** /**
* 多选导出或删除等操作 * 员工类型下拉多选
*/ */
@TableField(exist = false)
@Schema(description = "员工类型下拉多选")
private String[]empTypeList;
@Schema(description = "选中ID,多个逗号分割") @Schema(description = "选中ID,多个逗号分割")
private String ids; private String ids;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
package com.yifu.cloud.plus.v1.yifu.social.vo; package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFundInfo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -36,6 +37,14 @@ public class TSocialFundInfoSearchVo extends TSocialFundInfo { ...@@ -36,6 +37,14 @@ public class TSocialFundInfoSearchVo extends TSocialFundInfo {
/**
* 员工下拉多选
*/
@TableField(exist = false)
@Schema(description = "员工类型下拉多选" )
private String[]empTypeList;
@TableField(exist = false) @TableField(exist = false)
@Schema(description = "导出的表头的Set") @Schema(description = "导出的表头的Set")
private Set<String> exportFields; private Set<String> exportFields;
......
...@@ -308,6 +308,12 @@ ...@@ -308,6 +308,12 @@
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tDispatchInfo.empTypeList != null and tDispatchInfo.empTypeList.length>0">
AND a.EMP_TYPE IN
<foreach collection="tDispatchInfo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tDispatchInfo.id != null and tDispatchInfo.id.trim() != ''"> <if test="tDispatchInfo.id != null and tDispatchInfo.id.trim() != ''">
AND a.ID = #{tDispatchInfo.id} AND a.ID = #{tDispatchInfo.id}
</if> </if>
...@@ -327,7 +333,7 @@ ...@@ -327,7 +333,7 @@
AND a.EMP_IDCARD like concat('%',#{tDispatchInfo.empIdcard},'%') AND a.EMP_IDCARD like concat('%',#{tDispatchInfo.empIdcard},'%')
</if> </if>
<if test="tDispatchInfo.empType != null and tDispatchInfo.empType.trim() != ''"> <if test="tDispatchInfo.empType != null and tDispatchInfo.empType.trim() != ''">
AND a.EMP_TYPE = #{tDispatchInfo.empType} AND a.EMP_TYPE in #{tDispatchInfo.empType}
</if> </if>
<if test="tDispatchInfo.empMobile != null and tDispatchInfo.empMobile.trim() != ''"> <if test="tDispatchInfo.empMobile != null and tDispatchInfo.empMobile.trim() != ''">
AND a.EMP_MOBILE = #{tDispatchInfo.empMobile} AND a.EMP_MOBILE = #{tDispatchInfo.empMobile}
...@@ -523,6 +529,13 @@ ...@@ -523,6 +529,13 @@
INSTR(a.DISPATCH_ITEM,#{item}) INSTR(a.DISPATCH_ITEM,#{item})
</foreach> </foreach>
</if> </if>
<if test="tDispatchInfo.empTypeList != null and tDispatchInfo.empTypeList.length>0">
AND a.EMP_TYPE IN
<foreach collection="tDispatchInfo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tDispatchInfo.idList != null and tDispatchInfo.idList.size >0"> <if test="tDispatchInfo.idList != null and tDispatchInfo.idList.size >0">
AND a.ID in AND a.ID in
<foreach item="idStr" index="index" collection="tDispatchInfo.idList" open="(" separator="," close=")"> <foreach item="idStr" index="index" collection="tDispatchInfo.idList" open="(" separator="," close=")">
...@@ -824,6 +837,7 @@ ...@@ -824,6 +837,7 @@
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.EMP_MOBILE, a.EMP_MOBILE,
a.EMP_TYPE,
a.ID_CARD_ADDRESS, a.ID_CARD_ADDRESS,
a.BELONG_UNIT_NAME, a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME, a.SETTLE_DOMAIN_NAME,
...@@ -1052,6 +1066,7 @@ ...@@ -1052,6 +1066,7 @@
a.TYPE, a.TYPE,
a.EMP_NAME, a.EMP_NAME,
a.EMP_IDCARD, a.EMP_IDCARD,
a.EMP_TYPE,
a.BELONG_UNIT_NAME, a.BELONG_UNIT_NAME,
a.SETTLE_DOMAIN_NAME, a.SETTLE_DOMAIN_NAME,
a.EMP_MOBILE, a.EMP_MOBILE,
...@@ -1126,7 +1141,12 @@ ...@@ -1126,7 +1141,12 @@
</if> </if>
</if> </if>
</if>--> </if>-->
<if test="tDispatchInfo.empTypeList != null ">
AND a.EMP_TYPE IN
<foreach collection="tDispatchInfo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
<if test="tDispatchInfo.dispatchItems != null and tDispatchInfo.dispatchItems.size >0"> <if test="tDispatchInfo.dispatchItems != null and tDispatchInfo.dispatchItems.size >0">
AND AND
...@@ -1243,6 +1263,7 @@ ...@@ -1243,6 +1263,7 @@
</if> </if>
</if>--> </if>-->
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
<if test="tDispatchInfo.dispatchItems != null and tDispatchInfo.dispatchItems.size >0"> <if test="tDispatchInfo.dispatchItems != null and tDispatchInfo.dispatchItems.size >0">
AND AND
...@@ -1250,6 +1271,12 @@ ...@@ -1250,6 +1271,12 @@
INSTR(a.DISPATCH_ITEM,#{item}) INSTR(a.DISPATCH_ITEM,#{item})
</foreach> </foreach>
</if> </if>
<if test="tDispatchInfo.empTypeList != null ">
AND a.EMP_TYPE IN
<foreach collection="tDispatchInfo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tDispatchInfo.fundProvince != null and tDispatchInfo.fundProvince.trim() != ''"> <if test="tDispatchInfo.fundProvince != null and tDispatchInfo.fundProvince.trim() != ''">
AND a.FUND_PROVINCE = #{tDispatchInfo.fundProvince} AND a.FUND_PROVINCE = #{tDispatchInfo.fundProvince}
</if> </if>
......
...@@ -540,6 +540,12 @@ ...@@ -540,6 +540,12 @@
#{idStr} #{idStr}
</foreach> </foreach>
</if> </if>
<if test="tSocialFundInfo.empTypeList != null ">
AND a.EMP_TYPE IN
<foreach collection="tSocialFundInfo.empTypeList" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="tSocialFundInfo.id != null and tSocialFundInfo.id.trim() != ''"> <if test="tSocialFundInfo.id != null and tSocialFundInfo.id.trim() != ''">
AND a.ID = #{tSocialFundInfo.id} AND a.ID = #{tSocialFundInfo.id}
</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