Commit 9dfc162c authored by 李灿灿's avatar 李灿灿

Merge branch 'develop' into feature-licancan

parents 95465162 2cc97f94
......@@ -135,7 +135,7 @@ public class TEmployeeContractInfo extends BaseEntity {
* 签订类型(字典也是汉字
*/
@NotBlank(message = "签订类型不能为空")
@Length(max = 1, message = "签订类型不能超过1个字符")
@Length(max = 100, message = "签订类型不能超过1个字符")
@ExcelAttribute(name = "签订类型", isNotEmpty = true, errorInfo = "签订类型不能为空", maxLength = 100)
@Schema(description = "签订类型(字典也是汉字)", name = "situation")
private String situation;
......@@ -435,6 +435,12 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema(description = "原因说明", name = "reason")
private String reason;
/**
* 是否附件 0是/1否
*/
@Schema(description = "是否附件 0是/1否")
@TableField(exist = false)
private String isAtta;
@Schema(description = "附件idList")
@TableField(exist = false)
......
......@@ -389,4 +389,20 @@ public class TEmployeeInfo extends BaseEntity {
@TableField(exist = false)
private String leaveTimeEnd;
@Schema(description = "社保状态多个")
@TableField(exist = false)
private String[] socialStatusArray;
@Schema(description = "公积金状态多个")
@TableField(exist = false)
private String[] fundStatusArray;
@Schema(description = "商险状态多个")
@TableField(exist = false)
private String[] insuranceStatusArray;
@Schema(description = "合同状态多个")
@TableField(exist = false)
private String[] contractStatusArray;
@Schema(description = "员工类型多个")
@TableField(exist = false)
private String[] empNatureArray;
}
......@@ -69,6 +69,7 @@ public class TEmployeeContractInfoController {
@Operation(summary = "归档分页查询(审核通过的数据(后面加上权限:自己创建的))", description = "归档分页查询")
@GetMapping("/filingPage")
public R<IPage<TEmployeeContractInfo>> getFilingPage(Page<TEmployeeContractInfo> page, TEmployeeContractInfo tEmployeeContractInfo) {
tEmployeeContractInfo.setSituation(CommonConstants.ZERO_STRING);
tEmployeeContractInfo.setAuditStatus(CommonConstants.dingleDigitIntArray[2]);
return new R<>(tEmployeeContractInfoService.getTEmployeeContractInfoPage(page, tEmployeeContractInfo));
}
......
......@@ -197,7 +197,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
private void initEmployeeContract(TEmployeeContractInfo tEmployeeContractInfo, TEmployeeInfo tEmployeeInfo
, TEmployeeProject tEmployeeProject, YifuUser user) {
tEmployeeContractInfo.setEmpId(tEmployeeInfo.getId());
tEmployeeContractInfo.setEmpNatrue(tEmployeeInfo.getEmpNatrue());
tEmployeeContractInfo.setEmpNatrue(tEmployeeProject.getEmpNatrue());
tEmployeeContractInfo.setEmpIdcard(tEmployeeInfo.getEmpIdcard());
tEmployeeContractInfo.setEmpName(tEmployeeInfo.getEmpName());
tEmployeeContractInfo.setEmpNo(tEmployeeInfo.getEmpCode());
......@@ -794,7 +794,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
try {
......@@ -834,7 +834,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
//获取要导出的列表
List<EmployeeContractExportVO> list = baseMapper.getTEmployeeContractExportHistory(contractInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
try {
......
......@@ -1970,7 +1970,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo.setFileStatus(CommonConstants.ZERO_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeExportList(employeeInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
try {
......@@ -2011,7 +2011,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
employeeInfo.setFileStatus(CommonConstants.ONE_INT);
List<EmployeeExportVO> list = baseMapper.getTEmployeeLeaveExportList(employeeInfo);
ServletOutputStream out = null;
if (list != null && !list.isEmpty()) {
if (list == null || list.isEmpty()) {
list = new ArrayList<>();
}
try {
......
......@@ -240,7 +240,12 @@
AND a.SUBJECT_UNIT = #{tEmployeeContractInfo.subjectUnit}
</if>
<if test="tEmployeeContractInfo.situation != null and tEmployeeContractInfo.situation.trim() != ''">
AND a.SITUATION = #{tEmployeeContractInfo.situation}
<if test="tEmployeeContractInfo.situation == '0' ">
AND a.SITUATION != '作废' AND a.SITUATION != '终止'
</if>
<if test="tEmployeeContractInfo.situation != '0' ">
AND a.SITUATION = #{tEmployeeContractInfo.situation}
</if>
</if>
<if test="tEmployeeContractInfo.contractTerm != null">
AND a.CONTRACT_TERM = #{tEmployeeContractInfo.contractTerm}
......@@ -257,6 +262,9 @@
<if test="tEmployeeContractInfo.isFile != null and tEmployeeContractInfo.isFile.trim() != ''">
AND a.IS_FILE = #{tEmployeeContractInfo.isFile}
</if>
<if test="tEmployeeContractInfo.isAtta != null and tEmployeeContractInfo.isAtta.trim() != ''">
AND a.IS_FILE = #{tEmployeeContractInfo.isAtta}
</if>
<if test="tEmployeeContractInfo.oldId != null">
AND a.OLD_ID = #{tEmployeeContractInfo.oldId}
</if>
......
......@@ -250,7 +250,7 @@
AND a.EMP_CODE = #{tEmployeeInfo.empCode}
</if>
<if test="tEmployeeInfo.empNatrue != null and tEmployeeInfo.empNatrue.trim() != ''">
AND a.EMP_NATRUE in (${tEmployeeInfo.empNatrue})
AND a.EMP_NATRUE = #{tEmployeeInfo.empNatrue}
</if>
<if test="tEmployeeInfo.empName != null and tEmployeeInfo.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeInfo.empName}
......@@ -348,16 +348,16 @@
</if>
</if>
<if test="tEmployeeInfo.contractStatus != null">
AND a.CONTRACT_STATUS in (${tEmployeeInfo.contractStatus})
AND a.CONTRACT_STATUS = #{tEmployeeInfo.contractStatus}
</if>
<if test="tEmployeeInfo.insuranceStatus != null">
AND a.INSURANCE_STATUS in (${tEmployeeInfo.insuranceStatus})
AND a.INSURANCE_STATUS = #{tEmployeeInfo.insuranceStatus}
</if>
<if test="tEmployeeInfo.socialStatus != null">
AND a.SOCIAL_STATUS in (${tEmployeeInfo.socialStatus})
AND a.SOCIAL_STATUS = #{tEmployeeInfo.socialStatus}
</if>
<if test="tEmployeeInfo.fundStatus != null">
AND a.FUND_STATUS in (${tEmployeeInfo.fundStatus})
AND a.FUND_STATUS = #(${tEmployeeInfo.fundStatus}
</if>
<if test="tEmployeeInfo.salaryStatus != null">
AND a.SALARY_STATUS = #{tEmployeeInfo.salaryStatus}
......@@ -404,6 +404,37 @@
<if test="tEmployeeInfo.contactAddress != null and tEmployeeInfo.contactAddress.trim() != ''">
AND a.CONTACT_ADDRESS = #{tEmployeeInfo.contactAddress}
</if>
<if test="tEmployeeInfo.empNatureArray != null">
AND a.EMP_NATRUE in
<foreach item="idStr" index="index" collection="tEmployeeInfo.empNatureArray" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.contractStatusArray != null">
AND a.CONTRACT_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.contractStatusArray" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.insuranceStatusArray != null">
AND a.INSURANCE_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.insuranceStatusArray" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.socialStatusArray != null">
AND a.SOCIAL_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.socialStatusArray" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
<if test="tEmployeeInfo.fundStatusArray != null">
AND a.FUND_STATUS in
<foreach item="idStr" index="index" collection="tEmployeeInfo.fundStatusArray" open="(" separator="," close=")">
#{idStr}
</foreach>
</if>
</if>
</if>
</sql>
......
......@@ -49,4 +49,10 @@ public class ValidityConstants {
/**日期格式化3*/
public static final String DATEFORMAT3_PATTERN = "YYYY-MM";
/**姓名规则 汉字、英文、· 最多10位*/
public static final String USER_NAME_PATTERN = "^[\\u4e00-\\u9fa5a-zA-Z\\·]{1,10}";
/** 全汉字 最多20位 规则 */
public static final String CHINESE_PATTERN_20 = "^[\\u4E00-\\u9FA5]{1,20}";
}
package com.yifu.cloud.plus.v1.yifu.insurances.util;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
public class ValidityUtil {
/**
* @param mobile
* @Description: 验证工资、档案手机号码格式
* @Author: hgw
* @Date: 2021/8/31 10:48
* @return: boolean
**/
public static boolean validateEmpPhone(String mobile) {
if (Common.isEmpty(mobile)){
return Boolean.FALSE;
}
return mobile.matches(ValidityConstants.EMP_PHONE_PATTERN);
}
/**
* 验证手机号码,不符合规则返回true 反之 false
* @author fxj
* @param mobile
* @return
*/
public static boolean checkInvalidEmpPhone(String mobile) {
return !validateEmpPhone(mobile);
}
/**
* @Description: 验证手机号码格式
* @param mobile 手机号码
* @return boolean
*/
public static boolean validateMobile(String mobile) {
if (Common.isEmpty(mobile)){
return Boolean.FALSE;
}
return mobile.matches(ValidityConstants.MOBILE_PATTERN);
}
/**
* 验证是否是电信手机号,133、153、180、189、177
* @param mobile 手机号
* @return boolean
*/
public static boolean validateTelecom(String mobile){
if(Common.isEmpty(mobile)){
return Boolean.FALSE ;
}
return mobile.matches(ValidityConstants.CHINA_TELECOM_PATTERN) ;
}
/**
* 验证是否是联通手机号 130,131,132,155,156,185,186,145,176,1707,1708,1709,175
* @param mobile 电话号码
* @return boolean
*/
public static boolean validateUnionMobile(String mobile){
if(Common.isEmpty(mobile)){
return Boolean.FALSE ;
}
return mobile.matches(ValidityConstants.CHINA_UNICOM_PATTERN) ;
}
/**
* 验证是否是移动手机号
* @param mobile 手机号 134,135,136,137,138,139,150,151,152,157,158,159,182,183,184,187,188,147,178,1705
* @return boolean
*/
public static boolean validateMoveMobile(String mobile){
if(Common.isEmpty(mobile)){
return Boolean.FALSE ;
}
return mobile.matches(ValidityConstants.CHINA_MOVE_PATTERN) ;
}
/**
* @Description: 验证密码格式 6-16 位字母、数字
* @param pwd 密码
* @return boolean
*/
public static boolean validatePwd(String pwd) {
if (Common.isEmpty(pwd)){
return Boolean.FALSE;
}
return Pattern.matches(ValidityConstants.PASSWORD_PATTERN, pwd);
}
/**
* 验证座机号码,格式如:58654567,023-58654567
* @param landline 固话、座机
* @return boolean
*/
public static boolean validateLandLine(final String landline) {
if(Common.isEmpty(landline)){
return Boolean.FALSE;
}
return landline.matches(ValidityConstants.LANDLINE_PATTERN);
}
/**
* 验证邮政编码
* @param postCode 邮政编码
* @return boolean
*/
public static boolean validatePostCode(final String postCode){
if(Common.isEmpty(postCode)){
return Boolean.FALSE ;
}
return postCode.matches(ValidityConstants.POSTCODE_PATTERN) ;
}
/**
* 验证邮箱(电子邮件)
* @param email 邮箱(电子邮件)
* @return boolean
*/
public static boolean validateEamil(final String email){
if(Common.isEmpty(email)){
return Boolean.FALSE ;
}
return email.matches(ValidityConstants.EMAIL_PATTERN) ;
}
/**
* 判断年龄,1-120之间
* @param age 年龄
* @return boolean
*/
public static boolean validateAge(final String age){
if(Common.isEmpty(age)){
return Boolean.FALSE ;
}
return age.matches(ValidityConstants.AGE_PATTERN) ;
}
/**
* 身份证验证
* @param idCard 身份证
* @return boolean
*/
public static boolean validateIDCard(final String idCard){
if(Common.isEmpty(idCard)){
return Boolean.FALSE ;
}
return idCard.matches(ValidityConstants.IDCARD_PATTERN) ;
}
/**
* 姓名验证
*
* @author licancan
* @param userName 姓名
* @return {@link boolean}
*/
public static boolean validateUserName(final String userName){
if(Common.isEmpty(userName)){
return Boolean.FALSE ;
}
return userName.matches(ValidityConstants.USER_NAME_PATTERN) ;
}
/**
* URL地址验证
* @param url URL地址
* @return boolean
*/
public static boolean validateUrl(final String url){
if(Common.isEmpty(url)){
return Boolean.FALSE ;
}
return url.matches(ValidityConstants.URL_PATTERN) ;
}
/**
* 验证QQ号
* @param qq QQ号
* @return boolean
*/
public static boolean validateQq(final String qq){
if(Common.isEmpty(qq)){
return Boolean.FALSE ;
}
return qq.matches(ValidityConstants.QQ_PATTERN) ;
}
/**
* 验证字符串是否全是汉字
* @param str 字符串
* @return boolean
*/
public static boolean validateChinese(final String str){
if(Common.isEmpty(str)){
return Boolean.FALSE ;
}
return str.matches(ValidityConstants.CHINESE_PATTERN) ;
}
/**
* 验证字符串是否全是汉字 最多20位
*
* @author licancan
* @param str
* @return {@link boolean}
*/
public static boolean validateChinese20(final String str){
if(Common.isEmpty(str)){
return Boolean.FALSE;
}
return str.matches(ValidityConstants.CHINESE_PATTERN_20) ;
}
/**
* 校验用户姓名是否是初始化的值
*
* @author licancan
* @param str 姓名
* @param phone 手机号
* @return {@link boolean}
*/
public static boolean validateIsInitialize(final String str,final String phone){
if(Common.isEmpty(str)){
return Boolean.FALSE;
}
//校验手机号是否正确
if (!validateMobile(phone)){
return Boolean.FALSE;
}
String initializeInfo = "用户".concat(phone.substring(phone.length()-6, phone.length()));
if (!str.trim().equals(initializeInfo)){
return Boolean.FALSE;
}
return Boolean.TRUE;
}
/**
* 判断字符串是否全字母
* @param str 字符串
* @return boolean
*/
public static boolean validateStrEnglish(final String str){
if(Common.isEmpty(str)){
return Boolean.FALSE ;
}
return str.matches(ValidityConstants.STR_ENG_PATTERN) ;
}
/**
* 判断是否是整数,包括负数
* @param str 字符串
* @return boolean
*/
public static boolean validateInteger(final String str){
if(Common.isEmpty(str)){
return Boolean.FALSE ;
}
return str.matches(ValidityConstants.INTEGER_PATTERN) ;
}
/**
* 判断是否是大于0的正整数
* @param str 字符串
* @return boolean
*/
public static boolean validatePositiveInt(final String str){
if(Common.isEmpty(str)){
return Boolean.FALSE ;
}
return str.matches(ValidityConstants.POSITIVE_INTEGER_PATTERN) ;
}
public static boolean isFloat(String numStr) {
if(numStr==null){
return false;
}
if(numStr==""){
return false;
}
//验证是否是float型
if(numStr.contains(".")){
if(numStr.indexOf('.')==numStr.lastIndexOf('.')){
StringTokenizer st=new StringTokenizer(numStr,".");
while(st.hasMoreElements()){
String splitStr= st.nextToken();
for(int i=splitStr.length();--i>=0;){
if(!Character.isDigit(splitStr.charAt(i))){
return false;
}
}
}
}
}else{
return false;
}
return true;
}
public static boolean isInt(String numStr) {
if(numStr==null){
return false;
}
if(numStr==""){
return false;
}
//验证是否是float型
if(numStr.contains(".")){
return false;
}else{
//验证是否是int型
for(int i=numStr.length();--i>=0;){
if(!Character.isDigit(numStr.charAt(i))){
return false;
}
}
}
return true;
}
}
......@@ -205,19 +205,19 @@ public class SysBaseSetInfo extends BaseEntity {
private BigDecimal personalProSum;
/**
* 是否大病: 1.是 2.否
* 是否大病: 0收取;1不收取
*/
@ExcelAttribute(name = "是否大病: 1.是 2.否")
@Schema(description = "是否大病: 1.是 2.否")
@ExcelProperty("是否大病: 1.是 2.否")
@ExcelAttribute(name = "是否大病: 0收取;1不收取")
@Schema(description = "是否大病: 0收取;1不收取")
@ExcelProperty("是否大病: 0收取;1不收取")
private String isIllness;
/**
* 收费模式:新员工入职是否收费 1.是 2.否
* 新员工入职是否收费 0.是 1.否
*/
@ExcelAttribute(name = "收费模式:新员工入职是否收费 1.是 2.否")
@Schema(description = "收费模式:新员工入职是否收费 1.是 2.否")
@ExcelProperty("收费模式:新员工入职是否收费 1.是 2.否")
@ExcelAttribute(name = "新员工入职是否收费 0.是 1.否")
@Schema(description = "新员工入职是否收费 0.是 1.否")
@ExcelProperty("新员工入职是否收费 0.是 1.否")
private String isChargePersonal;
/**
......@@ -237,11 +237,11 @@ public class SysBaseSetInfo extends BaseEntity {
private BigDecimal chargePersonal;
/**
* 大病缴纳周期:收取方式 1.年 2.
* 大病缴纳周期:收取方式 0.按年 1.按
*/
@ExcelAttribute(name = "大病缴纳周期:收取方式 1.年 2.月")
@Schema(description = "大病缴纳周期:收取方式 1.年 2.月")
@ExcelProperty("大病缴纳周期:收取方式 1.年 2.月")
@ExcelAttribute(name = "大病缴纳周期:收取方式 0.按年 1.按月")
@Schema(description = "大病缴纳周期:收取方式 0.按年 1.按月")
@ExcelProperty("大病缴纳周期:收取方式 0.按年 1.按月")
private String collectType;
/**
......@@ -309,11 +309,11 @@ public class SysBaseSetInfo extends BaseEntity {
private Integer fundPayPoint;
/**
* 公积金类型 1.市直 2. 省直
* 公积金类型 0.市直 1. 省直
*/
@ExcelAttribute(name = "公积金类型 1.市直 2. 省直")
@Schema(description = "公积金类型 1.市直 2. 省直")
@ExcelProperty("公积金类型 1.市直 2. 省直")
@ExcelAttribute(name = "公积金类型 0.市直 1. 省直")
@Schema(description = "公积金类型 0.市直 1. 省直")
@ExcelProperty("公积金类型 0.市直 1. 省直")
private Integer fundPayType;
/**
......
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