Search in sources :

Example 1 with TestBean

use of com.mtm.mrecord.mvp.model.entity.TestBean in project Mvp-Rxjava-Retrofit-dagger2 by pengMaster.

the class LawDocumentDetailAct method setYjsView.

/**
 * 意见书
 *
 * @param tag
 */
private void setYjsView(String tag) {
    LawDocumentGsonBean.SuperviseViewBean sitenotesBean = new Gson().fromJson(tag, LawDocumentGsonBean.SuperviseViewBean.class);
    if (null == sitenotesBean) {
        return;
    }
    List<TestBean> list = new ArrayList<>();
    list.add(new TestBean("当事人:", StringUtils.isNoBlank(sitenotesBean.getVcompName())));
    list.add(new TestBean("地址:", StringUtils.isNoBlank(sitenotesBean.getVsuperviseAddr())));
    list.add(new TestBean("联系电话:", StringUtils.isNoBlank(sitenotesBean.getNphone() + "")));
    list.add(new TestBean("监督意见:", StringUtils.isNoBlank(sitenotesBean.getVsuperviseView())));
    list.add(new TestBean("当事人签收:", StringUtils.isNoBlank(sitenotesBean.getVsupervised() + "")));
    list.add(new TestBean("签名时间:", StringUtils.isNoBlank(sitenotesBean.getVsupervisedDate() + "")));
    list.add(new TestBean("卫生计生行政机关名称:", StringUtils.isNoBlank(sitenotesBean.getVsuperviseOrgName())));
    list.add(new TestBean("意见时间:", StringUtils.isNoBlank(sitenotesBean.getVsupervisorDate() + "")));
    Adapter adapter = new Adapter(lvDetailContent, list, "detail");
    lvDetailContent.setAdapter(adapter);
}
Also used : TestBean(com.mtm.mrecord.mvp.model.entity.TestBean) ArrayList(java.util.ArrayList) LawDocumentGsonBean(com.mtm.mrecord.mvp.model.entity.LawDocumentGsonBean) Gson(com.google.gson.Gson) Adapter(com.mtm.mrecord.mvp.ui.adapter.Adapter)

Example 2 with TestBean

use of com.mtm.mrecord.mvp.model.entity.TestBean in project Mvp-Rxjava-Retrofit-dagger2 by pengMaster.

the class LawDocumentDetailAct method setXcblView.

/**
 * 现场笔录
 *
 * @param tag
 */
private void setXcblView(String tag) {
    LawDocumentGsonBean.SitenotesBean sitenotesBean = new Gson().fromJson(tag, LawDocumentGsonBean.SitenotesBean.class);
    if (null == sitenotesBean) {
        return;
    }
    List<TestBean> list = new ArrayList<>();
    list.add(new TestBean("当事人:", StringUtils.isNoBlank(sitenotesBean.getNcompName())));
    list.add(new TestBean("检查机关:", StringUtils.isNoBlank(sitenotesBean.getNsuperviseOrgName() + "")));
    list.add(new TestBean("检查时间:", StringUtils.isNoBlank(sitenotesBean.getNcreatetime())));
    list.add(new TestBean("检查地点:", StringUtils.isNoBlank(sitenotesBean.getNsuperviseAddr())));
    list.add(new TestBean("卫生监督员示证检查:", StringUtils.isNoBlank(sitenotesBean.getNsupervisorCard1() + "")));
    list.add(new TestBean("执法证件号码:", StringUtils.isNoBlank(sitenotesBean.getNsupervisorCard2() + "")));
    list.add(new TestBean("检查记录:", StringUtils.isNoBlank(sitenotesBean.getNsuperviseRecord())));
    list.add(new TestBean("当事人签名:", StringUtils.isNoBlank(sitenotesBean.getNsupervised() + "")));
    list.add(new TestBean("签名日期:", StringUtils.isNoBlank(sitenotesBean.getNsupervisedDate() + "")));
    list.add(new TestBean("卫生监督员签名:", StringUtils.isNoBlank(sitenotesBean.getNsupervisor() + sitenotesBean.getNsupervisor2())));
    list.add(new TestBean("签名日期:", StringUtils.isNoBlank(sitenotesBean.getNsupervisorDate())));
    Adapter adapter = new Adapter(lvDetailContent, list, "detail");
    lvDetailContent.setAdapter(adapter);
}
Also used : TestBean(com.mtm.mrecord.mvp.model.entity.TestBean) ArrayList(java.util.ArrayList) LawDocumentGsonBean(com.mtm.mrecord.mvp.model.entity.LawDocumentGsonBean) Gson(com.google.gson.Gson) Adapter(com.mtm.mrecord.mvp.ui.adapter.Adapter)

