ソースを参照

第二次修改

陈凯凯 3 年 前
コミット
7a5586c99d

+ 87 - 0
src/main/java/com/example/fushitongdometj/entity/NewContractFourteenBack.java

@@ -0,0 +1,87 @@
+package com.example.fushitongdometj.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.example.fushitongdometj.model.ContractFourteenBack;
+import com.example.fushitongdometj.model.entity.JsonResult;
+import lombok.*;
+
+/**
+ * @author guanhuijuan
+ * @create 2020-03-04 16:09
+ * @desc ContractFourteenBack
+ **/
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class NewContractFourteenBack {
+
+
+    private String no_id;
+    private String no_reqId;
+    private JsonResult no_name;
+    private JsonResult no_idCode;
+    private JsonResult no_sex;
+    private JsonResult no_mobile;
+    private JsonResult no_email;
+    private JsonResult no_maritalStaus;
+    private JsonResult no_education;
+    // private String momFirstName;
+    private JsonResult no_applyForAmount;
+    private JsonResult no_repayment;
+    // todo 0312 新增
+    private JsonResult no_period;
+    private JsonResult no_no_homeAddress;
+    private JsonResult no_homePostCode;
+    private JsonResult no_homePhone;
+    private JsonResult no_homeProperty;
+    private JsonResult no_companyName;
+    private JsonResult no_employedType;
+    private JsonResult no_dept;
+    private JsonResult no_companyPhone;
+    private JsonResult no_companyPostCode;
+    private JsonResult no_position;
+    private JsonResult no_companyAddress;
+    private JsonResult no_income;
+    private JsonResult no_incomeYear;
+    private JsonResult no_joinTime;
+    private JsonResult no_industryType;
+    private JsonResult no_businessType;
+    private JsonResult no_loanType;
+    private JsonResult no_mateName;
+    private JsonResult no_mateMobile;
+    /**
+     * 类型list 合并。
+     * todo 联系人列表 (list)contacts
+     * 			联系人姓名	contactName
+     * 			与本人关系	  relationship
+     * 			联系人联系方式	  contactMobile
+     * 			联系人固定电话	  contactPhone
+     */
+    private JsonResult no_contactName;
+    private JsonResult no_relationship;
+    private JsonResult no_contactMobile;
+    private JsonResult no_contactPhone;
+    //
+
+    private JsonResult no_cardId;
+    /**
+     * todo 0312 删除字段。
+     * todo 0320 新增字段。
+     */
+    private JsonResult no_sign;
+    private JsonResult no_date;
+    // private String bocCard;
+    //
+
+    private String no_operator;
+    private String no_operatorId;
+    private String no_operateTime;
+    private String no_operateIp;
+    private String no_remarks;
+    private String no_overallConfidence;
+    private String no_midConfidence;
+    private String no_excTime;
+}

+ 321 - 148
src/main/java/com/example/fushitongdometj/service/impl/ContractFourteenBackServiceImpl.java

@@ -2,6 +2,7 @@ package com.example.fushitongdometj.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.example.fushitongdometj.entity.NewContractFourteenBack;
 import com.example.fushitongdometj.mapper.db1.ContractFourteenBackMapper;
 import com.example.fushitongdometj.mapper.db1.UploadMapper;
 import com.example.fushitongdometj.mapper.db1.source.ContractFourteenMapper;
@@ -19,6 +20,8 @@ import com.example.fushitongdometj.utils.AllUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -44,6 +47,278 @@ public class ContractFourteenBackServiceImpl implements ContractFourteenBackServ
     @Autowired
     UploadService uploadService;
 
