Shanks 7 år sedan
förälder
incheckning
eb17d1edf5

+ 9 - 0
src/main/java/com/ygj/yuemum/domain/maternitymatron/MmInfoCertificate.java

@@ -8,6 +8,15 @@ public class MmInfoCertificate {
     private String start_date; // 领证日期
     private String end_date; // 到期日期
     private String certificate_name;
+    private String organization; //发证机构
+
+    public String getOrganization() {
+        return organization;
+    }
+
+    public void setOrganization(String organization) {
+        this.organization = organization;
+    }
 
     public MmInfoCertificate() {
         super();

+ 9 - 9
src/main/java/com/ygj/yuemum/utils/IDcard.java

@@ -3,14 +3,14 @@ package com.ygj.yuemum.utils;
 public class IDcard {
     private final static int[] dayArr = new int[] { 20, 19, 21, 20, 21, 22, 23,
             23, 23, 24, 23, 22 };
-    private final static String[] constellationArr = new String[] { "摩羯座",
-            "水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座", "狮子座", "处女座", "天秤座",
-            "天蝎座", "射手座", "摩羯座" };
+    private final static String[] constellationArr = new String[] { "10",
+            "11", "12", "1", "2", "3", "4", "5", "6", "7",
+            "8", "9", "10" };
 
     /**
      * 根据出生日期计算属相和星座
      *
-     * @param args
+     * @param
      */
 //    public static void main(String[] args) throws Exception{
 //        String idcardt ="130202198307080017";
@@ -29,9 +29,9 @@ public class IDcard {
     public String getidcard(String idcard){
         String id;
         String res = "";
-        int month = 7;
-        int day = 8;
-        int year =  1983;
+        int month = 1;
+        int day = 1;
+        int year =  1981;
         res = "constellation: "+getConstellation(month, day)+",";
         res = res+"zodiac: "+getYear(year)+",";
         return res;
@@ -59,8 +59,8 @@ public class IDcard {
             return "未知";
         }
         int start = 1900;
-        String[] years = new String[] { "鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊",
-                "猴", "鸡", "狗", "猪" };
+        String[] years = new String[] { "1", "2", "3", "4", "5", "6", "7", "8",
+                "9", "10", "11", "12" };
         return years[(year - start) % years.length];
     }
 }

+ 12 - 1
src/main/resources/mybatis/mapper/maternitymatron/MmInfoCertificateMapper.xml

@@ -9,10 +9,11 @@
         <result column="start_date" property="start_date" jdbcType="VARCHAR" />
         <result column="end_date" property="end_date" jdbcType="VARCHAR" />
         <result column="certificate_name" property="certificate_name" jdbcType="VARCHAR" />
+        <result column="organization" property="organization" jdbcType="VARCHAR" />
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id, servant_code, certificate_code,start_date,end_date,certificate_name
+        id, servant_code, certificate_code,start_date,end_date,certificate_name,organization
     </sql>
 
     <!-- 得到月嫂证书信息 -->
@@ -34,6 +35,7 @@
         id,
         fgetcertificatename(certificate_code) certificate_name,
         certificate_code,
+        organization,
         DATE_FORMAT(start_date,'%Y-%m-%d') start_date,
         DATE_FORMAT(end_date,'%Y-%m-%d') end_date
         from mm_info_certificate
@@ -55,6 +57,9 @@
             <if test="certificate_code != null" >
                 certificate_code,
             </if>
+            <if test="organization != null" >
+                organization,
+            </if>
             <if test="start_date != null" >
                 start_date,
             </if>
@@ -69,6 +74,9 @@
             <if test="certificate_code != null" >
                 #{certificate_code,jdbcType=INTEGER},
             </if>
+            <if test="organization != null" >
+                #{organization,jdbcType=INTEGER},
+            </if>
             <if test="start_date != null" >
                 #{start_date,jdbcType=DATE},
             </if>
@@ -88,6 +96,9 @@
             <if test="certificate_code != null" >
                 certificate_code = #{certificate_code,jdbcType=VARCHAR},
             </if>
+            <if test="organization != null" >
+                organization = #{organization,jdbcType=VARCHAR},
+            </if>
             <if test="start_date != null" >
                 start_date = #{start_date,jdbcType=DATE},
             </if>