yonge 3 gadi atpakaļ
vecāks
revīzija
6e1704672b

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/DegreeRegistrationActivityDto.java

@@ -15,6 +15,8 @@ public class DegreeRegistrationActivityDto extends DegreeRegistration {
     private Map<CourseSchedule.CourseScheduleType, Integer> additionCourseInfo;
 
     private BigDecimal price;
+    
+	private String certificateType;
 
     public Map<CourseSchedule.CourseScheduleType, Integer> getAdditionCourseInfo() {
         return additionCourseInfo;
@@ -31,4 +33,12 @@ public class DegreeRegistrationActivityDto extends DegreeRegistration {
     public void setPrice(BigDecimal price) {
         this.price = price;
     }
+
+	public String getCertificateType() {
+		return certificateType;
+	}
+
+	public void setCertificateType(String certificateType) {
+		this.certificateType = certificateType;
+	}
 }

+ 9 - 2
mec-biz/src/main/resources/config/mybatis/DegreeRegistrationMapper.xml

@@ -28,6 +28,7 @@
         <result column="status_" jdbcType="TINYINT" property="status"/>
         <result column="activity_tag_" property="activityTag"/>
         <result column="degree_type_" property="degreeType"/>
+        <result column="certificate_type_" property="certificateType"/>
     </resultMap>
 
     <select id="get" parameterType="java.lang.Integer" resultMap="DegreeRegistration">
@@ -137,13 +138,13 @@
         idcard_, city_, school_,
         subject_,level_, theory_level_,theory_money_, theory_cert_,mobile_,
         money_, memo_, create_time_,
-        update_time_, status_, activity_tag_,degree_type_)
+        update_time_, status_, activity_tag_,degree_type_,certificate_type_)
         values (#{userId},#{sporadicId,jdbcType=INTEGER},#{organId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR},
         #{idcard,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{school,jdbcType=VARCHAR},
         #{subject,jdbcType=VARCHAR},#{level,jdbcType=VARCHAR},
         #{theoryLevel,jdbcType=VARCHAR},#{theoryMoney,jdbcType=DECIMAL},
         #{theoryCert,jdbcType=VARCHAR},#{mobile,jdbcType=VARCHAR},#{money,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR},
-        #{createTime}, #{updateTime}, #{status,jdbcType=TINYINT}, #{activityTag}, #{degreeType})
+        #{createTime}, #{updateTime}, #{status,jdbcType=TINYINT}, #{activityTag}, #{degreeType},#{certificateType})
     </insert>
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.DegreeRegistration">
         <!--@mbg.generated-->
@@ -215,6 +216,9 @@
             <if test="activityTag != null">
                 activity_tag_ = #{activityTag},
             </if>
+            <if test="certificateType != null">
+                certificate_type_ = #{certificateType},
+            </if>
                 update_time_ = NOW()
         </set>
         where id_ = #{id,jdbcType=INTEGER}
@@ -290,6 +294,9 @@
                 <if test="degree.activityTag != null">
                     activity_tag_ = #{degree.activityTag},
                 </if>
+	            <if test="degree.certificateType != null">
+	                certificate_type_ = #{degree.certificateType},
+	            </if>
                     update_time_ = NOW()
             </set>
             where id_ = #{degree.id,jdbcType=INTEGER}

+ 5 - 3
mec-student/src/main/java/com/ym/mec/student/controller/DegreeController.java

@@ -96,9 +96,11 @@ public class DegreeController extends BaseController {
         	return failed("请从正确入口进行报名");
         }
         
-        IdcardValidator idcardValidator = new IdcardValidator();
-        if (!debugMode && !idcardValidator.isValidatedAllIdcard(degreeRegistration.getIdcard())) {
-            throw new BizException("身份证号不正确,请核对");
+        if("IDENTITY".equals(degreeRegistration.getCertificateType())){
+	        IdcardValidator idcardValidator = new IdcardValidator();
+	        if (!debugMode && !idcardValidator.isValidatedAllIdcard(degreeRegistration.getIdcard())) {
+	            throw new BizException("身份证号不正确,请核对");
+	        }
         }
         SporadicChargeInfo info = sporadicChargeInfoDao.get(degreeRegistration.getSporadicId());
         if (info == null || info.getDelFlag().equals(1)) {