Example 3 with TestBean

use of com.mtm.mrecord.mvp.model.entity.TestBean in project Mvp-Rxjava-Retrofit-dagger2 by pengMaster.

the class SuperviseBaseInfoFragment method getViewMap.

/**
 * 布局数据塞值
 *
 * @param superviseContentGsonBean
 */
private List<TestBean> getViewMap(SuperviseContentGsonBean superviseContentGsonBean) {
    SuperviseContentGsonBean.SuperviseFormBean superviseForm = superviseContentGsonBean.getSuperviseForm();
    List<SuperviseContentGsonBean.SpecListBean> SpecialtyFormList = superviseContentGsonBean.getSpecList();
    List<DictSupervisionCont> supervisionContList = superviseContentGsonBean.getSupervisionContList();
    List<SupervisionCont> ansList = superviseContentGsonBean.getAnsList();
    List<RadiationEqui> radiList = superviseContentGsonBean.getRadiList();
    String s1 = superviseForm.getSupervSpecCodeSub();
    String[] s2 = s1.split(",");
    String speCode2 = "";
    int lent = 0;
    int s2lent = 0;
    if ("01".equals(superviseForm.getSpecCode())) {
        s2lent = 1;
    } else {
        s2lent = s2.length;
    }
    result = superviseForm.getResult();
    for (int i = 0; i < s2lent; i++) {
        lent = lent + 1;
        if ("04".equals(superviseForm.getSpecCode())) {
            if ("1".equals(superviseForm.getIsWzdw())) {
                subSpeName1 = "放射诊疗";
                speCode2 = "040101";
            } else {
                for (int k = 0; k < radiList.size(); k++) {
                    RadiationEqui ss = radiList.get(k);
                    String speCode1 = ss.getTypeCode();
                    if (speCode1.equals(s2[i].trim())) {
                        subSpeName1 = ss.getTypeName();
                        speCode2 = ss.getTypeCode();
                        break;
                    }
                }
            }
        } else if (superviseForm.getSpecCode().equals("01")) {
            for (int j = 0; j < SpecialtyFormList.size(); j++) {
                SuperviseContentGsonBean.SpecListBean specialtyForm = SpecialtyFormList.get(j);
                String speCode1 = specialtyForm.getSpeCode();
                for (int k2 = 0; k2 < s2.length; k2++) {
                    if (speCode1.equals(s2[k2].trim())) {
                        subSpeName1 = subSpeName1 + specialtyForm.getSpeName();
                        speCode2 = specialtyForm.getSpeCode();
                    }
                }
            }
            if (speCode2.substring(0, 2) == "01") {
                speCode2 = "01";
            }
        } else {
            for (int j = 0; j < SpecialtyFormList.size(); j++) {
                SuperviseContentGsonBean.SpecListBean specialtyForm = SpecialtyFormList.get(j);
                String speCode1 = specialtyForm.getSpeCode();
                if (speCode1.equals(s2[i].trim())) {
                    subSpeName1 = specialtyForm.getSpeName() + "   ";
                    speCode2 = specialtyForm.getSpeCode();
                    break;
                }
            }
        }
        if (supervisionContList != null && supervisionContList.size() > 0 && ansList != null && ansList.size() > 0) {
            // "监督专业名称"  subSpeName
            int i1 = 0;
            String an = "";
            String an1 = "";
            String an2 = "";
            String an3 = "";
            // 过去监督内容
            String questionValue = null;
            String contText;
            List<TestBean> mapResult = new ArrayList<>();
            for (int a = 0; a < supervisionContList.size(); a++) {
                DictSupervisionCont supervisionCont = supervisionContList.get(a);
                if (superviseForm.getSpecCode().equals("01")) {
                    if (speCode2.substring(0, 2).equals("01") && supervisionCont.getContNo().substring(0, 2).equals("01")) {
                        // 公共场所---循环选项
                        if (lent == 1) {
                            contText = supervisionCont.getContText();
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId())) {
                                    an = qa.getContResult().toString();
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                    if ((speCode2.substring(0, 2).equals("07") && supervisionCont.getContNo().substring(0, 2).equals("07"))) {
                        if (((supervisionCont.getContNo().substring(0, 4)).equals("0701"))) {
                            if ((supervisionCont.getContNo().substring(0, 6)).equals("070103")) {
                                contText = supervisionCont.getContText();
                                for (int ds = 0; ds < ansList.size(); ds++) {
                                    // 循环答案选项
                                    SupervisionCont qa = ansList.get(ds);
                                    if ((supervisionCont.getId()).equals(qa.getContId()) && qa.getSupervSpecCode().indexOf(speCode2) != -1) {
                                        an = qa.getContResult().toString();
                                        an1 = String.valueOf(qa.getVal1());
                                        an2 = String.valueOf(qa.getVal2());
                                        an3 = String.valueOf(qa.getVal3());
                                        break;
                                    }
                                }
                                String isBig = supervisionCont.getIsBig() + "";
                                String contNo = supervisionCont.getContNo();
                                questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                                i1++;
                                mapResult.add(new TestBean(isBig, contText + "", questionValue));
                            }
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("02")) {
                    if (((speCode2.substring(0, 2).equals("02") && supervisionCont.getContNo().substring(0, 2).equals("02")))) {
                        if (speCode2.substring(0, 4).equals("0201") || speCode2.substring(0, 4).equals("0202")) {
                            if (((supervisionCont.getContNo().substring(0, 4)).equals("0201"))) {
                                if (superviseForm.getCompType().substring(0, 4).equals("0202")) {
                                    // 020104   020106针对集中式供水
                                    if (supervisionCont.getContNo().equals("020104") || supervisionCont.getContNo().equals("020106")) {
                                        continue;
                                    }
                                } else {
                                    if (supervisionCont.getContNo().equals("020108") || supervisionCont.getContNo().equals("020109")) {
                                        continue;
                                    }
                                }
                                contText = supervisionCont.getContText();
                                for (int ds = 0; ds < ansList.size(); ds++) {
                                    // 循环答案选项
                                    SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                    if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                        an = qa.getContResult().toString();
                                        break;
                                    }
                                }
                                String isBig = supervisionCont.getIsBig() + "";
                                String contNo = supervisionCont.getContNo();
                                questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                                i1++;
                                mapResult.add(new TestBean(isBig, contText + "", questionValue));
                            }
                        }
                    }
                    if (speCode2.substring(0, 4).equals("0203") || speCode2.substring(0, 4).equals("0204")) {
                        if (((supervisionCont.getContNo().substring(0, 4)).equals("0202")) || ((supervisionCont.getContNo().substring(0, 4)).equals("0203"))) {
                            if (superviseForm.getCompType().substring(0, 4).equals("0203")) {
                                if (!(supervisionCont.getContNo().substring(0, 4)).equals("0202")) {
                                    continue;
                                }
                            } else {
                                if (!(supervisionCont.getContNo().substring(0, 4)).equals("0203")) {
                                    continue;
                                }
                            }
                            contText = supervisionCont.getContText();
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                    if (((speCode2.substring(0, 2).equals("07") && supervisionCont.getContNo().substring(0, 2).equals("07")))) {
                        if (((supervisionCont.getContNo().substring(0, 4)).equals("0701"))) {
                            if ((supervisionCont.getContNo().substring(0, 6)).equals("070103")) {
                                contText = supervisionCont.getContText();
                                for (int ds = 0; ds < ansList.size(); ds++) {
                                    // 循环答案选项
                                    SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                    if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                        an = qa.getContResult().toString();
                                        an1 = String.valueOf(qa.getVal1());
                                        an2 = String.valueOf(qa.getVal2());
                                        an3 = String.valueOf(qa.getVal3());
                                        break;
                                    }
                                }
                                String isBig = supervisionCont.getIsBig() + "";
                                String contNo = supervisionCont.getContNo();
                                questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                                i1++;
                                mapResult.add(new TestBean(isBig, contText + "", questionValue));
                            }
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("03")) {
                    // /////职业卫生
                    if (speCode2.substring(0, 2).equals("03")) {
                        if ((supervisionCont.getContNo().substring(0, 2)).equals("03")) {
                            if (superviseForm.getSupervSpecCodeSub().substring(0, 4).equals("0302")) {
                                if (supervisionCont.getContNo().equals("0301") || supervisionCont.getContNo().equals("0302")) {
                                    continue;
                                }
                            } else if (superviseForm.getSupervSpecCodeSub().substring(0, 4).equals("0399")) {
                                if (supervisionCont.getContNo().equals("0303") || supervisionCont.getContNo().equals("0304") || supervisionCont.getContNo().equals("0305") || supervisionCont.getContNo().equals("0306") || supervisionCont.getContNo().equals("0307")) {
                                    continue;
                                }
                            }
                            contText = supervisionCont.getContText();
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("04")) {
                    // /////放射卫生
                    if (speCode2.substring(0, 2).equals("04")) {
                        if ((supervisionCont.getContNo().substring(0, 2)).equals("04")) {
                            contText = supervisionCont.getContText();
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("05")) {
                    // /////学校卫生
                    if (speCode2.substring(0, 2).equals("05")) {
                        if ((supervisionCont.getContNo().substring(0, 2)).equals("05")) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                    if (((speCode2.substring(0, 2).equals("07") && supervisionCont.getContNo().substring(0, 2).equals("07")))) {
                        if (((supervisionCont.getContNo().substring(0, 4)).equals("0701"))) {
                            if ((supervisionCont.getContNo().substring(0, 6)).equals("070103")) {
                                contText = supervisionCont.getContText();
                                for (int ds = 0; ds < ansList.size(); ds++) {
                                    // 循环答案选项
                                    SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                    if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                        an = qa.getContResult().toString();
                                        an1 = String.valueOf(qa.getVal1());
                                        an2 = String.valueOf(qa.getVal2());
                                        an3 = String.valueOf(qa.getVal3());
                                        break;
                                    }
                                }
                                String isBig = supervisionCont.getIsBig() + "";
                                String contNo = supervisionCont.getContNo();
                                questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                                i1++;
                                mapResult.add(new TestBean(isBig, contText + "", questionValue));
                            }
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("06")) {
                    if (speCode2.substring(0, 2).equals("06")) {
                        if ((supervisionCont.getContNo().substring(0, 2)).equals("06")) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                } else if (speCode2.substring(0, 2).equals("08")) {
                    if ((supervisionCont.getContNo().substring(0, 2)).equals("08") && (!supervisionCont.getContNo().equals("0808") && !supervisionCont.getContNo().equals("0809") && !supervisionCont.getContNo().equals("0810") && !supervisionCont.getContNo().equals("0811") && !supervisionCont.getContNo().equals("0812") && !supervisionCont.getContNo().equals("0814") && !supervisionCont.getContNo().equals("0815") && !supervisionCont.getContNo().equals("0816") && !supervisionCont.getContNo().equals("0817") && !supervisionCont.getContNo().equals("0818"))) {
                        // /医疗卫生----血液安全
                        contText = supervisionCont.getContText();
                        String daan = "";
                        for (int ds = 0; ds < ansList.size(); ds++) {
                            // 循环答案选项
                            SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                            if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                an = qa.getContResult().toString();
                                if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                    daan = qa.getVal1().toString();
                                }
                                break;
                            }
                        }
                        String isBig = supervisionCont.getIsBig() + "";
                        String contNo = supervisionCont.getContNo();
                        questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                        i1++;
                        mapResult.add(new TestBean(isBig, contText + "", questionValue));
                    }
                } else if (superviseForm.getSpecCode().equals("0703") || superviseForm.getSpecCode().equals("0704") || superviseForm.getSpecCode().equals("0701")) {
                    if (superviseForm.getCompType().substring(0, 4).equals("0701")) {
                        if (superviseForm.getCompType().substring(0, 6).equals("070101")) {
                            // speCode2.substring(0,6).equals("070101")
                            if ((supervisionCont.getContNo().substring(0, 4)).equals("0701")) {
                                if ((supervisionCont.getContNo().substring(0, 6)).equals("070101")) {
                                    if (supervisionCont.getContNo().equals("07010110")) {
                                    }
                                    if (supervisionCont.getContNo().equals("07010111")) {
                                    }
                                    contText = supervisionCont.getContText();
                                    String daan = "";
                                    for (int ds = 0; ds < ansList.size(); ds++) {
                                        // 循环答案选项
                                        SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                        if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                            an = qa.getContResult().toString();
                                            an1 = String.valueOf(qa.getVal1());
                                            an2 = String.valueOf(qa.getVal2());
                                            an3 = String.valueOf(qa.getVal3());
                                            if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                                daan = qa.getVal1().toString();
                                            }
                                            break;
                                        }
                                    }
                                    String isBig = supervisionCont.getIsBig() + "";
                                    String contNo = supervisionCont.getContNo();
                                    questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "1");
                                    i1++;
                                    mapResult.add(new TestBean(isBig, contText + "", questionValue));
                                }
                            }
                        }
                    } else if (superviseForm.getCompType().length() >= 6 && superviseForm.getCompType().substring(0, 5).equals("070102")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0701")) {
                            if ((supervisionCont.getContNo().substring(0, 6)).equals("070102")) {
                                if (supervisionCont.getContNo().equals("07010202")) {
                                }
                                if (supervisionCont.getContNo().equals("07010203")) {
                                }
                                contText = supervisionCont.getContText();
                                String daan = "";
                                for (int ds = 0; ds < ansList.size(); ds++) {
                                    // 循环答案选项
                                    SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                    if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                        an = qa.getContResult().toString();
                                        an1 = String.valueOf(qa.getVal1());
                                        an2 = String.valueOf(qa.getVal2());
                                        an3 = String.valueOf(qa.getVal3());
                                        if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                            daan = qa.getVal1().toString();
                                        }
                                        break;
                                    }
                                }
                                String isBig = supervisionCont.getIsBig() + "";
                                String contNo = supervisionCont.getContNo();
                                questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "1");
                                i1++;
                                mapResult.add(new TestBean(isBig, contText + "", questionValue));
                            }
                        }
                    } else if (superviseForm.getCompType().length() >= 6 && superviseForm.getCompType().substring(0, 5).equals("070103")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0701")) {
                            if ((supervisionCont.getContNo().substring(0, 6)).equals("070103")) {
                                contText = supervisionCont.getContText();
                                String daan = "";
                                for (int ds = 0; ds < ansList.size(); ds++) {
                                    // 循环答案选项
                                    SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                    if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                        an = qa.getContResult().toString();
                                        an1 = String.valueOf(qa.getVal1());
                                        an2 = String.valueOf(qa.getVal2());
                                        an3 = String.valueOf(qa.getVal3());
                                        if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                            daan = qa.getVal1().toString();
                                        }
                                        break;
                                    }
                                }
                                String isBig = supervisionCont.getIsBig() + "";
                                String contNo = supervisionCont.getContNo();
                                questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                                i1++;
                                mapResult.add(new TestBean(isBig, contText + "", questionValue));
                            }
                        }
                    } else if (superviseForm.getCompType().substring(0, 4).equals("0704")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0704")) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    } else if (superviseForm.getCompType().equals("070301")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0703") && (!supervisionCont.getContNo().equals("07030101")) && (!supervisionCont.getContNo().equals("07030102")) && (!supervisionCont.getContNo().equals("07030104")) && (!supervisionCont.getContNo().equals("07030105")) && (!supervisionCont.getContNo().equals("07030301")) && (!supervisionCont.getContNo().equals("07030302"))) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    } else if (superviseForm.getCompType().equals("070399")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0703") && (!supervisionCont.getContNo().substring(0, 6).equals("070301")) && (!supervisionCont.getContNo().substring(0, 6).equals("070303")) && (!supervisionCont.getContNo().equals("07030405")) && (!(supervisionCont.getContNo().substring(0, 6).equals("070305")))) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    } else if (superviseForm.getCompType().substring(0, 2).equals("06")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0703") && (!supervisionCont.getContNo().equals("07030305")) && (!supervisionCont.getContNo().equals("07030306"))) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    } else if (superviseForm.getCompType().substring(0, 2).equals("08")) {
                        if ((supervisionCont.getContNo().substring(0, 4)).equals("0703") && (!supervisionCont.getContNo().substring(0, 6).equals("070301")) && (!supervisionCont.getContNo().substring(0, 6).equals("070303"))) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("08")) {
                    if (speCode2.substring(0, 2).equals("08")) {
                        if ((supervisionCont.getContNo().substring(0, 2)).equals("08")) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                } else if (superviseForm.getSpecCode().equals("09")) {
                    if (speCode2.substring(0, 2).equals("09")) {
                        if ((supervisionCont.getContNo().substring(0, 2)).equals("09")) {
                            contText = supervisionCont.getContText();
                            String daan = "";
                            for (int ds = 0; ds < ansList.size(); ds++) {
                                // 循环答案选项
                                SupervisionCont qa = (SupervisionCont) ansList.get(ds);
                                if ((supervisionCont.getId()).equals(qa.getContId()) && speCode2.equals(qa.getSupervSpecCode())) {
                                    an = qa.getContResult().toString();
                                    if (qa.getVal1() != null && qa.getVal1().toString() != "") {
                                        daan = qa.getVal1().toString();
                                    }
                                    break;
                                }
                            }
                            String isBig = supervisionCont.getIsBig() + "";
                            String contNo = supervisionCont.getContNo();
                            questionValue = keyToValue(an.trim(), isBig, an1, an2, an3, contNo, "");
                            i1++;
                            mapResult.add(new TestBean(isBig, contText + "", questionValue));
                        }
                    }
                }
                String types = superviseForm.getChecktabletype() + "";
                String tab = superviseForm.getCheckTableId() + "";
                String sstr = "";
                if (types != null && tab != null) {
                    if (types.length() > 0 && tab.length() > 0) {
                        String[] typeNums = types.split(",");
                        String[] tabs = tab.split(",");
                        for (int i0 = 0; i0 < typeNums.length; i0++) {
                            if (speCode2.equals(typeNums[i0])) {
                                sstr = sstr + tabs[i0] + ",";
                            } else if (typeNums[i0].substring(0, 2).equals("01")) {
                                sstr = sstr + tabs[i0] + ",";
                            }
                        }
                    }
                }
                if (sstr.length() > 0) {
                    LogUtils.warnInfo(new Gson().toJson(sstr));
                }
            }
            String s = new Gson().toJson(mapResult);
            LogUtils.warnInfo(s);
            return mapResult;
        }
    }
    return null;
}
Also used : DictSupervisionCont(com.mtm.mrecord.mvp.model.entity.DictSupervisionCont) ArrayList(java.util.ArrayList) Gson(com.google.gson.Gson) SuperviseContentGsonBean(com.mtm.mrecord.mvp.model.entity.SuperviseContentGsonBean) DictSupervisionCont(com.mtm.mrecord.mvp.model.entity.DictSupervisionCont) SupervisionCont(com.mtm.mrecord.mvp.model.entity.SupervisionCont) TestBean(com.mtm.mrecord.mvp.model.entity.TestBean) RadiationEqui(com.mtm.mrecord.mvp.model.entity.RadiationEqui)

