jiangping
2024-06-28 c41f8c8a75c4475831e3c7e9cde7467d2fb39950
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -4,8 +4,7 @@
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.dao.business.dto.CountCyclePriceDTO;
import com.doumee.dao.business.model.ApplyDetail;
import com.doumee.dao.business.model.Solutions;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.ChangeDealTypeVO;
import com.doumee.dao.business.vo.CountCyclePriceVO;
import io.swagger.models.auth.In;
@@ -96,7 +95,73 @@
    public static final String DU_FILE ="DU_FILE" ;
    public static final String SIGN_DONE_NOTIFY_URL = "SIGN_DONE_NOTIFY_URL";
    public static final int FOUR = 4;
    public static final String COMPANY_PHONE_AUTH ="COMPANY_PHONE_AUTH" ;
    /**
     * 获取申请单时间列标题
     * @param type 0开始时间 1截止时间
     * @param model
     * @return
     */
    public static String getApplyTimeTitle(int type, InsuranceApply model){
        if(type ==1){
            if(Constants.equalsInteger(model.getSolutionType(),Constants.ONE)){
                return  Constants.equalsInteger(model.getUnionApplyTbdStatus(),Constants.THREE)?"保险生效起期":"期望保险生效起期";
            }else{
                return  Constants.equalsInteger(model.getStatus(), InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())?"保险生效起期":"期望保险生效起期";
            }
        }else{
            if(Constants.equalsInteger(model.getSolutionType(),Constants.ONE)){
                return  Constants.equalsInteger(model.getUnionApplyTbdStatus(),Constants.THREE)?"保险生效止期":"预计生效止期";
            }else{
                return  Constants.equalsInteger(model.getStatus(), InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())?"保险生效止期":"预计生效止期";
            }
        }
    }
    /**
     * 获取批改单时间标题列
     * @param type 0更换派遣单位 1加保 0减保
     * @param model
     * @return
     */
    public static String getChangeApplyTimeTitle(int type, ApplyChange model){
        if(type ==2){
             return  Constants.equalsInteger(model.getStatus(), ApplyChangeStatus.APPROVE.getKey())?"批单生效期":"期望批单生效期";
        }else  if(type ==1){
            return  Constants.equalsInteger(model.getStatus(), ApplyChangeStatus.APPROVE.getKey())?"批增生效起期":"期望批增生效起期";
        }else{
            return  Constants.equalsInteger(model.getStatus(), ApplyChangeStatus.APPROVE.getKey())?"批减生效起期":"期望批减生效起期";
        }
    }
    public static String getApplyTimeTitle(int type, UnionApply model){
        if(type ==1){
                return  Constants.equalsInteger(model.getStatus(), UnionApplyStatus.FINISH.getKey())?"保险生效起期":"期望保险生效起期";
        }else{
                return  Constants.equalsInteger(model.getStatus(), UnionApplyStatus.FINISH.getKey())?"保险生效止期":"预计生效止期";
        }
    }
    /**
     * 获取批改单时间标题列
     * @param type 0更换派遣单位 1加保 0减保
     * @param model
     * @return
     */
    public static String getChangeApplyTimeTitle(int type, UnionChange model){
        if(type ==2){
             return  Constants.equalsInteger(model.getStatus(), UnionChangeStatus.FINISH.getKey())?"批单生效期":"期望批单生效期";
        }else  if(type ==1){
            return  Constants.equalsInteger(model.getStatus(), UnionChangeStatus.FINISH.getKey())?"批增生效起期":"期望批增生效起期";
        }else{
            return  Constants.equalsInteger(model.getStatus(), UnionChangeStatus.FINISH.getKey())?"批减生效起期":"期望批减生效起期";
        }
    }
    /**
     * 企业数据来源 0平台注册 1后台导入
     */
@@ -760,7 +825,10 @@
    }
    public static void main(String[] args) {
        System.out.println(Constants.getSexByIdCard("41052119910310001X"));
        System.out.println(IdcardUtil.isValidCard("342623199201150101"));
        System.out.println(IdcardUtil.isValidCard("342623199201150102"));
        System.out.println(IdcardUtil.isValidCard("342623199201150103"));
        System.out.println(IdcardUtil.isValidCard("342623199201150104"));
//        System.out.println(IdcardUtil.isValidCard("340621199310134818"));
//        System.out.println(IdcardUtil.isValidCard("341621199310134818"));