package com.jeeplus.modules.sg.managementcenter.activiti.utils;

import com.google.common.collect.Maps;
import com.jeeplus.common.json.AjaxJson;
import com.jeeplus.common.utils.excel.ImportExcel;
import com.jeeplus.modules.sg.managementcenter.activiti.entity.Construction;
import com.jeeplus.modules.sg.managementcenter.activiti.entity.Disclose;
import com.jeeplus.modules.sg.managementcenter.activiti.entity.MyNeedList;
import org.apache.poi.ss.usermodel.Row;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MyImportUtils {
    public static Map<String, Object> errorTips(List<Construction> constructionList) {
        String tips = "";
        String fin = "";
        List<Construction> newConList = new ArrayList<>();
        boolean flag = false;
        for (Construction c : constructionList) {
            Disclose disclose = c.getDisclose();
            //是否已实施
            String hasImplemented = disclose.getHasImplemented();
            //现场情况描述
            String sceneDescription = disclose.getSceneDescription();
            //是否有实施必要性
            String isImplement = disclose.getIsImplement();
            //实施无必要描述
            String noImplementation = disclose.getNoImplementation();
            //图纸是否完整
            String whetherComplete = disclose.getWhetherComplete();
            //图纸完整性描述
            String drawingDescription = disclose.getDrawingDescription();
            //图纸是否规范
            String whetherStandard = disclose.getWhetherStandard();
            //图纸规范性描述
            String normativeDrawings = disclose.getNormativeDrawings();
            //是否存在典设图问题
            String whetherDrawing = disclose.getWhetherDrawing();
            //典设图问题描述
            String problemDescription = disclose.getProblemDescription();
            //是否存在施工通道
            String whetherChannel = disclose.getWhetherChannel();
            //施工通道情况描述
            String constructionDescription = disclose.getConstructionDescription();
            //土建是否需要调整
            String civilAdjusted = disclose.getCivilAdjusted();
            //土建方案变更内容描述
            String descriptionPlans = disclose.getDescriptionPlans();
            //土建工作量调整内容描述
            String descriptionAdjustment = disclose.getDescriptionAdjustment();
            //电气方案是否需要调整
            String electricalAdjusted = disclose.getElectricalAdjusted();
            //调整原因描述
            String adjustmentDescription = disclose.getAdjustmentDescription();
            //自动化是否需要变更
            String doesChange = disclose.getDoesChange();
            //自动化方案调整内容
            String automatedContent = disclose.getAutomatedContent();
            //自动化工作内容调整
            String automatedAdjustment = disclose.getAutomatedAdjustment();
            //其他方案是否需要调整
            String otherAdjusted = disclose.getOtherAdjusted();
            //其他方案调整原因描述
            String descriptionReasons = disclose.getDescriptionReasons();
            //是否存在难以解决的政处
            String difficultResolve = disclose.getDifficultResolve();
            //是否需要进行设计变更
            String designChanges = disclose.getDesignChanges();
            //是否需要进行项目关闭
            String needsClosed = disclose.getNeedsClosed();
            //政处问题描述
            String affairsDescription = disclose.getAffairsDescription();
            //是否需要规划报批（150米及以上土建）
            String planningRequired = disclose.getPlanningRequired();
            //是否涉及高铁、高速
            String highSpeed = disclose.getHighSpeed();
            //是否存在复杂民事政处
            String affairsOffice = disclose.getAffairsOffice();
            //图纸方案是否存在前置条件
            String preconditions = disclose.getPreconditions();
            //前置条件描述
            String preconditionDescription = disclose.getPreconditionDescription();
            //是否需要定制物资
            String customizedMaterials = disclose.getCustomizedMaterials();
            //是否能定制
            String customizedCan = disclose.getCustomizedCan();
            //定制原因描述
            String reasonDescription = disclose.getReasonDescription();
            //定制物资描述
            String materialDescription = disclose.getMaterialDescription();
            //拆旧物资是否与设计一致
            String demolitionMaterials = disclose.getDemolitionMaterials();
            //型号不一致描述
            //String modelDescription = disclose.getModelDescription();
            //数量不一致描述
            //String quantityDescription = disclose.getQuantityDescription();
            //图纸标注是否存在问题
            String drawingAnnotation = disclose.getDrawingAnnotation();
            //图纸标注问题描述
            String drawingProblem = disclose.getDrawingProblem();
            //是否存在停电问题
            String powerOutage = disclose.getPowerOutage();
            //停电问题问题描述
            String powerProblem = disclose.getPowerProblem();
            //是否邻近带电线路
            String nearLiveLine = disclose.getNearLiveLine();
            //是否下穿高压线路
            String highVoltageLine = disclose.getHighVoltageLine();
            //是否存在复杂管线
            String complexPipeline = disclose.getComplexPipeline();
            //是否涉及复杂停电
            String complicatedPower = disclose.getComplicatedPower();

            if (empty(hasImplemented)) {
                flag = true;
                tips += "是否已实施不能为空\t";
            } else {
                if (!"是".equals(hasImplemented) && !"否".equals(hasImplemented)) {
                    flag = true;
                    tips += "是否已实施填写错误\t";
                }
            }

            if (empty(isImplement)) {
                flag = true;
                tips += "是否有实施必要性不能为空\t";
            } else {
                if (!"是".equals(isImplement) && !"否".equals(isImplement)) {
                    flag = true;
                    tips += "是否有实施必要性填写错误\t";
                }
            }

            if (empty(whetherComplete)) {
                flag = true;
                tips += "图纸是否完整不能为空\t";
            } else {
                if (!"是".equals(whetherComplete) && !"否".equals(whetherComplete)) {
                    flag = true;
                    tips += "图纸是否完整填写错误\t";
                }
            }

            if (empty(whetherStandard)) {
                flag = true;
                tips += "图纸是否规范不能为空\t";
            } else {
                if (!"是".equals(whetherStandard) && !"否".equals(whetherStandard)) {
                    flag = true;
                    tips += "图纸是否规范填写错误\t";
                }
            }

            if (empty(whetherDrawing)) {
                flag = true;
                tips += "是否存在典设图问题不能为空\t";
            } else {
                if (!"是".equals(whetherDrawing) && !"否".equals(whetherDrawing)) {
                    flag = true;
                    tips += "是否存在典设图问题填写错误\t";
                }
            }

            if (empty(whetherChannel)) {
                flag = true;
                tips += "是否存在施工通道不能为空\t";
            } else {
                if (!"是".equals(whetherChannel) && !"否".equals(whetherChannel)) {
                    flag = true;
                    tips += "是否存在施工通道填写错误\t";
                }
            }

            if (empty(civilAdjusted)) {
                flag = true;
                tips += "土建是否需要调整不能为空\t";
            } else {
                if (!"是".equals(whetherChannel) && !"否".equals(whetherChannel)) {
                    flag = true;
                    tips += "土建是否需要调整填写错误\t";
                }
            }

            if (empty(electricalAdjusted)) {
                flag = true;
                tips += "电气方案是否需要调整不能为空\t";
            } else {
                if (!"是".equals(electricalAdjusted) && !"否".equals(electricalAdjusted)) {
                    flag = true;
                    tips += "电气方案是否需要调整填写错误\t";
                }
            }

            if (empty(doesChange)) {
                flag = true;
                tips += "自动化是否需要变更不能为空\t";
            } else {
                if (!"是".equals(doesChange) && !"否".equals(doesChange)) {
                    flag = true;
                    tips += "自动化是否需要变更填写错误\t";
                }
            }

            if (empty(otherAdjusted)) {
                flag = true;
                tips += "其他方案是否需要调整不能为空\t";
            } else {
                if (!"是".equals(otherAdjusted) && !"否".equals(otherAdjusted)) {
                    flag = true;
                    tips += "其他方案是否需要调整填写错误\t";
                }
            }

            if (empty(difficultResolve)) {
                flag = true;
                tips += "是否存在难以解决的政处不能为空\t";
            } else {
                if (!"是".equals(difficultResolve) && !"否".equals(difficultResolve)) {
                    flag = true;
                    tips += "是否存在难以解决的政处填写错误\t";
                }
            }

            if ("是".equals(difficultResolve)) {
                if (empty(designChanges)) {
                    flag = true;
                    tips += "是否需要进行设计变更不能为空\t";
                } else {
                    if (!"是".equals(designChanges) && !"否".equals(designChanges)) {
                        flag = true;
                        tips += "是否需要进行设计变更填写错误\t";
                    }
                }

                if (empty(needsClosed)) {
                    flag = true;
                    tips += "是否需要进行项目关闭不能为空\t";
                } else {
                    if (!"是".equals(needsClosed) && !"否".equals(needsClosed)) {
                        flag = true;
                        tips += "是否需要进行项目关闭填写错误\t";
                    }
                }
                if (empty(affairsDescription)) {
                    flag = true;
                    tips += "政处问题描述不能为空\t";
                }
            }

            if (empty(planningRequired)) {
                flag = true;
                tips += "是否需要规划报批不能为空\t";
            } else {
                if (!"是".equals(planningRequired) && !"否".equals(planningRequired)) {
                    flag = true;
                    tips += "是否需要规划报批填写错误\t";
                }
            }

            if (empty(highSpeed)) {
                flag = true;
                tips += "是否涉及高铁、高速不能为空\t";
            } else {
                if (!"是".equals(highSpeed) && !"否".equals(highSpeed)) {
                    flag = true;
                    tips += "是否涉及高铁、高速填写错误\t";
                }
            }

            if (empty(affairsOffice)) {
                flag = true;
                tips += "是否存在复杂民事政处不能为空\t";
            } else {
                if (!"是".equals(affairsOffice) && !"否".equals(affairsOffice)) {
                    flag = true;
                    tips += "是否存在复杂民事政处填写错误\t";
                }
            }

            if (empty(preconditions)) {
                flag = true;
                tips += "图纸方案是否存在前置条件不能为空\t";
            } else {
                if (!"是".equals(preconditions) && !"否".equals(preconditions)) {
                    flag = true;
                    tips += "图纸方案是否存在前置条件填写错误\t";
                }
            }
            if ("是".equals(preconditions)) {
                if (empty(preconditionDescription)) {
                    flag = true;
                    tips += "前置条件描述不能为空";
                }
            }

            if (empty(customizedMaterials)) {
                flag = true;
                tips += "是否需要定制物资不能为空\t";
            } else {
                if (!"是".equals(customizedMaterials) && !"否".equals(customizedMaterials)) {
                    flag = true;
                    tips += "是否需要定制物资填写错误\t";
                }
            }

            if (empty(customizedCan)) {
                flag = true;
                tips += "是否能定制不能为空\t";
            } else {
                if (!"是".equals(customizedMaterials) && !"否".equals(customizedMaterials)) {
                    flag = true;
                    tips += "是否能定制填写错误\t";
                }
            }

            if ("是".equals(customizedMaterials)) {
                if (empty(reasonDescription)) {
                    flag = true;
                    tips += "定制原因描述填写错误\t";
                }
                if (empty(materialDescription)) {
                    flag = true;
                    tips += "定制物资描述填写错误\t";
                }
            }

            if (empty(demolitionMaterials)) {
                flag = true;
                tips += "拆旧物资是否与设计一致不能为空\t";
            } else {
                if (!"是".equals(demolitionMaterials) && !"否".equals(demolitionMaterials)) {
                    flag = true;
                    tips += "拆旧物资是否与设计一致填写错误\t";
                }
            }

            if (empty(drawingAnnotation)) {
                flag = true;
                tips += "图纸标注是否存在问题不能为空\t";
            } else {
                if (!"是".equals(drawingAnnotation) && !"否".equals(drawingAnnotation)) {
                    flag = true;
                    tips += "图纸标注是否存在问题填写错误\t";
                }
            }

            if ("是".equals(drawingAnnotation)) {
                if (empty(drawingProblem)) {
                    flag = true;
                    tips += "图纸标注问题描述不能为空\t";
                }
            }

            if (empty(powerOutage)) {
                flag = true;
                tips += "是否存在停电问题不能为空\t";
            } else {
                if (!"是".equals(powerOutage) && !"否".equals(powerOutage)) {
                    flag = true;
                    tips += "是否存在停电问题填写错误\t";
                }
            }

            if ("是".equals(powerOutage)) {
                if (empty(powerProblem)) {
                    flag = true;
                    tips += "停电问题问题描述不能为空\t";
                }
            }

            if (empty(nearLiveLine)) {
                flag = true;
                tips += "是否邻近带电线路不能为空\t";
            } else {
                if (!"是".equals(nearLiveLine) && !"否".equals(nearLiveLine)) {
                    flag = true;
                    tips += "是否邻近带电线路填写错误\t";
                }
            }

            if (empty(highVoltageLine)) {
                flag = true;
                tips += "是否下穿高压线路不能为空\t";
            } else {
                if (!"是".equals(highVoltageLine) && !"否".equals(highVoltageLine)) {
                    flag = true;
                    tips += "是否下穿高压线路填写错误\t";
                }
            }

            if (empty(complexPipeline)) {
                flag = true;
                tips += "是否存在复杂管线不能为空\t";
            } else {
                if (!"是".equals(complexPipeline) && !"否".equals(complexPipeline)) {
                    flag = true;
                    tips += "是否存在复杂管线填写错误\t";
                }
            }

            if (empty(complicatedPower)) {
                flag = true;
                tips += "是否涉及复杂停电不能为空\t";
            } else {
                if (!"是".equals(complicatedPower) && !"否".equals(complicatedPower)) {
                    flag = true;
                    tips += "是否涉及复杂停电填写错误\t";
                }
            }

            if ("是".equals(hasImplemented)) {
                if (empty(sceneDescription)) {
                    flag = true;
                    tips += "现场情况描述不能为空\t";
                }
            }
            if ("否".equals(isImplement)) {
                if (empty(noImplementation)) {
                    flag = true;
                    tips += "实施无必要不能为空\t";
                }
            }
            if ("否".equals(whetherComplete)) {
                if (empty(drawingDescription)) {
                    flag = true;
                    tips += "图纸完整性不能为空\t";
                }
            }
            if ("否".equals(whetherStandard)) {
                if (empty(normativeDrawings)) {
                    flag = true;
                    tips += "图纸规范性不能为空\t";
                }
            }
            if ("是".equals(whetherDrawing)) {
                if (empty(problemDescription)) {
                    flag = true;
                    tips += "典设图问题不能为空\t";
                }
            }
            if ("是".equals(whetherChannel)) {
                if (empty(constructionDescription)) {
                    flag = true;
                    tips += "施工通道情况不能为空\t";
                }
            }
            if ("是".equals(civilAdjusted)) {
                if (empty(descriptionPlans) || empty(descriptionAdjustment)) {
                    flag = true;
                    tips += "土建方案变更内容描述或土建工作量调整内容不能为空\t";
                }
            }
            if ("是".equals(electricalAdjusted)) {
                if (empty(adjustmentDescription)) {
                    flag = true;
                    tips += "调整原因不能为空\t";
                }
            }
            if ("是".equals(doesChange)) {
                if (empty(automatedContent) || empty(automatedAdjustment)) {
                    flag = true;
                    tips += "自动化方案调整内容或自动化工作内容调整有误\t";
                }
            }
            if ("是".equals(otherAdjusted)) {
                if (empty(descriptionReasons) || empty(descriptionReasons)) {
                    flag = true;
                    tips += "其他方案调整原因不能为空\t";
                }
            }

            if (flag == true) {
                fin += "<" + c.getReserveProjectName() + ">" + ":" + tips + "</br>";
            } else {
                newConList.add(c);
            }
        }
        Map<String, Object> returnMap = new HashMap<>();
        returnMap.put("fin", fin);
        returnMap.put("newConList", newConList);
        return returnMap;
    }

    private static boolean empty(String sceneDescription) {
        if ("".equals(sceneDescription) || sceneDescription == null) {
            return true;
        } else {
            return false;
        }
    }

    //则现场设备尺寸、最多可扩容尺寸需填写，且默认单位为米
    public static Construction getAddUnit(Construction construction) {
        String size = "";
        /*if (null!=construction.getDisclose()){
            size = construction.getDisclose().getSceneSize();
            if (null!=size&&!"".equals(size)){
                if (!size.contains("米")){
                    construction.getDisclose().setSceneSize(size+"米");
                }
            }
            size = construction.getDisclose().getCapacitySize();
            if (null!=size && !"".equals(size)){
                if (!size.contains("米")){
                    construction.getDisclose().setCapacitySize(size+"米");
                }
            }
        }*/
        return construction;
    }

    //人工审核：回显
    public static void getTheEcho(Construction construction, Model model) {
        Disclose disclose = construction.getDisclose();
        String hasImplemented = disclose.getHasImplemented();
        String isImplement = disclose.getIsImplement();
        String whetherComplete = disclose.getWhetherComplete();
        String whetherStandard = disclose.getWhetherStandard();
        String whetherDrawing = disclose.getWhetherDrawing();
        String whetherChannel = disclose.getWhetherChannel();
        String civilAdjusted = disclose.getCivilAdjusted();
        String electricalAdjusted = disclose.getElectricalAdjusted();
        String doesChange = disclose.getDoesChange();
        String otherAdjusted = disclose.getOtherAdjusted();

        String difficultResolve = disclose.getDifficultResolve();
        String designChanges = disclose.getDesignChanges();
        String needsClosed = disclose.getNeedsClosed();

        String preconditions = disclose.getPreconditions();
        String customizedMaterials = disclose.getCustomizedMaterials();
        String demolitionMaterials = disclose.getDemolitionMaterials();


        if ("否".equals(hasImplemented)
                && "是".equals(isImplement)
                && "是".equals(whetherComplete)
                && "是".equals(whetherStandard)
                && "否".equals(whetherDrawing)
                && "否".equals(whetherChannel)
                && "否".equals(civilAdjusted)
                && "否".equals(electricalAdjusted)
                && "否".equals(doesChange)
                && "否".equals(otherAdjusted)
                && "否".equals(designChanges)
                && "否".equals(needsClosed)
                && "否".equals(preconditions)
                && "否".equals(customizedMaterials)
                && "否".equals(demolitionMaterials)) {
            model.addAttribute("noProblem", true);
        } else {
            if ("是".equals(hasImplemented)
                    || "否".equals(isImplement)
                    || "是".equals(demolitionMaterials)) {
                model.addAttribute("closed", true);
            } else if ("否".equals(whetherComplete)
                    || "否".equals(whetherStandard)
                    || "是".equals(whetherDrawing)
                    || "是".equals(whetherChannel)
                    || "是".equals(civilAdjusted)
                    || "是".equals(electricalAdjusted)
                    || "是".equals(doesChange)
                    || "是".equals(otherAdjusted)
                    || "是".equals(preconditions)
                    || "是".equals(customizedMaterials)) {
                model.addAttribute("design", true);
            }
        }
        if ("是".equals(difficultResolve)) {
            if ("是".equals(needsClosed)) {
                model.addAttribute("closed", true);
            } else if ("是".equals(designChanges)) {
                model.addAttribute("design", true);
            }
        }
    }

    //政策处理类型判断
    public static void getAdministrationTypeView(String administrationType, Model model) {
        if (administrationType.length() > 0) {
            String[] split = administrationType.split(";");
            for (String str : split) {
                if (str.contains("农村政处")) {
                    model.addAttribute("pass_construction3", "0");
                }
                //2.民事政处/行政政处（公路/水利）
                if (str.contains("民事政处/行政政处（公路/水利）")) {
                    model.addAttribute("pass_construction4", "0");
                }
                if (str.contains("行政政处（城区道路）")) {
                    model.addAttribute("pass_construction5", "0");
                }
            }
        }
    }

    //     if (str.equals("2.农村政处")){
//        model.addAttribute("pass_construction3","0");
//    }
//    //2.民事政处/行政政处（公路/水利）
//                if (str.equals("3.民事政处/行政政处（公路/水利）")){
//        model.addAttribute("pass_construction4","0");
//    }
//    //3.行政政处（城区道路）
//                if (str.equals("4.行政政处（城区道路）")){
//        model.addAttribute("pass_construction5","0");
//    }
    //政策处理类型判断
    public static String getAdministrationJudge(Disclose disclose, String tips) {
        /*if ("".equals(disclose.getAdministrationType()) || disclose.getAdministrationType() == null) {
            tips += "政处类型填写有误;";
            return tips;
        }
        boolean flag = true;
        String[] split = disclose.getAdministrationType().split(";");
        for (String str : split){
            if (!str.contains("农村政处")&&!str.contains("民事政处/行政政处（公路/水利）")&&!str.contains("行政政处（城区道路）")&&!str.contains("无")){
                tips+="政处类型填写有误";
                flag = false;
                break;
            }
        }
        if (flag){
            if (!disclose.getAdministrationType().contains("1.无")){
                if ("".equals(disclose.getPolicyHandlingInstructions()) || disclose.getPolicyHandlingInstructions() == null) {
                    tips += "政策处理说明填有误;";
                }
            }
        }
        return tips;
    }
    //人工审核：判断
    public static String getHumanReviewJudge(Disclose disclose){
        String tips = "";
        if ("".equals(disclose.getRequireName()) || disclose.getRequireName() == null) {
            tips +="项目名称有误;";
        }
        if ("".equals(disclose.getCapacity()) || disclose.getCapacity() == null||(!"有".equals(disclose.getCapacity())&&!"无".equals(disclose.getCapacity()))) {
            tips += "设备基础是否可以扩容填写有误;";
        }else {
            if ("是".equals(disclose.getCapacity())){
                if ("".equals(disclose.getSceneSize())||disclose.getSceneSize() == null){
                    tips+="现场设备尺寸有误;";
                }
                if ("".equals(disclose.getCapacitySize())||disclose.getCapacitySize()==null){
                    tips+="最多可扩容尺寸有误;";
                }
            }
        }
        if ("".equals(disclose.getHiddenDanger()) || disclose.getHiddenDanger() == null||(!"有".equals(disclose.getHiddenDanger())&&!"无".equals(disclose.getHiddenDanger()))) {
            tips += "方案安全隐患填写有误;";
        }
        if ("".equals(disclose.getInfluenceConstruction()) || disclose.getInfluenceConstruction() == null||(!"是".equals(disclose.getInfluenceConstruction())&&!"否".equals(disclose.getInfluenceConstruction()))) {
            tips += "是否存在低压或通信线等影响施工填写有误;";
        }
        if ("".equals(disclose.getProjectRepetition()) || disclose.getProjectRepetition() == null||(!"是".equals(disclose.getProjectRepetition())&&!"否".equals(disclose.getProjectRepetition()))) {
            tips += "立项重复填写有误;";
        }
        if ("".equals(disclose.getImplemented()) || disclose.getImplemented() == null||(!"是".equals(disclose.getImplemented())&&!"否".equals(disclose.getImplemented()))) {
            tips += "是否已实施填写有误;";
        }
        if ("".equals(disclose.getTransformer()) || disclose.getTransformer() == null||(!"有".equals(disclose.getTransformer())&&!"无".equals(disclose.getTransformer()))) {
            tips += "变压器无负荷填写有误;";
        }
        if ("有".equals(disclose.getHiddenDanger()) || "是".equals(disclose.getInfluenceConstruction())|| "是".equals(disclose.getProjectRepetition())|| "是".equals(disclose.getImplemented())|| "无".equals(disclose.getTransformer())) {
            if ("".equals(disclose.getExplanationOfNecessity()) || disclose.getExplanationOfNecessity() == null) {
                tips += "必要性问题说明有误;";
            }
        }
        if ("".equals(disclose.getLineName()) || disclose.getLineName() == null||(!"一致".equals(disclose.getLineName())&&!"不一致".equals(disclose.getLineName()))) {
            tips += "线路名称、设备、开关、杆号一致性填写有误;";
        }
        if ("".equals(disclose.getQuantities()) || disclose.getQuantities() == null||(!"是".equals(disclose.getQuantities())&&!"否".equals(disclose.getQuantities()))) {
            tips += "工程量是否一致填写有误;";
        }
        if ("否".equals(disclose.getLineName())||"否".equals(disclose.getQuantities())) {
            if ("".equals(disclose.getInconsistentDescription()) || disclose.getInconsistentDescription() == null) {
                tips += "图纸现场不一致说明有误;";
            }
        }
//        if ("".equals(disclose.getAdministrationType()) || disclose.getAdministrationType() == null||(!"1.农村政处".equals(disclose.getAdministrationType())&&!"2.民事政处/行政政处（公路/水利）".equals(disclose.getAdministrationType())&&!"3.行政政处（城区道路）".equals(disclose.getAdministrationType())&&!"4.无".equals(disclose.getAdministrationType()))) {
////            tips += "政处类型填写有误;";
////        }else {
////            if (("1.农村政处".equals(disclose.getAdministrationType())||"2.民事政处/行政政处（公路/水利）".equals(disclose.getAdministrationType())||"3.行政政处（城区道路）".equals(disclose.getAdministrationType()))) {
////                if ("".equals(disclose.getPolicyHandlingInstructions()) || disclose.getPolicyHandlingInstructions() == null) {
////                    tips += "政策处理说明填写有误;";
////                }
////            }
////        }
        tips = getAdministrationJudge(disclose, tips);
        //DTU  安放方式检查
        if ("".equals(disclose.getPlacementMode())||disclose.getPlacementMode() == null||(!"户外".equals(disclose.getPlacementMode())&&!"户内".equals(disclose.getPlacementMode())&&!"无".equals(disclose.getPlacementMode()))){
            tips+="DTU安放方式核查填写有误";
        }else {
            if ("户外".equals(disclose.getPlacementMode())||"户内".equals(disclose.getPlacementMode())){
                if ("".equals(disclose.getProductionDate())||disclose.getProductionDate() == null){
                    tips +="核查环网柜生产日期有误;";
                }
            }
        }
        if ("".equals(disclose.getIntegrateModule()) || disclose.getIntegrateModule() == null) {
            tips += "二次是否是集成模块有误;";
        }else {
            if (!"是".equals(disclose.getIntegrateModule())&&!"否".equals(disclose.getIntegrateModule())){
                tips += "二次是否是集成模块填写有误;";
            }
        }
        if ("".equals(disclose.getNeedReplace()) || disclose.getNeedReplace() == null) {
            tips += "PT是否需要更换有误;";
        }else {
            if (!"是".equals(disclose.getNeedReplace())&&!"否".equals(disclose.getNeedReplace())){
                tips += "PT是否需要更换填写有误;";
            }
        }
        if ("".equals(disclose.getOverallTransformation()) || disclose.getOverallTransformation() == null) {
            tips += "设备是否有整体改造的必要有误;";
        }else {
            if (!"是".equals(disclose.getOverallTransformation())&&!"否".equals(disclose.getOverallTransformation())){
                tips += "设备是否有整体改造的必要填写有误;";
            }
        }*/
        return tips;
    }
}