+//    @Override
+//    public Map selectType14(String time, String remarks_type) throws Exception {
+//        remarks_data = time;
+//        int ACCURACY = 0;
+//        int ACCURACY100 = 0;
+//        List<Upload> uploads = null;
+//        List<ContractFourteenBack> contractFourteenBacks = null;
+//        QueryWrapper<ContractFourteenBack> queryWrapper = new QueryWrapper<>();
+//        if ("0".equals(remarks_type) || "1".equals(remarks_type)) {
+//            List<Object> list = uploadService.selectType(time, "14", remarks_type);
+//            queryWrapper.in(true,"req_id",list);
+//            contractFourteenBacks = contractFourteenMapper.selectList(queryWrapper);
+//            uploads = uploadService.selectImg(time, "14");
+//        }
+//
+//        if ("3".equals(remarks_type)) {
+//            queryWrapper.select("operator","remarks","operate_time");
+//            queryWrapper.eq("date_format(operate_time,'%Y-%m-%d')",time);
+//            contractFourteenBacks = contractFourteenMapper.selectList(queryWrapper);
+//            // 查询图片url
+//            QueryWrapper<Upload> uploadQueryWrapper = new QueryWrapper<>();
+//            uploadQueryWrapper.eq("date_format(operate_time,'%Y-%m-%d')",time);
+//            uploadQueryWrapper.eq("type","14");
+//            uploads = uploadMapper.selectList(uploadQueryWrapper);
+//        }
+//
+//
+//        Map<String, Object> map_all = new LinkedHashMap<>();
+//        Map<String, Object> map_errors = new HashMap<>();
+//        if (contractFourteenBacks.size()!=0){
+//            for (ContractFourteenBack twoBack : contractFourteenBacks) {
+//                // 中间结果值
+//                String remarks = twoBack.getRemarks();
+//                String data = JSONObject.parseObject(remarks).getString("data");
+//                ContractTwoBack back_data = JSONObject.parseObject(data, ContractTwoBack.class);
+//                // 最终结果值
+//                String operator = twoBack.getOperator();
+//                String back_res = JSONObject.parseObject(operator).getString("res");
+//                // req_id
+//                String reqId = JSONObject.parseObject(operator).getString("reqId");
+//                // 姓名
+//                String name = JSONObject.parseObject(back_res).getString("name");
+//                JsonResult name_res = JSONObject.parseObject(name, JsonResult.class);
+//                // 身份证号
+//                String idCode = JSONObject.parseObject(back_res).getString("idCode");
+//                JsonResult idCode_res = JSONObject.parseObject(idCode, JsonResult.class);
+//                // 性别
+//                String sex = JSONObject.parseObject(back_res).getString("sex");
+//                JsonResult sex_res = JSONObject.parseObject(sex, JsonResult.class);
+//                // 手机号
+//                String mobile = JSONObject.parseObject(back_res).getString("mobile");
+//                JsonResult mobile_res = JSONObject.parseObject(mobile, JsonResult.class);
+//                // 邮箱
+//                String email = JSONObject.parseObject(back_res).getString("email");
+//                JsonResult email_res = JSONObject.parseObject(email, JsonResult.class);
+//                // 婚姻状况
+//                String maritalStaus = JSONObject.parseObject(back_res).getString("maritalStaus");
+//                JsonResult maritalStaus_res = JSONObject.parseObject(maritalStaus, JsonResult.class);
+//                // 教育程度
+//                String education = JSONObject.parseObject(back_res).getString("education");
+//                JsonResult education_res = JSONObject.parseObject(education, JsonResult.class);
+////                // 母亲姓氏
+////                String momFirstName = JSONObject.parseObject(back_res).getString("momFirstName");
+////                JsonResult momFirstName_res = JSONObject.parseObject(momFirstName, JsonResult.class);
+//                // 申请贷款金额
+//                String applyForAmount = JSONObject.parseObject(back_res).getString("applyForAmount");
+//                JsonResult applyForAmount_res = JSONObject.parseObject(applyForAmount, JsonResult.class);
+//                // 还款方式
+//                String repayment = JSONObject.parseObject(back_res).getString("repayment");
+//                JsonResult repayment_res = JSONObject.parseObject(repayment, JsonResult.class);
+//                // 期数
+//                String period = JSONObject.parseObject(back_res).getString("period");
+//                JsonResult period_res = JSONObject.parseObject(period, JsonResult.class);
+//                // 住宅地址
+//                String homeAddress = JSONObject.parseObject(back_res).getString("homeAddress");
+//                JsonResult homeAddress_res = JSONObject.parseObject(homeAddress, JsonResult.class);
+//                // 住宅邮编
+//                String homePostCode = JSONObject.parseObject(back_res).getString("homePostCode");
+//                JsonResult homePostCode_res = JSONObject.parseObject(homePostCode, JsonResult.class);
+//                // 住宅电话
+//                String homePhone = JSONObject.parseObject(back_res).getString("homePhone");
+//                JsonResult homePhone_res = JSONObject.parseObject(homePhone, JsonResult.class);
+//                // 住宅性质
+//                String homeProperty = JSONObject.parseObject(back_res).getString("homeProperty");
+//                JsonResult homeProperty_res = JSONObject.parseObject(homeProperty, JsonResult.class);
+//                // 单位名称
+//                String companyName = JSONObject.parseObject(back_res).getString("companyName");
+//                JsonResult companyName_res = JSONObject.parseObject(companyName, JsonResult.class);
+//                // 受雇类型
+//                String employedType = JSONObject.parseObject(back_res).getString("employedType");
+//                JsonResult employedType_res = JSONObject.parseObject(employedType, JsonResult.class);
+//                // 部门
+//                String dept = JSONObject.parseObject(back_res).getString("dept");
+//                JsonResult dept_res = JSONObject.parseObject(dept, JsonResult.class);
+//                // 单位电话
+//                String companyPhone = JSONObject.parseObject(back_res).getString("companyPhone");
+//                JsonResult companyPhone_res = JSONObject.parseObject(companyPhone, JsonResult.class);
+//                // 单位邮编
+//                String companyPostCode = JSONObject.parseObject(back_res).getString("companyPostCode");
+//                JsonResult companyPostCode_res = JSONObject.parseObject(companyPostCode, JsonResult.class);
+//                // 职务
+//                String position = JSONObject.parseObject(back_res).getString("position");
+//                JsonResult position_res = JSONObject.parseObject(position, JsonResult.class);
+//                // 单位地址
+//                String companyAddress = JSONObject.parseObject(back_res).getString("companyAddress");
+//                JsonResult companyAddress_res = JSONObject.parseObject(companyAddress, JsonResult.class);
+//                // 当前收入
+//                String income = JSONObject.parseObject(back_res).getString("income");
+//                JsonResult income_res = JSONObject.parseObject(income, JsonResult.class);
+//                // 年营收如
+//                String incomeYear = JSONObject.parseObject(back_res).getString("incomeYear");
+//                JsonResult incomeYear_res = JSONObject.parseObject(incomeYear, JsonResult.class);
+//                // 入职时间
+//                String joinTime = JSONObject.parseObject(back_res).getString("joinTime");
+//                JsonResult joinTime_res = JSONObject.parseObject(joinTime, JsonResult.class);
+//                // 行业性质
+//                String industryType = JSONObject.parseObject(back_res).getString("industryType");
+//                JsonResult industryType_res = JSONObject.parseObject(industryType, JsonResult.class);
+//                // 经济类型
+//                String businessType = JSONObject.parseObject(back_res).getString("businessType");
+//                JsonResult businessType_res = JSONObject.parseObject(businessType, JsonResult.class);
+//                // 贷款用途
+//                String loanType = JSONObject.parseObject(back_res).getString("loanType");
+//                JsonResult loanType_res = JSONObject.parseObject(loanType, JsonResult.class);
+//                // 配偶姓名
+//                String mateName = JSONObject.parseObject(back_res).getString("mateName");
+//                JsonResult mateName_res = JSONObject.parseObject(mateName, JsonResult.class);
+//                // 配偶电话
+//                String mateMobile = JSONObject.parseObject(back_res).getString("mateMobile");
+//                JsonResult mateMobile_res = JSONObject.parseObject(mateMobile, JsonResult.class);
+//                // 联系人姓名
+//                String contactName = JSONObject.parseObject(back_res).getString("contactName");
+//                JsonResult contactName_res = JSONObject.parseObject(contactName, JsonResult.class);
+//                // 与本人的关系
+//                String relationship = JSONObject.parseObject(back_res).getString("relationship");
+//                JsonResult relationship_res = JSONObject.parseObject(relationship, JsonResult.class);
+//                // 联系人手机号
+//                String contactMobile = JSONObject.parseObject(back_res).getString("contactMobile");
+//                JsonResult contactMobile_res = JSONObject.parseObject(contactMobile, JsonResult.class);
+//                // 联系人固定电话
+//                String contactPhone = JSONObject.parseObject(back_res).getString("contactPhone");
+//                JsonResult contactPhone_res = JSONObject.parseObject(contactPhone, JsonResult.class);
+//                // 本人借记卡号
+//                String cardId = JSONObject.parseObject(back_res).getString("cardId");
+//                JsonResult cardId_res = JSONObject.parseObject(cardId, JsonResult.class);
+//
+//                // 签名
+//                String sign = JSONObject.parseObject(back_res).getString("sign");
+//                JsonResult sign_res = JSONObject.parseObject(sign, JsonResult.class);
+//                // 申请日期
+//                String date = JSONObject.parseObject(back_res).getString("date");
+//                JsonResult date_res = JSONObject.parseObject(date, JsonResult.class);
+//
+//                // 单条记录对比结果map
+//                Map<String, Object> map = new HashMap<>();
+//                check(map, map_errors, name_res, uploads, back_data.getName(), "name", reqId);
+//                check(map, map_errors, idCode_res, uploads, back_data.getIdCode(), "idCode", reqId);
+//                check(map, map_errors, sex_res, uploads, back_data.getSex(), "sex", reqId);
+//                check(map, map_errors, mobile_res, uploads, back_data.getMobile(), "mobile", reqId);
+//                check(map, map_errors, email_res, uploads, back_data.getEmail(), "email", reqId);
+//                check(map, map_errors, maritalStaus_res, uploads, back_data.getMaritalStaus(), "maritalStaus", reqId);
+//                check(map, map_errors, education_res, uploads, back_data.getEducation(), "education", reqId);
+////                check(map, map_errors, momFirstName_res, uploads, back_data.getMomFirstName(), "momFirstName", reqId);
+//                check(map, map_errors, applyForAmount_res, uploads, back_data.getApplyForAmount(), "applyForAmount", reqId);
+//                check(map, map_errors, repayment_res, uploads, back_data.getRepayment(), "repayment", reqId);
+//                check(map, map_errors, period_res, uploads, back_data.getPeriod(), "period", reqId);
+//                check(map, map_errors, homeAddress_res, uploads, back_data.getHomeAddress(), "homeAddress", reqId);
+//                check(map, map_errors, homePostCode_res, uploads, back_data.getHomePostCode(), "homePostCode", reqId);
+//                check(map, map_errors, homePhone_res, uploads, back_data.getHomePhone(), "homePhone", reqId);
+//                check(map, map_errors, homeProperty_res, uploads, back_data.getHomeProperty(), "homeProperty", reqId);
+//                check(map, map_errors, companyName_res, uploads, back_data.getCompanyName(), "companyName", reqId);
+//                check(map, map_errors, employedType_res, uploads, back_data.getEmployedType(), "employedType", reqId);
+//                check(map, map_errors, dept_res, uploads, back_data.getDept(), "dept", reqId);
+//                check(map, map_errors, companyPhone_res, uploads, back_data.getCompanyPhone(), "companyPhone", reqId);
+//                check(map, map_errors, companyPostCode_res, uploads, back_data.getCompanyPostCode(), "companyPostCode", reqId);
+//                check(map, map_errors, position_res, uploads, back_data.getPosition(), "position", reqId);
+//                check(map, map_errors, companyAddress_res, uploads, back_data.getCompanyAddress(), "companyAddress", reqId);
+//                check(map, map_errors, income_res, uploads, back_data.getIncome(), "income", reqId);
+//                check(map, map_errors, incomeYear_res, uploads, back_data.getIncomeYear(), "incomeYear", reqId);
+//                check(map, map_errors, joinTime_res, uploads, back_data.getJoinTime(), "joinTime", reqId);
+//                check(map, map_errors, industryType_res, uploads, back_data.getIndustryType(), "industryType", reqId);
+//                check(map, map_errors, businessType_res, uploads, back_data.getBusinessType(), "businessType", reqId);
+//                check(map, map_errors, loanType_res, uploads, back_data.getLoanType(), "loanType", reqId);
+//                check(map, map_errors, mateName_res, uploads, back_data.getMateName(), "mateName", reqId);
+//                check(map, map_errors, mateMobile_res, uploads, back_data.getMateMobile(), "mateMobile", reqId);
+//                check(map, map_errors, contactName_res, uploads, back_data.getContactName(), "contactName", reqId);
+//                check(map, map_errors, relationship_res, uploads, back_data.getRelationship(), "relationship", reqId);
+//                check(map, map_errors, contactMobile_res, uploads, back_data.getContactMobile(), "contactMobile", reqId);
+//                check(map, map_errors, contactPhone_res, uploads, back_data.getContactPhone(), "contactPhone", reqId);
+//                check(map, map_errors, cardId_res, uploads, back_data.getCardId(), "cardId", reqId);
+//
+//
+//                map.put("单条正确率", (ONE_ACCURACY / 34));
+//                if ((ONE_ACCURACY / 34) == 100) {
+//                    ACCURACY100++;
+//                }
+//                ACCURACY += (ONE_ACCURACY / 34);
+//                map_all.put(reqId, map);
+//                //初始化单条正确率值
+//                ONE_ACCURACY = 0;
+//
+//            }
+//
+//            Map<String, Object> result = new HashMap<>();
+//            result.put("类型14查询时间", formatter.format(new Date()));
+//            result.put("总记录数", contractFourteenBacks.size());
+//            result.put("单条正确率100有", ACCURACY100);
+//            result.put("正确率低于100字段", ERROR);
+//            result.put("类型14总正确率", (ACCURACY / contractFourteenBacks.size()));
+//            map_all.put("map_errors", map_errors);
+//            map_all.put("result", result);
+//
+//            String mapAllJson = JSONObject.toJSONString(map_all);
+//            Map<String, Object> errorAndResult = new LinkedHashMap<>();
+//            errorAndResult.put("map_errors", map_errors);
+//            errorAndResult.put("result", result);
+//            String error_resultJson = JSONObject.toJSONString(errorAndResult);
+//
+//            AccuracyResult accuracyResult = new AccuracyResult();
+//            accuracyResult.setType("14");
+//            accuracyResult.setSelectTime(formatter.format(new Date()));
+//            accuracyResult.setResultAll(mapAllJson);
+//            accuracyResult.setResultError(error_resultJson);
+//            accuracyResult.setAccuracy((ACCURACY / contractFourteenBacks.size()) + "%");
+//            accuracyResult.setCount(String.valueOf(contractFourteenBacks.size()));
+//            accuracyResult.setRemarks(remarks_type);
+//            accuracyResultMapper.insert(accuracyResult);
+//        }else {
+//            AccuracyResult accuracyResult = new AccuracyResult();
+//            accuracyResult.setType("14");
+//            accuracyResult.setSelectTime(formatter.format(new Date()));
+//            accuracyResult.setAccuracy("0");
+//            accuracyResult.setCount("0");
+//            accuracyResult.setDataTime(remarks_data);
+//            accuracyResult.setRemarks("无数据");
+//            accuracyResultMapper.insert(accuracyResult);
+//        }
+//        return map_all;
+//    }
+
+    public static void main(String[] args) {
+        ContractFourteenBack contractFourteenBack = new ContractFourteenBack();
+        contractFourteenBack.setCardId("1");
+        contractFourteenBack.setCompanyName("asf");
+
+
+        List<Field> allFields = new ArrayList<>(100);
+
+
+        Class<ContractFourteenBack> contractFourteenBackClass = ContractFourteenBack.class;
+        Field[] fields = contractFourteenBackClass.getDeclaredFields();
+        Method[] methods = contractFourteenBackClass.getMethods();
+        allFields.addAll(Arrays.asList(fields));
+
+        allFields.stream().forEach(field -> {
+
+            // 设置字段可访问, 否则无法访问private修饰的变量值
+            field.setAccessible(true);
+            try {
+                // 获取字段名称
+                String fieldName = field.getName();
+
+                // 获取指定对象的当前字段的值
+                Object fieldVal = field.get(contractFourteenBack);
+                System.out.println(fieldName+"="+fieldVal);
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
+            }
+        });
+
+    }
+
     @Override
     public Map selectType14(String time, String remarks_type) throws Exception {
         remarks_data = time;
@@ -78,162 +353,60 @@ public class ContractFourteenBackServiceImpl implements ContractFourteenBackServ
                 // 中间结果值
                 String remarks = twoBack.getRemarks();
                 String data = JSONObject.parseObject(remarks).getString("data");
-                ContractTwoBack back_data = JSONObject.parseObject(data, ContractTwoBack.class);
+//                ContractFourteenBack back_data = JSONObject.parseObject(data, ContractFourteenBack.class);
+                NewContractFourteenBack newContractFourteenBack = JSONObject.parseObject(data, NewContractFourteenBack.class);
+
                 // 最终结果值
                 String operator = twoBack.getOperator();
                 String back_res = JSONObject.parseObject(operator).getString("res");
+//                NewContractFourteenBack res = JSONObject.parseObject(back_res, NewContractFourteenBack.class);
+                newContractFourteenBack = JSONObject.parseObject(back_res, NewContractFourteenBack.class);
                 // req_id
                 String reqId = JSONObject.parseObject(operator).getString("reqId");
-                // 姓名
-                String name = JSONObject.parseObject(back_res).getString("name");
-                JsonResult name_res = JSONObject.parseObject(name, JsonResult.class);
-                // 身份证号
-                String idCode = JSONObject.parseObject(back_res).getString("idCode");
-                JsonResult idCode_res = JSONObject.parseObject(idCode, JsonResult.class);
-                // 性别
-                String sex = JSONObject.parseObject(back_res).getString("sex");
-                JsonResult sex_res = JSONObject.parseObject(sex, JsonResult.class);
-                // 手机号
-                String mobile = JSONObject.parseObject(back_res).getString("mobile");
-                JsonResult mobile_res = JSONObject.parseObject(mobile, JsonResult.class);
-                // 邮箱
-                String email = JSONObject.parseObject(back_res).getString("email");
-                JsonResult email_res = JSONObject.parseObject(email, JsonResult.class);
-                // 婚姻状况
-                String maritalStaus = JSONObject.parseObject(back_res).getString("maritalStaus");
-                JsonResult maritalStaus_res = JSONObject.parseObject(maritalStaus, JsonResult.class);
-                // 教育程度
-                String education = JSONObject.parseObject(back_res).getString("education");
-                JsonResult education_res = JSONObject.parseObject(education, JsonResult.class);
-//                // 母亲姓氏
-//                String momFirstName = JSONObject.parseObject(back_res).getString("momFirstName");
-//                JsonResult momFirstName_res = JSONObject.parseObject(momFirstName, JsonResult.class);
-                // 申请贷款金额
-                String applyForAmount = JSONObject.parseObject(back_res).getString("applyForAmount");
-                JsonResult applyForAmount_res = JSONObject.parseObject(applyForAmount, JsonResult.class);
-                // 还款方式
-                String repayment = JSONObject.parseObject(back_res).getString("repayment");
-                JsonResult repayment_res = JSONObject.parseObject(repayment, JsonResult.class);
-                // 期数
-                String period = JSONObject.parseObject(back_res).getString("period");
-                JsonResult period_res = JSONObject.parseObject(period, JsonResult.class);
-                // 住宅地址
-                String homeAddress = JSONObject.parseObject(back_res).getString("homeAddress");
-                JsonResult homeAddress_res = JSONObject.parseObject(homeAddress, JsonResult.class);
-                // 住宅邮编
-                String homePostCode = JSONObject.parseObject(back_res).getString("homePostCode");
-                JsonResult homePostCode_res = JSONObject.parseObject(homePostCode, JsonResult.class);
-                // 住宅电话
-                String homePhone = JSONObject.parseObject(back_res).getString("homePhone");
-                JsonResult homePhone_res = JSONObject.parseObject(homePhone, JsonResult.class);
-                // 住宅性质
-                String homeProperty = JSONObject.parseObject(back_res).getString("homeProperty");
-                JsonResult homeProperty_res = JSONObject.parseObject(homeProperty, JsonResult.class);
-                // 单位名称
-                String companyName = JSONObject.parseObject(back_res).getString("companyName");
-                JsonResult companyName_res = JSONObject.parseObject(companyName, JsonResult.class);
-                // 受雇类型
-                String employedType = JSONObject.parseObject(back_res).getString("employedType");
-                JsonResult employedType_res = JSONObject.parseObject(employedType, JsonResult.class);
-                // 部门
-                String dept = JSONObject.parseObject(back_res).getString("dept");
-                JsonResult dept_res = JSONObject.parseObject(dept, JsonResult.class);
-                // 单位电话
-                String companyPhone = JSONObject.parseObject(back_res).getString("companyPhone");
-                JsonResult companyPhone_res = JSONObject.parseObject(companyPhone, JsonResult.class);
-                // 单位邮编
-                String companyPostCode = JSONObject.parseObject(back_res).getString("companyPostCode");
-                JsonResult companyPostCode_res = JSONObject.parseObject(companyPostCode, JsonResult.class);
-                // 职务
-                String position = JSONObject.parseObject(back_res).getString("position");
-                JsonResult position_res = JSONObject.parseObject(position, JsonResult.class);
-                // 单位地址
-                String companyAddress = JSONObject.parseObject(back_res).getString("companyAddress");
-                JsonResult companyAddress_res = JSONObject.parseObject(companyAddress, JsonResult.class);
-                // 当前收入
-                String income = JSONObject.parseObject(back_res).getString("income");
-                JsonResult income_res = JSONObject.parseObject(income, JsonResult.class);
-                // 年营收如
-                String incomeYear = JSONObject.parseObject(back_res).getString("incomeYear");
-                JsonResult incomeYear_res = JSONObject.parseObject(incomeYear, JsonResult.class);
-                // 入职时间
-                String joinTime = JSONObject.parseObject(back_res).getString("joinTime");
-                JsonResult joinTime_res = JSONObject.parseObject(joinTime, JsonResult.class);
-                // 行业性质
-                String industryType = JSONObject.parseObject(back_res).getString("industryType");
-                JsonResult industryType_res = JSONObject.parseObject(industryType, JsonResult.class);
-                // 经济类型
-                String businessType = JSONObject.parseObject(back_res).getString("businessType");
-                JsonResult businessType_res = JSONObject.parseObject(businessType, JsonResult.class);
-                // 贷款用途
-                String loanType = JSONObject.parseObject(back_res).getString("loanType");
-                JsonResult loanType_res = JSONObject.parseObject(loanType, JsonResult.class);
-                // 配偶姓名
-                String mateName = JSONObject.parseObject(back_res).getString("mateName");
-                JsonResult mateName_res = JSONObject.parseObject(mateName, JsonResult.class);
-                // 配偶电话
-                String mateMobile = JSONObject.parseObject(back_res).getString("mateMobile");
-                JsonResult mateMobile_res = JSONObject.parseObject(mateMobile, JsonResult.class);
-                // 联系人姓名
-                String contactName = JSONObject.parseObject(back_res).getString("contactName");
-                JsonResult contactName_res = JSONObject.parseObject(contactName, JsonResult.class);
-                // 与本人的关系
-                String relationship = JSONObject.parseObject(back_res).getString("relationship");
-                JsonResult relationship_res = JSONObject.parseObject(relationship, JsonResult.class);
-                // 联系人手机号
-                String contactMobile = JSONObject.parseObject(back_res).getString("contactMobile");
-                JsonResult contactMobile_res = JSONObject.parseObject(contactMobile, JsonResult.class);
-                // 联系人固定电话
-                String contactPhone = JSONObject.parseObject(back_res).getString("contactPhone");
-                JsonResult contactPhone_res = JSONObject.parseObject(contactPhone, JsonResult.class);
-                // 本人借记卡号
-                String cardId = JSONObject.parseObject(back_res).getString("cardId");
-                JsonResult cardId_res = JSONObject.parseObject(cardId, JsonResult.class);
-
-                // 签名
-                String sign = JSONObject.parseObject(back_res).getString("sign");
-                JsonResult sign_res = JSONObject.parseObject(sign, JsonResult.class);
-                // 申请日期
-                String date = JSONObject.parseObject(back_res).getString("date");
-                JsonResult date_res = JSONObject.parseObject(date, JsonResult.class);
 
                 // 单条记录对比结果map
                 Map<String, Object> map = new HashMap<>();
-                check(map, map_errors, name_res, uploads, back_data.getName(), "name", reqId);
-                check(map, map_errors, idCode_res, uploads, back_data.getIdCode(), "idCode", reqId);
-                check(map, map_errors, sex_res, uploads, back_data.getSex(), "sex", reqId);
-                check(map, map_errors, mobile_res, uploads, back_data.getMobile(), "mobile", reqId);
-                check(map, map_errors, email_res, uploads, back_data.getEmail(), "email", reqId);
-                check(map, map_errors, maritalStaus_res, uploads, back_data.getMaritalStaus(), "maritalStaus", reqId);
-                check(map, map_errors, education_res, uploads, back_data.getEducation(), "education", reqId);
-//                check(map, map_errors, momFirstName_res, uploads, back_data.getMomFirstName(), "momFirstName", reqId);
-                check(map, map_errors, applyForAmount_res, uploads, back_data.getApplyForAmount(), "applyForAmount", reqId);
-                check(map, map_errors, repayment_res, uploads, back_data.getRepayment(), "repayment", reqId);
-                check(map, map_errors, period_res, uploads, back_data.getPeriod(), "period", reqId);
-                check(map, map_errors, homeAddress_res, uploads, back_data.getHomeAddress(), "homeAddress", reqId);
-                check(map, map_errors, homePostCode_res, uploads, back_data.getHomePostCode(), "homePostCode", reqId);
-                check(map, map_errors, homePhone_res, uploads, back_data.getHomePhone(), "homePhone", reqId);
-                check(map, map_errors, homeProperty_res, uploads, back_data.getHomeProperty(), "homeProperty", reqId);
-                check(map, map_errors, companyName_res, uploads, back_data.getCompanyName(), "companyName", reqId);
-                check(map, map_errors, employedType_res, uploads, back_data.getEmployedType(), "employedType", reqId);
-                check(map, map_errors, dept_res, uploads, back_data.getDept(), "dept", reqId);
-                check(map, map_errors, companyPhone_res, uploads, back_data.getCompanyPhone(), "companyPhone", reqId);
-                check(map, map_errors, companyPostCode_res, uploads, back_data.getCompanyPostCode(), "companyPostCode", reqId);
-                check(map, map_errors, position_res, uploads, back_data.getPosition(), "position", reqId);
-                check(map, map_errors, companyAddress_res, uploads, back_data.getCompanyAddress(), "companyAddress", reqId);
-                check(map, map_errors, income_res, uploads, back_data.getIncome(), "income", reqId);
-                check(map, map_errors, incomeYear_res, uploads, back_data.getIncomeYear(), "incomeYear", reqId);
-                check(map, map_errors, joinTime_res, uploads, back_data.getJoinTime(), "joinTime", reqId);
-                check(map, map_errors, industryType_res, uploads, back_data.getIndustryType(), "industryType", reqId);
-                check(map, map_errors, businessType_res, uploads, back_data.getBusinessType(), "businessType", reqId);
-                check(map, map_errors, loanType_res, uploads, back_data.getLoanType(), "loanType", reqId);
-                check(map, map_errors, mateName_res, uploads, back_data.getMateName(), "mateName", reqId);
-                check(map, map_errors, mateMobile_res, uploads, back_data.getMateMobile(), "mateMobile", reqId);
-                check(map, map_errors, contactName_res, uploads, back_data.getContactName(), "contactName", reqId);
-                check(map, map_errors, relationship_res, uploads, back_data.getRelationship(), "relationship", reqId);
-                check(map, map_errors, contactMobile_res, uploads, back_data.getContactMobile(), "contactMobile", reqId);
-                check(map, map_errors, contactPhone_res, uploads, back_data.getContactPhone(), "contactPhone", reqId);
-                check(map, map_errors, cardId_res, uploads, back_data.getCardId(), "cardId", reqId);
+
+                // 反射遍历实体类属性
+//                Field[] declaredFields = newContractFourteenBack.getClass().getDeclaredFields();
+//                for (int i = 0; i < declaredFields.length ; i++) {
+//                    check(map, map_errors, res.getName(), uploads, declaredFields[i].getName(), "name", reqId);
+//                }
+//                check(map, map_errors, res.getName(), uploads, back_data.getName(), "name", reqId);
+//                check(map, map_errors, res.getIdCode(), uploads, back_data.getIdCode(), "idCode", reqId);
+//                check(map, map_errors, res.getSex(), uploads, back_data.getSex(), "sex", reqId);
+//                check(map, map_errors, res.getMobile(), uploads, back_data.getMobile(), "mobile", reqId);
+//                check(map, map_errors, res.getEmail(), uploads, back_data.getEmail(), "email", reqId);
+//                check(map, map_errors, res.getMaritalStaus(), uploads, back_data.getMaritalStaus(), "maritalStaus", reqId);
+//                check(map, map_errors, res.getEducation(), uploads, back_data.getEducation(), "education", reqId);
+////                check(map, map_errors, momFirstName_res, uploads, back_data.getMomFirstName(), "momFirstName", reqId);
+//                check(map, map_errors, res.getApplyForAmount(), uploads, back_data.getApplyForAmount(), "applyForAmount", reqId);
+//                check(map, map_errors, res.getRepayment(), uploads, back_data.getRepayment(), "repayment", reqId);
+//                check(map, map_errors, res.getPeriod(), uploads, back_data.getPeriod(), "period", reqId);
+//                check(map, map_errors, res.getHomeAddress(), uploads, back_data.getHomeAddress(), "homeAddress", reqId);
+//                check(map, map_errors, res.getHomePostCode(), uploads, back_data.getHomePostCode(), "homePostCode", reqId);
+//                check(map, map_errors, res.getHomePhone(), uploads, back_data.getHomePhone(), "homePhone", reqId);
+//                check(map, map_errors, res.getHomeProperty(), uploads, back_data.getHomeProperty(), "homeProperty", reqId);
+//                check(map, map_errors, res.getCompanyName(), uploads, back_data.getCompanyName(), "companyName", reqId);
+//                check(map, map_errors, res.getEmployedType(), uploads, back_data.getEmployedType(), "employedType", reqId);
+//                check(map, map_errors, res.getDept(), uploads, back_data.getDept(), "dept", reqId);
+//                check(map, map_errors, res.getCompanyPhone(), uploads, back_data.getCompanyPhone(), "companyPhone", reqId);
+//                check(map, map_errors, res.getCompanyPostCode(), uploads, back_data.getCompanyPostCode(), "companyPostCode", reqId);
+//                check(map, map_errors, res.getPosition(), uploads, back_data.getPosition(), "position", reqId);
+//                check(map, map_errors, res.getCompanyAddress(), uploads, back_data.getCompanyAddress(), "companyAddress", reqId);
+//                check(map, map_errors, res.getIncome(), uploads, back_data.getIncome(), "income", reqId);
+//                check(map, map_errors, res.getIncomeYear(), uploads, back_data.getIncomeYear(), "incomeYear", reqId);
+//                check(map, map_errors, res.getJoinTime(), uploads, back_data.getJoinTime(), "joinTime", reqId);
+//                check(map, map_errors, res.getIndustryType(), uploads, back_data.getIndustryType(), "industryType", reqId);
+//                check(map, map_errors, res.getBusinessType(), uploads, back_data.getBusinessType(), "businessType", reqId);
+//                check(map, map_errors, res.getLoanType(), uploads, back_data.getLoanType(), "loanType", reqId);
+//                check(map, map_errors, res.getMateName(), uploads, back_data.getMateName(), "mateName", reqId);
+//                check(map, map_errors, res.getMateMobile(), uploads, back_data.getMateMobile(), "mateMobile", reqId);
+//                check(map, map_errors, res.getContactName(), uploads, back_data.getContactName(), "contactName", reqId);
+//                check(map, map_errors, res.getRelationship(), uploads, back_data.getRelationship(), "relationship", reqId);
+//                check(map, map_errors, res.getContactMobile(), uploads, back_data.getContactMobile(), "contactMobile", reqId);
+//                check(map, map_errors, res.getContactPhone(), uploads, back_data.getContactPhone(), "contactPhone", reqId);
+//                check(map, map_errors, res.getCardId(), uploads, back_data.getCardId(), "cardId", reqId);
 
 
                 map.put("单条正确率", (ONE_ACCURACY / 34));