Example 4 with TestBean

use of com.mtm.mrecord.mvp.model.entity.TestBean in project Mvp-Rxjava-Retrofit-dagger2 by pengMaster.

the class LawDocumentDetailAct method setXwblView.

/**
 * 询问笔录
 *
 * @param tag
 */
private void setXwblView(String tag) {
    LawDocumentGsonBean.AskListBean sitenotesBean = new Gson().fromJson(tag, LawDocumentGsonBean.AskListBean.class);
    if (null == sitenotesBean) {
        return;
    }
    List<TestBean> list = new ArrayList<>();
    list.add(new TestBean("被询问人:", StringUtils.isNoBlank(sitenotesBean.getAskedPeople())));
    list.add(new TestBean("性别:", StringUtils.isNoBlank(AksSexValue(sitenotesBean.getAskedSex()))));
    list.add(new TestBean("年龄:", StringUtils.isNoBlank(sitenotesBean.getAskedAge() + "")));
    list.add(new TestBean("证件名称:", StringUtils.isNoBlank(sitenotesBean.getCardType() + "")));
    list.add(new TestBean("证件号:", StringUtils.isNoBlank(sitenotesBean.getIdCard() + "")));
    list.add(new TestBean("住址:", StringUtils.isNoBlank(sitenotesBean.getAskedAddress() + "")));
    list.add(new TestBean("询问机关:", StringUtils.isNoBlank(sitenotesBean.getAskAuthorities())));
    list.add(new TestBean("询问时间:", StringUtils.isNoBlank(sitenotesBean.getAskStarttime() + "至" + sitenotesBean.getAskEndtime())));
    list.add(new TestBean("询问地点:", StringUtils.isNoBlank(sitenotesBean.getInquiryPlace() + "")));
    list.add(new TestBean("询问人员示证询问:", StringUtils.isNoBlank(sitenotesBean.getSupervisorCard1() + "")));
    list.add(new TestBean("执法证件号码:", StringUtils.isNoBlank(sitenotesBean.getSupervisorCard2() + "")));
    list.add(new TestBean("询问内容:", StringUtils.isNoBlank(sitenotesBean.getAskContents() + "")));
    list.add(new TestBean("被询问人阅后签名:", StringUtils.isNoBlank(sitenotesBean.getAskedSign() + "")));
    list.add(new TestBean("签字时间:", StringUtils.isNoBlank(sitenotesBean.getAskedSigndate() + "")));
    list.add(new TestBean("卫生监督员签名:", StringUtils.isNoBlank(sitenotesBean.getSuperviser1() + " " + sitenotesBean.getSuperviser2())));
    list.add(new TestBean("签字时间:", StringUtils.isNoBlank(sitenotesBean.getSendDate() + "")));
    Adapter adapter = new Adapter(lvDetailContent, list, "detail");
    lvDetailContent.setAdapter(adapter);
}
Also used : TestBean(com.mtm.mrecord.mvp.model.entity.TestBean) ArrayList(java.util.ArrayList) LawDocumentGsonBean(com.mtm.mrecord.mvp.model.entity.LawDocumentGsonBean) Gson(com.google.gson.Gson) Adapter(com.mtm.mrecord.mvp.ui.adapter.Adapter)

