jiangping
2024-06-26 70a391a8b8013d56383e876a0b2a10ceafdd22c9
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -4,7 +4,9 @@
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.ApplyChange;
import com.doumee.dao.business.model.ApplyDetail;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.dao.business.model.Solutions;
import com.doumee.dao.business.vo.ChangeDealTypeVO;
import com.doumee.dao.business.vo.CountCyclePriceVO;
@@ -96,7 +98,47 @@
    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())?"批减生效起期":"期望批减生效起期";
        }
    }
    /**
     * 企业数据来源 0平台注册 1后台导入
     */
@@ -386,7 +428,7 @@
        if(StringUtils.isBlank(idCard)){
            return 2;
        }
        Pattern pattern = Pattern.compile("\\d{17}[\\d|x]"); // 定义身份证号码格式的正则表达式
        Pattern pattern = Pattern.compile("\\d{17}[\\d|x|X]"); // 定义身份证号码格式的正则表达式
        Matcher matcher = pattern.matcher(idCard);
        Integer sex = 0;
        if (matcher.matches()) {
@@ -401,6 +443,7 @@
        }
        return sex;
    }
    /**
     * 状态 0已保存、1待审核、2审核通过、3退回修改、4审核驳回、5待服务机构确认、6服务机构拒绝、7已分配服务机构、8诊断中
@@ -759,9 +802,12 @@
    }
    public static void main(String[] args) {
        System.out.println(IdcardUtil.isValidCard("340621199310134818"));
        System.out.println(IdcardUtil.isValidCard("341621199310134818"));
        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"));
//        System.out.println("{\"companyName\":\"应宝科技\",\"endtime\":\"2024-03-01 17:19:00\",\"erpId\":\"4D40185D5BC74A13821BE46EAF8B4179\",\"erpWithVisitDTOList\":[],\"faceImg\":\"20240304/1709518170325_742.jpg\",\"idcardNo\":\"342501199609300535\",\"idcardType\":0,\"name\":\"黄晋\",\"phone\":\"17756328697\",\"reason\":\"探险\",\"receptMemberId\":\"E7E514BD7DE3F27CE0530B630A0AEAE0\",\"starttime\":\"2024-03-01 13:18:00\"}");
    }
@@ -2379,4 +2425,5 @@
        }
    }
}