xuxiuxi
2017-04-24 b96e8c8ba2bc11461d1ea6c80a167392ef09cb8a


git-svn-id: http://192.168.1.226/svn/proxy@530 454eff88-639b-444f-9e54-f578c98de674
2个文件已修改
220 ■■■■■ 已修改文件
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/discern/entity/Register.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java 136 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/discern/entity/Register.java
@@ -83,6 +83,22 @@
         * 危险人员警告消息
         */
        public static final String warning = "warning";
        /**
         * 证件照
         */
        public static final String idCardPhoto = "idCardPhoto";
        /**
         * 上传自定义照片
         */
        public static final String uploadCustomPhoto = "uploadCustomPhoto";
        /**
         * 监控图片
         */
        public static final String surveillancePhoto = "surveillancePhoto";
        /**
         * 监控图片id
         */
        public static final String surveillancePhotoId = "surveillancePhotoId";
    }
    // 人员主键
@@ -119,6 +135,14 @@
    private String remark;
    // 危险人员警告消息
    private String warning;
    // 证件照
    private String idCardPhoto;
    // 上传自定义照片
    private String uploadCustomPhoto;
    // 监控图片
    private String surveillancePhoto;
    // 监控图片id
    private String surveillancePhotoId;
    /**
     * Get 人员主键
@@ -358,6 +382,62 @@
        this.warning = warning;
    }
    /**
     * Get 证件照
     */
    public String getIdCardPhoto() {
        return idCardPhoto;
    }
    /**
     * Set 证件照
     */
    public void setIdCardPhoto(String idCardPhoto) {
        this.idCardPhoto = idCardPhoto;
    }
    /**
     * Get 上传自定义照片
     */
    public String getUploadCustomPhoto() {
        return uploadCustomPhoto;
    }
    /**
     * Set 上传自定义照片
     */
    public void setUploadCustomPhoto(String uploadCustomPhoto) {
        this.uploadCustomPhoto = uploadCustomPhoto;
    }
    /**
     * Get 监控图片
     */
    public String getSurveillancePhoto() {
        return surveillancePhoto;
    }
    /**
     * Set 监控图片
     */
    public void setSurveillancePhoto(String surveillancePhoto) {
        this.surveillancePhoto = surveillancePhoto;
    }
    /**
     * Get 监控图片id
     */
    public String getSurveillancePhotoId() {
        return surveillancePhotoId;
    }
    /**
     * Set 监控图片id
     */
    public void setSurveillancePhotoId(String surveillancePhotoId) {
        this.surveillancePhotoId = surveillancePhotoId;
    }
    public String toString() {
        return
                ",人员主键 =" + registerId +  ",人员名字 =" + username   +  ",人员名首字母 ="+ nameEn     +
@@ -365,6 +445,8 @@
                        ",市 ="    + city       +  ",出生日期 =" + birthday   +  ",座机电话 =" + tel        +
                        ",移动电话 =" + mobilePhone +  ",证件类型 =" + identityTypeId +  ",证件编号 =" + identifyNum +
                        ",公司主键 =" + companyId  +  ",部门主键 =" + departmentId +  ",职务主键 =" + postId     +
                        ",人员备注消息 ="+ remark     +  ",危险人员警告消息 ="+ warning   ;
                        ",人员备注消息 ="+ remark     +  ",危险人员警告消息 ="+ warning    +  ",证件照 ="  + idCardPhoto +
                        ",上传自定义照片 ="+ uploadCustomPhoto +  ",监控图片 =" + surveillancePhoto +  ",监控图片id ="+ surveillancePhotoId
                ;
    }
}
VisitFace/DemoForBsk/app/src/main/java/cn/com/basic/face/fragment/RegisterFragment.java
@@ -115,74 +115,74 @@
    public void fragment_register_add_click(View v) {
        RequestParams params = new RequestParams();
//        String name = fragment_register_name.getValue();
//        if (name.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "姓名不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_name.requestFocus();
//            return;
//        }
//        String phone = fragment_register_phone.getValue();
//        if (phone.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "电话不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_phone.requestFocus();
//            return;
//        }
//        String gender = fragment_register_gender.getValue();
//        if (gender.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "性别不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_gender.callOnClick();
//            return;
//        }
//        String id_class = fragment_register_id_class.getValue();
//        if (id_class.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "证件类型不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_id_class.callOnClick();
//            return;
//        }
//        String country = fragment_register_country.getValue();
//        if (country.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "国籍不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_country.callOnClick();
//            return;
//        }
//        String id_num = fragment_register_id_num.getValue();
//        if (id_num.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "证件编号不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_id_num.requestFocus();
//            return;
//        }
//        String birthday = fragment_register_birthday.getValue();
//        if (birthday.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "出生日期不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_birthday.callOnClick();
//            return;
//        }
//        String company = fragment_register_company.getValue();
//        if (company.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "公司名称不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_company.requestFocus();
//            return;
//        }
//        String remark = fragment_register_remark.getValue();
//        if (remark.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "备注不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_remark.requestFocus();
//            return;
//        }
//        String visitor_class = fragment_register_visitor_class.getValue();
//        if (visitor_class.trim().length() <= 0) {
//            Toast.makeText(MainActivity.getInstance(), "访客类型不能为空", Toast.LENGTH_SHORT).show();
//            fragment_register_visitor_class.callOnClick();
//            return;
//        }
//        params.addBodyParameter(Register.FieldNames.username, name);
//        params.addBodyParameter(Register.FieldNames.mobilePhone, phone);
//        params.addBodyParameter(Register.FieldNames.genderId, DictionaryMng.getInstance().getId(gender));
//        params.addBodyParameter(Register.FieldNames.identityTypeId, DictionaryMng.getInstance().getId(id_class));
//        params.addBodyParameter(Register.FieldNames.countryId, DictionaryMng.getInstance().getId(country));
//        params.addBodyParameter(Register.FieldNames.identifyNum, id_num);
//        params.addBodyParameter(Register.FieldNames.companyId, company);
//        params.addBodyParameter(Register.FieldNames.birthday, birthday);
        String name = fragment_register_name.getValue();
        if (name.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "姓名不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_name.requestFocus();
            return;
        }
        String phone = fragment_register_phone.getValue();
        if (phone.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "电话不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_phone.requestFocus();
            return;
        }
        String gender = fragment_register_gender.getValue();
        if (gender.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "性别不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_gender.callOnClick();
            return;
        }
        String id_class = fragment_register_id_class.getValue();
        if (id_class.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "证件类型不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_id_class.callOnClick();
            return;
        }
        String country = fragment_register_country.getValue();
        if (country.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "国籍不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_country.callOnClick();
            return;
        }
        String id_num = fragment_register_id_num.getValue();
        if (id_num.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "证件编号不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_id_num.requestFocus();
            return;
        }
        String birthday = fragment_register_birthday.getValue();
        if (birthday.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "出生日期不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_birthday.callOnClick();
            return;
        }
        String company = fragment_register_company.getValue();
        if (company.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "公司名称不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_company.requestFocus();
            return;
        }
        String remark = fragment_register_remark.getValue();
        if (remark.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "备注不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_remark.requestFocus();
            return;
        }
        String visitor_class = fragment_register_visitor_class.getValue();
        if (visitor_class.trim().length() <= 0) {
            Toast.makeText(MainActivity.getInstance(), "访客类型不能为空", Toast.LENGTH_SHORT).show();
            fragment_register_visitor_class.callOnClick();
            return;
        }
        params.addBodyParameter(Register.FieldNames.username, name);
        params.addBodyParameter(Register.FieldNames.mobilePhone, phone);
        params.addBodyParameter(Register.FieldNames.genderId, DictionaryMng.getInstance().getId(gender));
        params.addBodyParameter(Register.FieldNames.identityTypeId, DictionaryMng.getInstance().getId(id_class));
        params.addBodyParameter(Register.FieldNames.countryId, DictionaryMng.getInstance().getId(country));
        params.addBodyParameter(Register.FieldNames.identifyNum, id_num);
        params.addBodyParameter(Register.FieldNames.companyId, company);
        params.addBodyParameter(Register.FieldNames.birthday, birthday);
        if (fragment_register_choose_photo_img != null) {
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();