Example 5 with TestBean

use of com.mtm.mrecord.mvp.model.entity.TestBean in project Mvp-Rxjava-Retrofit-dagger2 by pengMaster.

the class SuperviseBaseInfoFragment method initData.

@Override
public void initData(Bundle savedInstanceState) {
    String baseGsonBean = getActivity().getIntent().getStringExtra("baseGsonBean");
    View viewById = view.findViewById(R.id.ll_unit_info_title);
    TextView tvUnitName = (TextView) viewById.findViewById(R.id.tv_item_title);
    if (null != tvUnitName) {
        tvUnitName.setText("基本信息");
    }
    View viewBase = view.findViewById(R.id.ll_unit_base_title);
    TextView tvBaseName = (TextView) viewBase.findViewById(R.id.tv_item_title);
    if (null != tvBaseName) {
        tvBaseName.setText("监督内容");
    }
    View viewSpec = view.findViewById(R.id.ll_unit_spec_title);
    TextView tvSpecName = (TextView) viewSpec.findViewById(R.id.tv_item_title);
    if (null != tvSpecName) {
        tvSpecName.setText("监督专业类别");
    }
    View viewCheck = view.findViewById(R.id.ll_check_result);
    TextView tvCheck = (TextView) viewCheck.findViewById(R.id.tv_item_title);
    if (null != tvCheck) {
        tvCheck.setText("检查结果");
    }
    RecordBaseGsonBean recordBaseGsonBean = gson.fromJson(baseGsonBean, RecordBaseGsonBean.class);
    if (null == recordBaseGsonBean) {
        showMessage("基本信息解析出错");
        return;
    }
    // 设置单位基本信息显示
    setUnitBaseInfo(recordBaseGsonBean.getSuperviseForm());
    // 设置监督内容显示
    List<TestBean> viewMap = getViewMap(recordBaseGsonBean.getCategoryResult());
    setViewData(viewMap);
}
Also used : TestBean(com.mtm.mrecord.mvp.model.entity.TestBean) TextView(android.widget.TextView) RecordBaseGsonBean(com.mtm.mrecord.mvp.model.entity.RecordBaseGsonBean) BindView(butterknife.BindView) View(android.view.View) TextView(android.widget.TextView)

Aggregations

TestBean (com.mtm.mrecord.mvp.model.entity.TestBean)5 Gson (com.google.gson.Gson)4 ArrayList (java.util.ArrayList)4 LawDocumentGsonBean (com.mtm.mrecord.mvp.model.entity.LawDocumentGsonBean)3 Adapter (com.mtm.mrecord.mvp.ui.adapter.Adapter)3 View (android.view.View)1 TextView (android.widget.TextView)1 BindView (butterknife.BindView)1 DictSupervisionCont (com.mtm.mrecord.mvp.model.entity.DictSupervisionCont)1 RadiationEqui (com.mtm.mrecord.mvp.model.entity.RadiationEqui)1 RecordBaseGsonBean (com.mtm.mrecord.mvp.model.entity.RecordBaseGsonBean)1 SuperviseContentGsonBean (com.mtm.mrecord.mvp.model.entity.SuperviseContentGsonBean)1 SupervisionCont (com.mtm.mrecord.mvp.model.entity.SupervisionCont)1