package cn.com.countrygarden.bi.main.service.ck.impl;

import cn.com.countrygarden.bi.main.core.Response;
import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.dao.ShareConfigMapper;
import cn.com.countrygarden.bi.main.dao.ck.satisfaction.*;
import cn.com.countrygarden.bi.main.dao.sys.UserRolesMapper;
import cn.com.countrygarden.bi.main.dao.twerp.hm.TbSysOrganMapper;
import cn.com.countrygarden.bi.main.dao.twerp.hm.TbSysUserMapper;
import cn.com.countrygarden.bi.main.dto.advise.ProjectListVO;
import cn.com.countrygarden.bi.main.dto.advise.RegionListVO;
import cn.com.countrygarden.bi.main.dto.ck.SatisfiedNationwideDTO;
import cn.com.countrygarden.bi.main.exception.ServiceException;
import cn.com.countrygarden.bi.main.model.AccessToken;
import cn.com.countrygarden.bi.main.model.PageData;
import cn.com.countrygarden.bi.main.model.ShareConfig;
import cn.com.countrygarden.bi.main.model.ck.satisfaction.*;
import cn.com.countrygarden.bi.main.model.sys.UserRoles;
import cn.com.countrygarden.bi.main.model.twerp.hm.TbSysUser;
import cn.com.countrygarden.bi.main.service.ck.SatisfiedNationwideService;
import cn.com.countrygarden.bi.main.service.erp.impl.ExcelArrearageServiceImpl;
import cn.com.countrygarden.bi.main.util.MD5;
import cn.com.countrygarden.bi.main.util.erp.StringUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import net.sf.json.JSONObject;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import tk.mybatis.mapper.entity.Condition;
import tk.mybatis.mapper.entity.Example;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;

/**
 * <p>
 *   满意度-全国业务处理
 * </p>
 *
 * @author
 * @date 2021-08-06
 * @version V1.0
 */
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class SatisfiedNationwideServiceImpl implements SatisfiedNationwideService {

    @Autowired
    private SatisfiedNationwideMapper satisfiedNationwideMapper;

    @Autowired
    private UserRolesMapper userRolesMapper;

    @Autowired
    private TbSysOrganMapper tbSysOrganMapper;

    @Autowired
    private ShareConfigMapper shareConfigMapper;

    @Autowired
    private SatisfiedRegionMapper satisfiedRegionMapper;

    @Autowired
    private SatisfiedControlProjectMapper satisfiedControlProjectMapper;

    @Autowired
    private SatisfiedDissatisfiedNationwideMapper satisfiedDissatisfiedNationwideMapper;

    @Autowired
    private SatisfiedDissatisfiedRegionMapper satisfiedDissatisfiedRegionMapper;

    @Autowired
    private SatisfiedDissatisfiedProjectMapper satisfiedDissatisfiedProjectMapper;

    @Autowired
    private TbSysUserMapper tbSysUserMapper;

    private final org.slf4j.Logger logger = LoggerFactory.getLogger(ExcelArrearageServiceImpl.class);


    @Override
    public Result queryPageList(SatisfiedNationwide satisfiedNationwide,int page,int size,AccessToken accessToken) {

        List<String> rolesList = queryRoleCodes(null, accessToken.getUserCode());

        if (rolesList.contains("satisfaction_admin")) {

            if(StringUtil.isBlank(satisfiedNationwide.getYearNian())){
                if(StringUtil.isNotBlank(satisfiedNationwide.getNouchYue())){
                    String[] yuesr=satisfiedNationwide.getNouchYue().split(",");
                    satisfiedNationwide.setYueList(Arrays.asList(yuesr));
                    satisfiedNationwide.setMonthStr(null);
                    List<String> niancha=satisfiedNationwideMapper.niancha();
                    List<String> nianxin=new ArrayList<>();
                    for (int i = 0; i <satisfiedNationwide.getYueList().size() ; i++) {
                        for (int j = 0; j <niancha.size() ; j++) {
                            String yuehie=niancha.get(j)+"-"+satisfiedNationwide.getYueList().get(i);
                            nianxin.add(yuehie);
                        }
                    }
                    satisfiedNationwide.setYueList(nianxin);
                }
            }

            if(StringUtil.isNotBlank(satisfiedNationwide.getMonthStr())){
                String[] yuesr=satisfiedNationwide.getMonthStr().split(",");
                satisfiedNationwide.setYueList(Arrays.asList(yuesr));
                satisfiedNationwide.setYearNian(null);
            }

            Long toble=satisfiedNationwideMapper.selectListDataToble(satisfiedNationwide);

            Page<Object> pageList = PageHelper.startPage(page,size);
            List<SatisfiedNationwide> list=satisfiedNationwideMapper.queryPageList(satisfiedNationwide);

            if (CollectionUtils.isNotEmpty(list)){
                NumberFormat df = NumberFormat.getNumberInstance();
                df.setMaximumFractionDigits(2);
                for (int i = 0; i <list.size() ; i++) {
                    if(StringUtil.isNotBlank(list.get(i).getMonthResults())){
                        list.get(i).setMonthResults(String.valueOf(df.format(Double.valueOf(list.get(i).getMonthResults())*100))+"%");
                    }else {
                        list.get(i).setMonthResults("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getAnnualResults())){
                        list.get(i).setAnnualResults(String.valueOf(df.format(Double.valueOf(list.get(i).getAnnualResults())*100))+"%");
                    }else {
                        list.get(i).setAnnualResults("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getSecurity())){
                        list.get(i).setSecurity(String.valueOf(df.format(Double.valueOf(list.get(i).getSecurity())*100))+"%");
                    }else {
                        list.get(i).setSecurity("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getCleaning())){
                        list.get(i).setCleaning(String.valueOf(df.format(Double.valueOf(list.get(i).getCleaning())*100))+"%");
                    }else {
                        list.get(i).setCleaning("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getGreen())){
                        list.get(i).setGreen(String.valueOf(df.format(Double.valueOf(list.get(i).getGreen())*100))+"%");
                    }else {
                        list.get(i).setGreen("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getEngineering())){
                        list.get(i).setEngineering(String.valueOf(df.format(Double.valueOf(list.get(i).getEngineering())*100))+"%");
                    }else {
                        list.get(i).setEngineering("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getCustomer())){
                        list.get(i).setCustomer(String.valueOf(df.format(Double.valueOf(list.get(i).getCustomer())*100))+"%");
                    }else {
                        list.get(i).setCustomer("/");
                    }
                    if(StringUtil.isNotBlank(list.get(i).getComprehensive())){
                        list.get(i).setComprehensive(String.valueOf(df.format(Double.valueOf(list.get(i).getComprehensive())*100))+"%");
                    }else {
                        list.get(i).setComprehensive("/");
                    }
                }
            }

            PageData data = new PageData(pageList);
            data.setData(list);
            data.setTotal(toble);
            return Response.response(data);
        }else {
            throw new ServiceException("此账号无权限查看");
        }
    }
    @Override
    public List<RegionListVO> getRegionDate(AccessToken accessToken) {
        List<RegionListVO> areaList = tbSysOrganMapper.findAreaSatisfied();

        List<RegionListVO> are=new ArrayList<>();
        if(CollectionUtils.isNotEmpty(areaList)){
            for (int i = 0; i < areaList.size(); i++) {
                RegionListVO reg=new RegionListVO();
                if(areaList.get(i).getOrganName().indexOf("区域")!=-1){
                    reg=areaList.get(i);
                    are.add(reg);
                }
            }
        }
        RegionListVO regio=new RegionListVO();
        regio.setOrganCode("0");
        regio.setOrganName("全部区域");
        are.add(0,regio);
        return are;
    }

    @Override
    public Result edit(SatisfiedNationwide satisfiedNationwide, AccessToken accessToken) {
        String s=null;
        Double sd=null;
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);

        if(satisfiedNationwide.getMonthResults().equals("/")){
            satisfiedNationwide.setMonthResults("");
        }else if(satisfiedNationwide.getMonthResults().indexOf("%")!=-1){
            s = satisfiedNationwide.getMonthResults();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setMonthResults(df.format(sd));
        }

        if(satisfiedNationwide.getAnnualResults().equals("/")){
            satisfiedNationwide.setAnnualResults("");
        }else if(satisfiedNationwide.getAnnualResults().indexOf("%")!=-1){
            s = satisfiedNationwide.getAnnualResults();
            s = s.substring(0, s.length() - 1);
             sd=Double.valueOf(s);
             sd=sd/100;
            satisfiedNationwide.setAnnualResults(df.format(sd));
        }

        if(satisfiedNationwide.getSecurity().equals("/")){
            satisfiedNationwide.setSecurity("");
        }else if(satisfiedNationwide.getSecurity().indexOf("%")!=-1){
            s = satisfiedNationwide.getSecurity();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setSecurity(df.format(sd));
        }

        if(satisfiedNationwide.getCleaning().equals("/")){
            satisfiedNationwide.setCleaning("");
        }else if(satisfiedNationwide.getCleaning().indexOf("%")!=-1){
            s = satisfiedNationwide.getCleaning();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setCleaning(df.format(sd));
        }

        if(satisfiedNationwide.getGreen().equals("/")){
            satisfiedNationwide.setGreen("");
        }else if(satisfiedNationwide.getGreen().indexOf("%")!=-1){
            s = satisfiedNationwide.getGreen();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setGreen(df.format(sd));
        }

        if(satisfiedNationwide.getEngineering().equals("/")){
            satisfiedNationwide.setEngineering("");
        }else if(satisfiedNationwide.getEngineering().indexOf("%")!=-1){
            s = satisfiedNationwide.getEngineering();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setEngineering(df.format(sd));
        }

        if(satisfiedNationwide.getCustomer().equals("/")){
            satisfiedNationwide.setCustomer("");
        }else if(satisfiedNationwide.getCustomer().indexOf("%")!=-1){
            s = satisfiedNationwide.getCustomer();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setCustomer(df.format(sd));
        }

        if(satisfiedNationwide.getComprehensive().equals("/")){
            satisfiedNationwide.setComprehensive("");
        }else if(satisfiedNationwide.getComprehensive().indexOf("%")!=-1){
            s = satisfiedNationwide.getComprehensive();
            s = s.substring(0, s.length() - 1);
            sd=Double.valueOf(s);
            sd=sd/100;
            satisfiedNationwide.setComprehensive(df.format(sd));
        }
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        satisfiedNationwide.setIsEditor(1);
        satisfiedNationwide.setUpdateTime(new Date());
        satisfiedNationwide.setUpdateBy(tbSysUser.getUserName());
        satisfiedNationwideMapper.updateByPrimaryKeySelective(satisfiedNationwide);
         return Response.response();
    }

    @Override
    public List<ProjectListVO> getPojDate(AccessToken accessToken, String organCode) {
        List<ProjectListVO> projectList = tbSysOrganMapper.findProjectSatisfied(organCode,accessToken.getUserCode(),null,null,null,null,null);
        return projectList;

    }

    @Override
    public Result getrevenue(AccessToken accessToken, HttpServletRequest request) throws IOException {
        BufferedReader bufferReader = new BufferedReader(request.getReader());
        StringBuffer sbder = new StringBuffer();
        String line = null;
        while ((line = bufferReader.readLine()) != null) {
            sbder.append(line);
        }
        if(sbder==null || sbder.length()==0){
            return Response.responseFail("请输入参数");
        }

        JSONObject json = JSONObject.fromObject(sbder.toString());
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("clientId",json.getString("clientId"));
        map.put("timeString",json.getString("timeString"));
        map.put("sign",json.getString("sign"));
        Result result = checkIdentity(json.getString("clientId"), json.getString("timeString"), json.getString("sign"));
        int code = result.getResultCode();
        if(500 == code){
            logger.error("认证失败-----------");
            System.err.println("认证失败-----------");
            return result;
        }

        if(!json.containsKey("startTime") && !json.containsKey("endTime")){
            logger.error("请传入时间参数");
            System.err.println("请传入时间参数");
            return Response.responseFail("请传入时间参数");
        }

/*        SimpleDateFormat sb=new SimpleDateFormat("yyyy-MM-dd HH:mm");
        try {
            if(json.containsKey("startTime")){
                Date parse = sb.parse(json.getString("startTime"));
            }
            if(json.containsKey("endTime")){
                Date parse = sb.parse(json.getString("endTime"));
            }
        }catch (Exception e){
            logger.error("参数错误:startTime 或者 endTime 时间格式有误");
            System.err.println("参数错误:startTime 或者 endTime 时间格式有误");
            return Response.responseFail("参数错误:startTime 或者 endTime 时间格式有误");
        }*/
        String startTime=null;
        String endTime=null;

        if(json.containsKey("startTime")){
             startTime = json.getString("startTime")+" 00:00:00";
        }
        if(json.containsKey("endTime")){
             endTime = json.getString("endTime")+" 23:59:59";
        }

        SatisfiedNationwideDTO satiseDTO=new SatisfiedNationwideDTO();
        List<Map<String,String>> lima=new ArrayList<>();

        List<SatisfiedNationwide> listBiao=satisfiedNationwideMapper.listBiao();

       List<SatisfiedNationwide> list=satisfiedNationwideMapper.getrevenue(startTime,endTime);

       if(CollectionUtils.isNotEmpty(list)){
           for (int i = 0; i <list.size() ; i++) {
               if(StringUtil.isBlank(list.get(i).getMonthResults())){
                   list.get(i).setMonthResults("");
               }
               if(StringUtil.isBlank(list.get(i).getAnnualResults())){
                   list.get(i).setAnnualResults("");
               }
               if(StringUtil.isBlank(list.get(i).getSecurity())){
                   list.get(i).setSecurity("");
               }
               if(StringUtil.isBlank(list.get(i).getCleaning())){
                   list.get(i).setCleaning("");
               }
               if(StringUtil.isBlank(list.get(i).getGreen())){
                   list.get(i).setGreen("");
               }
               if(StringUtil.isBlank(list.get(i).getEngineering())){
                   list.get(i).setEngineering("");
               }
               if(StringUtil.isBlank(list.get(i).getCustomer())){
                   list.get(i).setCustomer("");
               }
               if(StringUtil.isBlank(list.get(i).getComprehensive())){
                   list.get(i).setComprehensive("");
               }
           }
           /*NumberFormat df = NumberFormat.getNumberInstance();
           df.setMaximumFractionDigits(2);
           for (int i = 0; i <list.size() ; i++) {
           if(StringUtil.isNotBlank(list.get(i).getMonthResults())){
               list.get(i).setMonthResults(String.valueOf(df.format(Double.valueOf(list.get(i).getMonthResults())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getAnnualResults())){
               list.get(i).setAnnualResults(String.valueOf(df.format(Double.valueOf(list.get(i).getAnnualResults())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getSecurity())){
               list.get(i).setSecurity(String.valueOf(df.format(Double.valueOf(list.get(i).getSecurity())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getCleaning())){
               list.get(i).setCleaning(String.valueOf(df.format(Double.valueOf(list.get(i).getCleaning())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getGreen())){
               list.get(i).setGreen(String.valueOf(df.format(Double.valueOf(list.get(i).getGreen())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getEngineering())){
               list.get(i).setEngineering(String.valueOf(df.format(Double.valueOf(list.get(i).getEngineering())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getCustomer())){
               list.get(i).setCustomer(String.valueOf(df.format(Double.valueOf(list.get(i).getCustomer())*100)));
           }
           if(StringUtil.isNotBlank(list.get(i).getComprehensive())){
               list.get(i).setComprehensive(String.valueOf(df.format(Double.valueOf(list.get(i).getComprehensive())*100)));
           }
           }*/

           satiseDTO.setList(list);

           for (int i = 0; i < listBiao.size(); i++) {
               Map<String,String> mapSt=new HashMap<>();
               mapSt.put(listBiao.get(i).getKey(),listBiao.get(i).getValue());
               lima.add(mapSt);
           }
           satiseDTO.setName(lima);
       }

        return Response.response(satiseDTO);
    }

    @Override
    public Result excelToxls(HttpServletRequest request, HttpServletResponse response, MultipartFile multipartFile, String fileName, String usname, String userCode, AccessToken accessToken) throws IOException {

        BufferedInputStream bf = new BufferedInputStream(multipartFile.getInputStream());
        Workbook xwb = new XSSFWorkbook(bf);

        satisfiedNationwideExcelToxls(xwb,request,response,fileName,usname,userCode,accessToken);
        satisfiedRegionExcelToxls(xwb,request,response,fileName,usname,userCode,accessToken);
        satisfiedControlProjectExcelToxls(xwb,request,response,fileName,usname,userCode,accessToken);
        satisfiedDissatisfiedNationwideExcelToxls(xwb,request,response,fileName,usname,userCode,accessToken);
        satisfiedDissatisfiedRegionExcelToxls(xwb,request,response,fileName,usname,userCode,accessToken);
        satisfiedDissatisfiedProjectExcelToxls(xwb,request,response,fileName,usname,userCode,accessToken);

        return Response.response("导入成功");
    }

    @Override
    public Result del(String id, AccessToken accessToken) {
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        SatisfiedNationwide satisfiedNationwide =new SatisfiedNationwide();
        satisfiedNationwide.setId(Long.valueOf(id));
        satisfiedNationwide.setStatus(0);
        satisfiedNationwide.setUpdateTime(new Date());
        satisfiedNationwide.setUpdateBy(tbSysUser.getUserName());
        satisfiedNationwideMapper.updateByPrimaryKeySelective(satisfiedNationwide);
        return Response.response();
    }

    //满意度全国导入
    public void satisfiedNationwideExcelToxls(Workbook xwb,HttpServletRequest request,HttpServletResponse response,
                                              String fileName, String usname, String userCode, AccessToken accessToken){
        Sheet sheet = xwb.getSheetAt(0);//获取第几个页面0开始
        int sheetRowCount=sheet.getPhysicalNumberOfRows();//获取行数

        Row row = null;
        Cell cell;
        List<SatisfiedNationwide> orsaIns=new ArrayList<>();
        List<SatisfiedNationwide> orsaUpda=new ArrayList<>();

        List<String> moyueStr=new ArrayList<>();
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);
        for (int j = 0; j < sheet.getPhysicalNumberOfRows(); j++) {
            row = sheet.getRow(j+1);
            if(row==null) {
                break;
            }

            for (int k = 0; k < sheet.getRow(j).getPhysicalNumberOfCells(); k++) {
                cell = row.getCell(0);
                if(cell==null) {
                    break;
                }

                cell.setCellType(CellType.STRING);
                String yearMonth=cell.getStringCellValue();
                if(StringUtils.isBlank(yearMonth)){
                    break;
                }

                cell = row.getCell(1);
                cell.setCellType(CellType.STRING);
                String annualResults=cell.getStringCellValue();
                if(StringUtils.isBlank(annualResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度考核成绩不能为空");
                }

                cell = row.getCell(2);
                cell.setCellType(CellType.STRING);
                String security=cell.getStringCellValue();
                if(StringUtils.isBlank(security)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防不能为空");
                }

                cell = row.getCell(3);
                cell.setCellType(CellType.STRING);
                String cleaning=cell.getStringCellValue();
                if(StringUtils.isBlank(cleaning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁不能为空");
                }

                cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String green=cell.getStringCellValue();
                if(StringUtils.isBlank(green)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化不能为空");
                }

                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String engineering=cell.getStringCellValue();
                if(StringUtils.isBlank(engineering)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程不能为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String customer=cell.getStringCellValue();
                if(StringUtils.isBlank(customer)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服不能为空");
                }

                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String comprehensive=cell.getStringCellValue();
                if(StringUtils.isBlank(comprehensive)){
                    throw new ServiceException("第" + (j + 2) + "行" + "综合不能为空");
                }


                SatisfiedNationwide satisf=new SatisfiedNationwide();
                /*if(!monthResults.equals("/")){
                    satisf.setMonthResults(df.format(Double.valueOf(monthResults)));
                }*/
                if(!annualResults.equals("/")){
                    satisf.setAnnualResults(df.format(Double.valueOf(annualResults)));
                }else {
                    satisf.setAnnualResults("");
                }
                if(!security.equals("/")){
                    satisf.setSecurity(df.format(Double.valueOf(security)));
                }else {
                    satisf.setSecurity("");
                }
                if(!cleaning.equals("/")){
                    satisf.setCleaning(df.format(Double.valueOf(cleaning)));
                }else {
                    satisf.setCleaning("");
                }
                if(!green.equals("/")){
                    satisf.setGreen(df.format(Double.valueOf(green)));
                }else {
                    satisf.setGreen("");
                }
                if(!engineering.equals("/")){
                    satisf.setEngineering(df.format(Double.valueOf(engineering)));
                }else {
                    satisf.setEngineering("");
                }
                if(!customer.equals("/")){
                    satisf.setCustomer(df.format(Double.valueOf(customer)));
                }else {
                    satisf.setCustomer("");
                }
                if(!comprehensive.equals("/")){
                    satisf.setComprehensive(df.format(Double.valueOf(comprehensive)));
                }else {
                    satisf.setComprehensive("");
                }
                satisf.setYearMonth(yearMonth);
                satisf.setStatus(1);
                satisf.setIsEditor(0);
                satisf.setCreateBy(userCode);
                //moyueStr.add(yearMonth);
                SatisfiedNationwide sat=new SatisfiedNationwide();
                sat.setYearMonth(yearMonth);
                sat.setStatus(1);
                List<SatisfiedNationwide> list=satisfiedNationwideMapper.select(sat);
                if(CollectionUtils.isNotEmpty(list)){
                    //修改
                    satisf.setId(list.get(0).getId());
                    satisf.setIsEditor(1);
                    satisf.setUpdateTime(new Date());
                    satisf.setUpdateBy(tbSysUser.getUserName());
                    orsaUpda.add(satisf);
                }else {
                    //添加
                    orsaIns.add(satisf);
                }
                k+=7;
            }
        }
        //Set<String> yueset=new LinkedHashSet<>(moyueStr);
        //List<String> yuelist=new ArrayList<>(yueset);

        //satisfiedNationwideMapper.updateDelete();

        Set<SatisfiedNationwide> setIn=new LinkedHashSet<>(orsaIns);
        List<SatisfiedNationwide> orListIn=new ArrayList<>(setIn);

        Set<SatisfiedNationwide> setUp=new LinkedHashSet<>(orsaUpda);
        List<SatisfiedNationwide> orListUp=new ArrayList<>(setUp);

        if(CollectionUtils.isNotEmpty(orListIn)){
            int indexIn=satisfiedNationwideMapper.insertPL(orListIn);
        }
        if(CollectionUtils.isNotEmpty(orListUp)){
            for (int i = 0; i <orListUp.size() ; i++) {
                satisfiedNationwideMapper.updateByPrimaryKeySelective(orListUp.get(i));
            }
        }


    }

    //满意度区域导入
    public void satisfiedRegionExcelToxls(Workbook xwb,HttpServletRequest request,HttpServletResponse response,
                                          String fileName, String usname, String userCode, AccessToken accessToken){

        Sheet sheet = xwb.getSheetAt(1);//获取第几个页面0开始
        int sheetRowCount=sheet.getPhysicalNumberOfRows();//获取行数

        Row row = null;
        Cell cell;
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        List<SatisfiedRegion> orsaIns=new ArrayList<>();
        List<SatisfiedRegion> orsaUpda=new ArrayList<>();
        List<String> moyueStr=new ArrayList<>();
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);
        for (int j = 0; j < sheet.getPhysicalNumberOfRows(); j++) {
            row = sheet.getRow(j+1);
            if(row==null) {
                break;
            }

            for (int k = 0; k < sheet.getRow(j).getPhysicalNumberOfCells(); k++) {
                cell = row.getCell(0);
                if(cell==null) {
                    break;
                }

                cell.setCellType(CellType.STRING);
                String yearMonth=cell.getStringCellValue();
                if(StringUtils.isBlank(yearMonth)){
                    break;
                }
                cell = row.getCell(1);
                cell.setCellType(CellType.STRING);
                String orgCode=cell.getStringCellValue();
                if(StringUtils.isBlank(orgCode)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域ID不能为空");
                }

                cell = row.getCell(2);
                cell.setCellType(CellType.STRING);
                String orgName=cell.getStringCellValue();
                if(StringUtils.isBlank(orgName)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域名称不能为空");
                }

                List<ProjectListVO> projectList = tbSysOrganMapper.findProjectSatisfiedDaoqu(orgCode,orgName);
                if(CollectionUtils.isEmpty(projectList)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域编号或者名称有误，请确认！！！");
                }

                cell = row.getCell(3);
                cell.setCellType(CellType.STRING);
                String monthResults=cell.getStringCellValue();
                if(StringUtils.isBlank(monthResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "当月成绩不能为空");
                }

                cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String annualResults=cell.getStringCellValue();
                if(StringUtils.isBlank(annualResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度考核成绩不能为空");
                }

               /* cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String securityResults=cell.getStringCellValue();
                if(StringUtils.isBlank(securityResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度安防考核成绩不能为空");
                }

                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String cleaningResults=cell.getStringCellValue();
                if(StringUtils.isBlank(cleaningResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度保洁考核成绩不能为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String greenResults=cell.getStringCellValue();
                if(StringUtils.isBlank(greenResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度绿化考核成绩不能为空");
                }

                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String engineeringResults=cell.getStringCellValue();
                if(StringUtils.isBlank(engineeringResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度工程考核成绩不能为空");
                }

                cell = row.getCell(8);
                cell.setCellType(CellType.STRING);
                String customerResults=cell.getStringCellValue();
                if(StringUtils.isBlank(customerResults)){
                    throw new ServiceException("第" + (j + 2) + "行" + "年度客服考核成绩不能为空");
                }*/


                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String security=cell.getStringCellValue();
                if(StringUtils.isBlank(security)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防不能为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String cleaning=cell.getStringCellValue();
                if(StringUtils.isBlank(cleaning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁不能为空");
                }

                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String green=cell.getStringCellValue();
                if(StringUtils.isBlank(green)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化不能为空");
                }

                cell = row.getCell(8);
                cell.setCellType(CellType.STRING);
                String engineering=cell.getStringCellValue();
                if(StringUtils.isBlank(engineering)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程不能为空");
                }

                cell = row.getCell(9);
                cell.setCellType(CellType.STRING);
                String customer=cell.getStringCellValue();
                if(StringUtils.isBlank(customer)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服不能为空");
                }

                cell = row.getCell(10);
                cell.setCellType(CellType.STRING);
                String comprehensive=cell.getStringCellValue();
                if(StringUtils.isBlank(comprehensive)){
                    throw new ServiceException("第" + (j + 2) + "行" + "综合不能为空");
                }

                SatisfiedRegion satisf=new SatisfiedRegion();
                satisf.setOrgCode(orgCode);
                satisf.setOrgName(orgName);
                if(!monthResults.equals("/")){
                    satisf.setMonthResults(df.format(Double.valueOf(monthResults)));
                }else {
                    satisf.setMonthResults("");
                }
                if(!annualResults.equals("/")){
                    satisf.setAnnualResults(df.format(Double.valueOf(annualResults)));
                }else {
                    satisf.setAnnualResults("");
                }
                if(!security.equals("/")){
                    satisf.setSecurity(df.format(Double.valueOf(security)));
                }else {
                satisf.setSecurity("");
                }
                if(!cleaning.equals("/")){
                    satisf.setCleaning(df.format(Double.valueOf(cleaning)));
                }else {
                    satisf.setCleaning("");
                }
                if(!green.equals("/")){
                    satisf.setGreen(df.format(Double.valueOf(green)));
                }else {
                    satisf.setGreen("");
                }
                if(!engineering.equals("/")){
                    satisf.setEngineering(df.format(Double.valueOf(engineering)));
                }else {
                    satisf.setEngineering("");
                }
                if(!customer.equals("/")){
                    satisf.setCustomer(df.format(Double.valueOf(customer)));
                }else {
                    satisf.setCustomer("");
                }
                if(!comprehensive.equals("/")){
                    satisf.setComprehensive(df.format(Double.valueOf(comprehensive)));
                }else {
                    satisf.setComprehensive("");
                }
                satisf.setYearMonth(yearMonth);
                satisf.setStatus(1);
                satisf.setCreateBy(userCode);
                satisf.setIsEditor(0);
/*                moyueStr.add(yearMonth);
                orsaIns.add(satisf);*/
                SatisfiedRegion sat=new SatisfiedRegion();
                sat.setOrgCode(orgCode);
                sat.setYearMonth(yearMonth);
                sat.setStatus(1);
                List<SatisfiedRegion> list=satisfiedRegionMapper.select(sat);
                if(CollectionUtils.isNotEmpty(list)){
                    //修改
                    satisf.setId(list.get(0).getId());
                    satisf.setIsEditor(1);
                    satisf.setUpdateTime(new Date());
                    satisf.setUpdateBy(tbSysUser.getUserName());
                    orsaUpda.add(satisf);
                }else {
                    //添加
                    orsaIns.add(satisf);
                }
                k+=10;
            }
        }
  /*      Set<String> yueset=new LinkedHashSet<>(moyueStr);
        List<String> yuelist=new ArrayList<>(yueset);
        satisfiedRegionMapper.updateDelete();*/


        Set<SatisfiedRegion> setIn=new LinkedHashSet<>(orsaIns);
        List<SatisfiedRegion> orListIn=new ArrayList<>(setIn);

        Set<SatisfiedRegion> setUp=new LinkedHashSet<>(orsaUpda);
        List<SatisfiedRegion> orListUp=new ArrayList<>(setUp);

        if(CollectionUtils.isNotEmpty(orListIn)){
            int indexIn=satisfiedRegionMapper.insertPL(orListIn);
        }

        if(CollectionUtils.isNotEmpty(orListUp)){
            for (int i = 0; i <orListUp.size() ; i++) {
                satisfiedRegionMapper.updateByPrimaryKeySelective(orListUp.get(i));
            }
        }


    }
    //满意度项目导入
    public void satisfiedControlProjectExcelToxls(Workbook xwb,HttpServletRequest request,HttpServletResponse response,
                                                  String fileName, String usname, String userCode, AccessToken accessToken){

        Sheet sheet = xwb.getSheetAt(2);//获取第几个页面0开始
        int sheetRowCount=sheet.getPhysicalNumberOfRows();//获取行数

        Row row = null;
        Cell cell;
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        List<SatisfiedControlProject> orsaIns=new ArrayList<>();
        List<SatisfiedControlProject> orsaUpda=new ArrayList<>();
        List<String> moyueStr=new ArrayList<>();
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);
        for (int j = 0; j < sheet.getPhysicalNumberOfRows(); j++) {
            row = sheet.getRow(j+1);
            if(row==null) {
                break;
            }

            for (int k = 0; k < sheet.getRow(j).getPhysicalNumberOfCells(); k++) {
                cell = row.getCell(0);
                if(cell==null) {
                    break;
                }

                cell.setCellType(CellType.STRING);
                String yearMonth=cell.getStringCellValue();
                if(StringUtils.isBlank(yearMonth)){
                    break;
                }

                cell = row.getCell(1);
                cell.setCellType(CellType.STRING);
                String commCode=cell.getStringCellValue();
                if(StringUtils.isBlank(commCode)){
                    throw new ServiceException("第" + (j + 2) + "行" + "项目ID不能为空");
                }


                cell = row.getCell(2);
                cell.setCellType(CellType.STRING);
                String orgName=cell.getStringCellValue();
                if(StringUtils.isBlank(orgName)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域名称不能为空");
                }

                cell = row.getCell(3);
                cell.setCellType(CellType.STRING);
                String commName=cell.getStringCellValue();
                if(StringUtils.isBlank(commName)){
                    throw new ServiceException("第" + (j + 2) + "行" + "项目名称不能为空");
                }

                List<ProjectListVO> projectList = tbSysOrganMapper.findProjectSatisfiedDaoxiangmu(commCode,orgName,commName);
                if(CollectionUtils.isEmpty(projectList)){
                    throw new ServiceException("第" + (j + 2) + "行" + "项目编号或者名称有误，请确认！！！");
                }


                cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String samples=cell.getStringCellValue();
                if(StringUtils.isBlank(samples)){
                    throw new ServiceException("第" + (j + 2) + "行" + "样本数不能为空");
                }

                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String dissatisfied=cell.getStringCellValue();
                if(StringUtils.isBlank(dissatisfied)){
                    throw new ServiceException("第" + (j + 2) + "行" + "不满意人数为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String isAssessment=cell.getStringCellValue();
                if(StringUtils.isBlank(isAssessment)){
                    throw new ServiceException("第" + (j + 2) + "行" + "X月是否考核不能为空");
                }


                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String satisfaction=cell.getStringCellValue();
                if(StringUtils.isBlank(satisfaction)){
                    throw new ServiceException("第" + (j + 2) + "行" + "满意度不能为空");
                }


                cell = row.getCell(8);
                cell.setCellType(CellType.STRING);
                String security=cell.getStringCellValue();
                if(StringUtils.isBlank(security)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防不能为空");
                }

                cell = row.getCell(9);
                cell.setCellType(CellType.STRING);
                String cleaning=cell.getStringCellValue();
                if(StringUtils.isBlank(cleaning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁不能为空");
                }

                cell = row.getCell(10);
                cell.setCellType(CellType.STRING);
                String green=cell.getStringCellValue();
                if(StringUtils.isBlank(green)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化不能为空");
                }

                cell = row.getCell(11);
                cell.setCellType(CellType.STRING);
                String engineering=cell.getStringCellValue();
                if(StringUtils.isBlank(engineering)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程不能为空");
                }

                cell = row.getCell(12);
                cell.setCellType(CellType.STRING);
                String customer=cell.getStringCellValue();
                if(StringUtils.isBlank(customer)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服不能为空");
                }

                cell = row.getCell(13);
                cell.setCellType(CellType.STRING);
                String comprehensive=cell.getStringCellValue();
                if(StringUtils.isBlank(comprehensive)){
                    throw new ServiceException("第" + (j + 2) + "行" + "综合不能为空");
                }


                SatisfiedControlProject satisf=new SatisfiedControlProject();
                satisf.setOrgCode(projectList.get(0).getOrganCode());
                satisf.setOrgName(orgName);
                satisf.setCommCode(commCode);
                satisf.setCommName(commName);
                if(!samples.equals("/")){
                    satisf.setSamples(samples);
                }
                if(!dissatisfied.equals("/")){
                    satisf.setDissatisfied(dissatisfied);
                }
                if(!isAssessment.equals("/")){
                    if(!isAssessment.equals("1") && !isAssessment.equals("0")){
                        throw new ServiceException("第" + (j + 2) + "行" + "X月是否考核 请输入0或1！！");
                    }else {
                        satisf.setIsAssessment(isAssessment);
                    }
                }
                if(!satisfaction.equals("/")){
                    satisf.setSatisfaction(df.format(Double.valueOf(satisfaction)));
                }else {
                    satisf.setSatisfaction("");
                }
                if(!security.equals("/")){
                    satisf.setSecurity(df.format(Double.valueOf(security)));
                }else {
                    satisf.setSecurity("");
                }
                if(!cleaning.equals("/")){
                    satisf.setCleaning(df.format(Double.valueOf(cleaning)));
                }else {
                    satisf.setCleaning("");
                }
                if(!green.equals("/")){
                    satisf.setGreen(df.format(Double.valueOf(green)));
                }else {
                    satisf.setGreen("");
                }
                if(!engineering.equals("/")){
                    satisf.setEngineering(df.format(Double.valueOf(engineering)));
                }else {
                    satisf.setEngineering("");
                }
                if(!customer.equals("/")){
                    satisf.setCustomer(df.format(Double.valueOf(customer)));
                }else {
                    satisf.setCustomer("");
                }
                if(!comprehensive.equals("/")){
                    satisf.setComprehensive(df.format(Double.valueOf(comprehensive)));
                }else {
                    satisf.setComprehensive("");
                }

                satisf.setYearMonth(yearMonth);
                satisf.setStatus(1);
                satisf.setCreateBy(userCode);
                satisf.setIsEditor(0);
            /*    moyueStr.add(yearMonth);
                orsaIns.add(satisf);*/
               SatisfiedControlProject sat=new SatisfiedControlProject();
                sat.setCommCode(commCode);
                sat.setYearMonth(yearMonth);
                sat.setStatus(1);
                List<SatisfiedControlProject> list=satisfiedControlProjectMapper.select(sat);
                if(CollectionUtils.isNotEmpty(list)){
                    //修改
                    satisf.setId(list.get(0).getId());
                    satisf.setIsEditor(1);
                    satisf.setUpdateTime(new Date());
                    satisf.setUpdateBy(tbSysUser.getUserName());
                    orsaUpda.add(satisf);

                }else {
                    //添加
                    orsaIns.add(satisf);
                }
                k+=13;
            }
        }
/*        Set<String> yueset=new LinkedHashSet<>(moyueStr);
        List<String> yuelist=new ArrayList<>(yueset);

            satisfiedControlProjectMapper.updateDelete();*/


        Set<SatisfiedControlProject> setIn=new LinkedHashSet<>(orsaIns);
        List<SatisfiedControlProject> orListIn=new ArrayList<>(setIn);


        Set<SatisfiedControlProject> setUp=new LinkedHashSet<>(orsaUpda);
        List<SatisfiedControlProject> orListUp=new ArrayList<>(setUp);

        if(CollectionUtils.isNotEmpty(orListIn)){
            int indexIn=satisfiedControlProjectMapper.insertPL(orListIn);
        }

        if(CollectionUtils.isNotEmpty(orListUp)){
            for (int i = 0; i <orListUp.size() ; i++) {
                satisfiedControlProjectMapper.updateByPrimaryKeySelective(orListUp.get(i));
            }
        }


    }
    //不满意度全国导入
    public void satisfiedDissatisfiedNationwideExcelToxls(Workbook xwb,HttpServletRequest request,HttpServletResponse response,
                                                          String fileName, String usname, String userCode, AccessToken accessToken){

        Sheet sheet = xwb.getSheetAt(3);//获取第几个页面0开始
        int sheetRowCount=sheet.getPhysicalNumberOfRows();//获取行数

        Row row = null;
        Cell cell;
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        List<SatisfiedDissatisfiedNationwide> orsaIns=new ArrayList<>();
        List<SatisfiedDissatisfiedNationwide> orsaUpda=new ArrayList<>();
        List<String> moyueStr=new ArrayList<>();
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);
        for (int j = 0; j < sheet.getPhysicalNumberOfRows(); j++) {
            row = sheet.getRow(j+1);
            if(row==null) {
                break;
            }

            for (int k = 0; k < sheet.getRow(j).getPhysicalNumberOfCells(); k++) {
                cell = row.getCell(0);
                if(cell==null) {
                    break;
                }

                cell.setCellType(CellType.STRING);
                String yearMonth=cell.getStringCellValue();
                if(StringUtils.isBlank(yearMonth)){
                    break;
                }

                cell = row.getCell(1);
                cell.setCellType(CellType.STRING);
                String seVpapr=cell.getStringCellValue();
                if(StringUtils.isBlank(seVpapr)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-车辆乱停乱放不能为空");
                }

                cell = row.getCell(2);
                cell.setCellType(CellType.STRING);
                String seLlegal=cell.getStringCellValue();
                if(StringUtils.isBlank(seLlegal)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-违章搭建不能为空");
                }

                cell = row.getCell(3);
                cell.setCellType(CellType.STRING);
                String sePet=cell.getStringCellValue();
                if(StringUtils.isBlank(sePet)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-宠物管理不能为空");
                }

                cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String seNoise=cell.getStringCellValue();
                if(StringUtils.isBlank(seNoise)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-施工噪音管控不能为空");
                }

                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String seNonresid=cell.getStringCellValue();
                if(StringUtils.isBlank(seNonresid)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-非小区施工噪音为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String seOtheroise=cell.getStringCellValue();
                if(StringUtils.isBlank(seOtheroise)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-其他噪音不能为空");
                }


                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String seCardchecking=cell.getStringCellValue();
                if(StringUtils.isBlank(seCardchecking)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-门岗查卡时间长不能为空");
                }


                cell = row.getCell(8);
                cell.setCellType(CellType.STRING);
                String seLaxcarking=cell.getStringCellValue();
                if(StringUtils.isBlank(seLaxcarking)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-门岗查卡不严不能为空");
                }

                cell = row.getCell(9);
                cell.setCellType(CellType.STRING);
                String seFireman=cell.getStringCellValue();
                if(StringUtils.isBlank(seFireman)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-消防管理不能为空");
                }

                cell = row.getCell(10);
                cell.setCellType(CellType.STRING);
                String seLlechaing=cell.getStringCellValue();
                if(StringUtils.isBlank(seLlechaing)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-违规充电不能为空");
                }

                cell = row.getCell(11);
                cell.setCellType(CellType.STRING);
                String seSense=cell.getStringCellValue();
                if(StringUtils.isBlank(seSense)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-安全感不能为空");
                }

                cell = row.getCell(12);
                cell.setCellType(CellType.STRING);
                String sePostwork=cell.getStringCellValue();
                if(StringUtils.isBlank(sePostwork)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-岗位工作纪律不能为空");
                }

                cell = row.getCell(13);
                cell.setCellType(CellType.STRING);
                String sePooratitude=cell.getStringCellValue();
                if(StringUtils.isBlank(sePooratitude)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-岗位服务态度差不能为空");
                }
                cell = row.getCell(14);
                cell.setCellType(CellType.STRING);
                String seConsciousness=cell.getStringCellValue();
                if(StringUtils.isBlank(seConsciousness)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-服务意识不能为空");
                }

                cell = row.getCell(15);
                cell.setCellType(CellType.STRING);
                String cuStafhad=cell.getStringCellValue();
                if(StringUtils.isBlank(cuStafhad)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台人员态度差不能为空");
                }

                cell = row.getCell(16);
                cell.setCellType(CellType.STRING);
                String cuFrontdesk=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrontdesk)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台业务办理不能为空");
                }

                cell = row.getCell(17);
                cell.setCellType(CellType.STRING);
                String cuHousekeeper=cell.getStringCellValue();
                if(StringUtils.isBlank(cuHousekeeper)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-不认识管家不能为空");
                }

                cell = row.getCell(18);
                cell.setCellType(CellType.STRING);
                String cuConhouse=cell.getStringCellValue();
                if(StringUtils.isBlank(cuConhouse)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-联系不上管家不能为空");
                }

                cell = row.getCell(19);
                cell.setCellType(CellType.STRING);
                String cuProblemfollow=cell.getStringCellValue();
                if(StringUtils.isBlank(cuProblemfollow)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-问题跟进不及时不能为空");
                }

                cell = row.getCell(20);
                cell.setCellType(CellType.STRING);
                String cuPoorachatide=cell.getStringCellValue();
                if(StringUtils.isBlank(cuPoorachatide)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-管家服务态度差不能为空");
                }

                cell = row.getCell(21);
                cell.setCellType(CellType.STRING);
                String cuFrequently=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrequently)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-管家更换频繁不能为空");
                }


                cell = row.getCell(22);
                cell.setCellType(CellType.STRING);
                String cuFrbujidesk=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrbujidesk)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台问题处理不及时不能为空");
                }


                cell = row.getCell(23);
                cell.setCellType(CellType.STRING);
                String grGreenwaste=cell.getStringCellValue();
                if(StringUtils.isBlank(grGreenwaste)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-绿化垃圾清运不能为空");
                }

                cell = row.getCell(24);
                cell.setCellType(CellType.STRING);
                String grMaintenance=cell.getStringCellValue();
                if(StringUtils.isBlank(grMaintenance)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-养护缺失不能为空");
                }

                cell = row.getCell(25);
                cell.setCellType(CellType.STRING);
                String grDowntrees=cell.getStringCellValue();
                if(StringUtils.isBlank(grDowntrees)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-砍伐树木不能为空");
                }

                cell = row.getCell(26);
                cell.setCellType(CellType.STRING);
                String grPlantruning=cell.getStringCellValue();
                if(StringUtils.isBlank(grPlantruning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物修剪不能为空");
                }

                cell = row.getCell(27);
                cell.setCellType(CellType.STRING);
                String grWitheeds=cell.getStringCellValue();
                if(StringUtils.isBlank(grWitheeds)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-杂草丛生不能为空");
                }

                cell = row.getCell(28);
                cell.setCellType(CellType.STRING);
                String grPlantdeath=cell.getStringCellValue();
                if(StringUtils.isBlank(grPlantdeath)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物死亡不能为空");
                }

                cell = row.getCell(29);
                cell.setCellType(CellType.STRING);
                String grLoess=cell.getStringCellValue();
                if(StringUtils.isBlank(grLoess)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-黄土裸露不能为空");
                }

                cell = row.getCell(30);
                cell.setCellType(CellType.STRING);
                String grSeedlingloss=cell.getStringCellValue();
                if(StringUtils.isBlank(grSeedlingloss)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-苗木缺失不能为空");
                }

                cell = row.getCell(31);
                cell.setCellType(CellType.STRING);
                String grFewplant=cell.getStringCellValue();
                if(StringUtils.isBlank(grFewplant)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物种类少不能为空");
                }

                cell = row.getCell(32);
                cell.setCellType(CellType.STRING);
                String grUnreasonable=cell.getStringCellValue();
                if(StringUtils.isBlank(grUnreasonable)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物搭配不合理不能为空");
                }

                cell = row.getCell(33);
                cell.setCellType(CellType.STRING);
                String grServiceimage=cell.getStringCellValue();
                if(StringUtils.isBlank(grServiceimage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-服务形象与态度不能为空");
                }

                cell = row.getCell(34);
                cell.setCellType(CellType.STRING);
                String clUnrplagacans=cell.getStringCellValue();
                if(StringUtils.isBlank(clUnrplagacans)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-垃圾桶摆放不合理不能为空");
                }

                cell = row.getCell(35);
                cell.setCellType(CellType.STRING);
                String clRemovaon=cell.getStringCellValue();
                if(StringUtils.isBlank(clRemovaon)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-垃圾清运不及时不能为空");
                }

                cell = row.getCell(36);
                cell.setCellType(CellType.STRING);
                String clOutdoorpublic=cell.getStringCellValue();
                if(StringUtils.isBlank(clOutdoorpublic)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-室外公共区域清洁不能为空");
                }

                cell = row.getCell(37);
                cell.setCellType(CellType.STRING);
                String clBuilinterior=cell.getStringCellValue();
                if(StringUtils.isBlank(clBuilinterior)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-楼宇室内清洁不能为空");
                }

                cell = row.getCell(38);
                cell.setCellType(CellType.STRING);
                String clGarcleang=cell.getStringCellValue();
                if(StringUtils.isBlank(clGarcleang)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-地下车库清洁不能为空");
                }

                cell = row.getCell(39);
                cell.setCellType(CellType.STRING);
                String clWaterscape=cell.getStringCellValue();
                if(StringUtils.isBlank(clWaterscape)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-景观水景不能为空");
                }

                cell = row.getCell(40);
                cell.setCellType(CellType.STRING);
                String clFpelimination=cell.getStringCellValue();
                if(StringUtils.isBlank(clFpelimination)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-四害消杀不能为空");
                }

                cell = row.getCell(41);
                cell.setCellType(CellType.STRING);
                String clCleanupaccu=cell.getStringCellValue();
                if(StringUtils.isBlank(clCleanupaccu)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-园区积水清理不能为空");
                }

                cell = row.getCell(42);
                cell.setCellType(CellType.STRING);
                String clServiceimage=cell.getStringCellValue();
                if(StringUtils.isBlank(clServiceimage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-服务形象与态度不能为空");
                }

                cell = row.getCell(43);
                cell.setCellType(CellType.STRING);
                String enPuicliting=cell.getStringCellValue();
                if(StringUtils.isBlank(enPuicliting)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公共照明不能为空");
                }

                cell = row.getCell(44);
                cell.setCellType(CellType.STRING);
                String enAmusement=cell.getStringCellValue();
                if(StringUtils.isBlank(enAmusement)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-游乐设施不能为空");
                }

                cell = row.getCell(45);
                cell.setCellType(CellType.STRING);
                String enElevator=cell.getStringCellValue();
                if(StringUtils.isBlank(enElevator)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-电梯不能为空");
                }

                cell = row.getCell(46);
                cell.setCellType(CellType.STRING);
                String enWaterupply=cell.getStringCellValue();
                if(StringUtils.isBlank(enWaterupply)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-供水设备不能为空");
                }

                cell = row.getCell(47);
                cell.setCellType(CellType.STRING);
                String enFireighting=cell.getStringCellValue();
                if(StringUtils.isBlank(enFireighting)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-消防设备不能为空");
                }

                cell = row.getCell(48);
                cell.setCellType(CellType.STRING);
                String enMonitoring=cell.getStringCellValue();
                if(StringUtils.isBlank(enMonitoring)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-监控系统不能为空");
                }

                cell = row.getCell(49);
                cell.setCellType(CellType.STRING);
                String enAccessconol=cell.getStringCellValue();
                if(StringUtils.isBlank(enAccessconol)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-门禁不能为空");
                }

                cell = row.getCell(50);
                cell.setCellType(CellType.STRING);
                String enRoadgate=cell.getStringCellValue();
                if(StringUtils.isBlank(enRoadgate)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-道闸不能为空");
                }

                cell = row.getCell(51);
                cell.setCellType(CellType.STRING);
                String enPublicarea=cell.getStringCellValue();
                if(StringUtils.isBlank(enPublicarea)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公区土建装修不能为空");
                }

                cell = row.getCell(52);
                cell.setCellType(CellType.STRING);
                String enDrainage=cell.getStringCellValue();
                if(StringUtils.isBlank(enDrainage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公区排水/排污不能为空");
                }

                cell = row.getCell(53);
                cell.setCellType(CellType.STRING);
                String enEquipment=cell.getStringCellValue();
                if(StringUtils.isBlank(enEquipment)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-其它设施设备不能为空");
                }

                cell = row.getCell(54);
                cell.setCellType(CellType.STRING);
                String enImageatude=cell.getStringCellValue();
                if(StringUtils.isBlank(enImageatude)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-工程岗位形象态度不能为空");
                }

                cell = row.getCell(55);
                cell.setCellType(CellType.STRING);
                String enHomemainte=cell.getStringCellValue();
                if(StringUtils.isBlank(enHomemainte)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-入户维修与服务态度不能为空");
                }


                SatisfiedDissatisfiedNationwide satisf=new SatisfiedDissatisfiedNationwide();
                if(!seVpapr.equals("/")){
                    satisf.setSeVpapr(df.format(Double.valueOf(seVpapr)));
                }else{
                    satisf.setSeVpapr("");
                }
                if(!seLlegal.equals("/")){
                    satisf.setSeLlegal(df.format(Double.valueOf(seLlegal)));
                }else{
                    satisf.setSeLlegal("");
                }
                if(!sePet.equals("/")){
                    satisf.setSePet(df.format(Double.valueOf(sePet)));
                }else{
                    satisf.setSePet("");
                }
                if(!seNoise.equals("/")){
                    satisf.setSeNoise(df.format(Double.valueOf(seNoise)));
                }else{
                    satisf.setSeNoise("");
                }
                if(!seNonresid.equals("/")){
                    satisf.setSeNonresid(df.format(Double.valueOf(seNonresid)));
                }else{
                    satisf.setSeNonresid("");
                }
                if(!seOtheroise.equals("/")){
                    satisf.setSeOtheroise(df.format(Double.valueOf(seOtheroise)));
                }else{
                    satisf.setSeOtheroise("");
                }
                if(!seCardchecking.equals("/")){
                    satisf.setSeCardchecking(df.format(Double.valueOf(seCardchecking)));
                }else{
                    satisf.setSeCardchecking("");
                }
                if(!seLaxcarking.equals("/")){
                    satisf.setSeLaxcarking(df.format(Double.valueOf(seLaxcarking)));
                }else{
                    satisf.setSeLaxcarking("");
                }
                if(!seFireman.equals("/")){
                    satisf.setSeFireman(df.format(Double.valueOf(seFireman)));
                }else{
                    satisf.setSeFireman("");
                }
                if(!seLlechaing.equals("/")){
                    satisf.setSeLlechaing(df.format(Double.valueOf(seLlechaing)));
                }else{
                    satisf.setSeLlechaing("");
                }
                if(!seSense.equals("/")){
                    satisf.setSeSense(df.format(Double.valueOf(seSense)));
                }else{
                    satisf.setSeSense("");
                }
                if(!sePostwork.equals("/")){
                    satisf.setSePostwork(df.format(Double.valueOf(sePostwork)));
                }else{
                    satisf.setSePostwork("");
                }
                if(!sePooratitude.equals("/")){
                    satisf.setSePooratitude(df.format(Double.valueOf(sePooratitude)));
                }else{
                    satisf.setSePooratitude("");
                }
                if(!seConsciousness.equals("/")){
                    satisf.setSeConsciousness(df.format(Double.valueOf(seConsciousness)));
                }else{
                    satisf.setSeConsciousness("");
                }
                if(!cuStafhad.equals("/")){
                    satisf.setCuStafhad(df.format(Double.valueOf(cuStafhad)));
                }else{
                    satisf.setCuStafhad("");
                }
                if(!cuFrontdesk.equals("/")){
                    satisf.setCuFrontdesk(df.format(Double.valueOf(cuFrontdesk)));
                }else{
                    satisf.setCuFrontdesk("");
                }
                if(!cuHousekeeper.equals("/")){
                    satisf.setCuHousekeeper(df.format(Double.valueOf(cuHousekeeper)));
                }else{
                    satisf.setCuHousekeeper("");
                }
                if(!cuConhouse.equals("/")){
                    satisf.setCuConhouse(df.format(Double.valueOf(cuConhouse)));
                }else{
                    satisf.setCuConhouse("");
                }
                if(!cuProblemfollow.equals("/")){
                    satisf.setCuProblemfollow(df.format(Double.valueOf(cuProblemfollow)));
                }else{
                    satisf.setCuProblemfollow("");
                }
                if(!cuPoorachatide.equals("/")){
                    satisf.setCuPoorachatide(df.format(Double.valueOf(cuPoorachatide)));
                }else{
                    satisf.setCuPoorachatide("");
                }
                if(!cuFrequently.equals("/")){
                    satisf.setCuFrequently(df.format(Double.valueOf(cuFrequently)));
                }else{
                    satisf.setCuFrequently("");
                }
                if(!cuFrbujidesk.equals("/")){
                    satisf.setCuFrbujidesk(df.format(Double.valueOf(cuFrbujidesk)));
                }else{
                    satisf.setCuFrbujidesk("");
                }
                if(!grGreenwaste.equals("/")){
                    satisf.setGrGreenwaste(df.format(Double.valueOf(grGreenwaste)));
                }else{
                    satisf.setGrGreenwaste("");
                }
                if(!grMaintenance.equals("/")){
                    satisf.setGrMaintenance(df.format(Double.valueOf(grMaintenance)));
                }else{
                    satisf.setGrMaintenance("");
                }
                if(!grDowntrees.equals("/")){
                    satisf.setGrDowntrees(df.format(Double.valueOf(grDowntrees)));
                }else{
                    satisf.setGrDowntrees("");
                }
                if(!grPlantruning.equals("/")){
                    satisf.setGrPlantruning(df.format(Double.valueOf(grPlantruning)));
                }else{
                    satisf.setGrPlantruning("");
                }
                if(!grWitheeds.equals("/")){
                    satisf.setGrWitheeds(df.format(Double.valueOf(grWitheeds)));
                }else{
                    satisf.setGrWitheeds("");
                }
                if(!grPlantdeath.equals("/")){
                    satisf.setGrPlantdeath(df.format(Double.valueOf(grPlantdeath)));
                }else{
                    satisf.setGrPlantdeath("");
                }
                if(!grLoess.equals("/")){
                    satisf.setGrLoess(df.format(Double.valueOf(grLoess)));
                }else{
                    satisf.setGrLoess("");
                }
                if(!grSeedlingloss.equals("/")){
                    satisf.setGrSeedlingloss(df.format(Double.valueOf(grSeedlingloss)));
                }else{
                    satisf.setGrSeedlingloss("");
                }
                if(!grFewplant.equals("/")){
                    satisf.setGrFewplant(df.format(Double.valueOf(grFewplant)));
                }else{
                    satisf.setGrFewplant("");
                }
                if(!grUnreasonable.equals("/")){
                    satisf.setGrUnreasonable(df.format(Double.valueOf(grUnreasonable)));
                }else{
                    satisf.setGrUnreasonable("");
                }
                if(!grServiceimage.equals("/")){
                    satisf.setGrServiceimage(df.format(Double.valueOf(grServiceimage)));
                }else{
                    satisf.setGrServiceimage("");
                }
                if(!clUnrplagacans.equals("/")){
                    satisf.setClUnrplagacans(df.format(Double.valueOf(clUnrplagacans)));
                }else{
                    satisf.setClUnrplagacans("");
                }
                if(!clRemovaon.equals("/")){
                    satisf.setClRemovaon(df.format(Double.valueOf(clRemovaon)));
                }else{
                    satisf.setClRemovaon("");
                }
                if(!clOutdoorpublic.equals("/")){
                    satisf.setClOutdoorpublic(df.format(Double.valueOf(clOutdoorpublic)));
                }else{
                    satisf.setClOutdoorpublic("");
                }
                if(!clBuilinterior.equals("/")){
                    satisf.setClBuilinterior(df.format(Double.valueOf(clBuilinterior)));
                }else{
                    satisf.setClBuilinterior("");
                }
                if(!clGarcleang.equals("/")){
                    satisf.setClGarcleang(df.format(Double.valueOf(clGarcleang)));
                }else{
                    satisf.setClGarcleang("");
                }
                if(!clWaterscape.equals("/")){
                    satisf.setClWaterscape(df.format(Double.valueOf(clWaterscape)));
                }else{
                    satisf.setClWaterscape("");
                }
                if(!clFpelimination.equals("/")){
                    satisf.setClFpelimination(df.format(Double.valueOf(clFpelimination)));
                }else{
                    satisf.setClFpelimination("");
                }
                if(!clCleanupaccu.equals("/")){
                    satisf.setClCleanupaccu(df.format(Double.valueOf(clCleanupaccu)));
                }else{
                    satisf.setClCleanupaccu("");
                }
                if(!clServiceimage.equals("/")){
                    satisf.setClServiceimage(df.format(Double.valueOf(clServiceimage)));
                }else{
                    satisf.setClServiceimage("");
                }
                if(!enPuicliting.equals("/")){
                    satisf.setEnPuicliting(df.format(Double.valueOf(enPuicliting)));
                }else{
                    satisf.setEnPuicliting("");
                }
                if(!enAmusement.equals("/")){
                    satisf.setEnAmusement(df.format(Double.valueOf(enAmusement)));
                }else{
                    satisf.setEnAmusement("");
                }
                if(!enElevator.equals("/")){
                    satisf.setEnElevator(df.format(Double.valueOf(enElevator)));
                }else{
                    satisf.setEnElevator("");
                }
                if(!enWaterupply.equals("/")){
                    satisf.setEnWaterupply(df.format(Double.valueOf(enWaterupply)));
                }else{
                    satisf.setEnWaterupply("");
                }
                if(!enFireighting.equals("/")){
                    satisf.setEnFireighting(df.format(Double.valueOf(enFireighting)));
                }else{
                    satisf.setEnFireighting("");
                }
                if(!enMonitoring.equals("/")){
                    satisf.setEnMonitoring(df.format(Double.valueOf(enMonitoring)));
                }else{
                    satisf.setEnMonitoring("");
                }
                if(!enAccessconol.equals("/")){
                    satisf.setEnAccessconol(df.format(Double.valueOf(enAccessconol)));
                }else{
                    satisf.setEnAccessconol("");
                }
                if(!enRoadgate.equals("/")){
                    satisf.setEnRoadgate(df.format(Double.valueOf(enRoadgate)));
                }else{
                    satisf.setEnRoadgate("");
                }
                if(!enPublicarea.equals("/")){
                    satisf.setEnPublicarea(df.format(Double.valueOf(enPublicarea)));
                }else{
                    satisf.setEnPublicarea("");
                }
                if(!enDrainage.equals("/")){
                    satisf.setEnDrainage(df.format(Double.valueOf(enDrainage)));
                }else{
                    satisf.setEnDrainage("");
                }
                if(!enEquipment.equals("/")){
                    satisf.setEnEquipment(df.format(Double.valueOf(enEquipment)));
                }else{
                    satisf.setEnEquipment("");
                }
                if(!enImageatude.equals("/")){
                    satisf.setEnImageatude(df.format(Double.valueOf(enImageatude)));
                }else{
                    satisf.setEnImageatude("");
                }
                if(!enHomemainte.equals("/")){
                    satisf.setEnHomemainte(df.format(Double.valueOf(enHomemainte)));
                }else{
                    satisf.setEnHomemainte("");
                }
                satisf.setYearMonth(yearMonth);
                satisf.setStatus(1);
                satisf.setCreateBy(userCode);
                satisf.setIsEditor(0);
             /*   moyueStr.add(yearMonth);
                orsaIns.add(satisf);*/

               SatisfiedDissatisfiedNationwide sat=new SatisfiedDissatisfiedNationwide();
                sat.setYearMonth(yearMonth);
                sat.setStatus(1);
                List<SatisfiedDissatisfiedNationwide> list=satisfiedDissatisfiedNationwideMapper.select(sat);
                if(CollectionUtils.isNotEmpty(list)){
                    //修改
                    satisf.setId(list.get(0).getId());
                    satisf.setIsEditor(1);
                    satisf.setUpdateTime(new Date());
                    satisf.setUpdateBy(tbSysUser.getUserName());
                    orsaUpda.add(satisf);
                }else {
                    //添加
                    orsaIns.add(satisf);
                }
                k+=55;
            }
        }
/*        Set<String> yueset=new LinkedHashSet<>(moyueStr);
        List<String> yuelist=new ArrayList<>(yueset);

            satisfiedDissatisfiedNationwideMapper.updateDelete();*/


        Set<SatisfiedDissatisfiedNationwide> setIn=new LinkedHashSet<>(orsaIns);
        List<SatisfiedDissatisfiedNationwide> orListIn=new ArrayList<>(setIn);


        Set<SatisfiedDissatisfiedNationwide> setUp=new LinkedHashSet<>(orsaUpda);
        List<SatisfiedDissatisfiedNationwide> orListUp=new ArrayList<>(setUp);

        if(CollectionUtils.isNotEmpty(orListIn)){
            int indexIn=satisfiedDissatisfiedNationwideMapper.insertPL(orListIn);
        }

        if(CollectionUtils.isNotEmpty(orListUp)){
            for (int i = 0; i <orListUp.size() ; i++) {
                satisfiedDissatisfiedNationwideMapper.updateByPrimaryKeySelective(orListUp.get(i));
            }
        }



    }
    //不满意度区域导入
    public void satisfiedDissatisfiedRegionExcelToxls(Workbook xwb,HttpServletRequest request,HttpServletResponse response,
                                                      String fileName, String usname, String userCode, AccessToken accessToken){
        Sheet sheet = xwb.getSheetAt(4);//获取第几个页面0开始
        int sheetRowCount=sheet.getPhysicalNumberOfRows();//获取行数

        Row row = null;
        Cell cell;
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        List<SatisfiedDissatisfiedRegion> orsaIns=new ArrayList<>();
        List<SatisfiedDissatisfiedRegion> orsaUpda=new ArrayList<>();
        List<String> moyueStr=new ArrayList<>();
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);
        for (int j = 0; j < sheet.getPhysicalNumberOfRows(); j++) {
            row = sheet.getRow(j+1);
            if(row==null) {
                break;
            }

            for (int k = 0; k < sheet.getRow(j).getPhysicalNumberOfCells(); k++) {
                cell = row.getCell(0);
                if(cell==null) {
                    break;
                }


                cell.setCellType(CellType.STRING);
                String yearMonth=cell.getStringCellValue();
                if(StringUtils.isBlank(yearMonth)){
                    break;
                }

                cell = row.getCell(1);
                cell.setCellType(CellType.STRING);
                String orgCode=cell.getStringCellValue();
                if(StringUtils.isBlank(orgCode)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域ID不能为空");
                }

                cell = row.getCell(2);
                cell.setCellType(CellType.STRING);
                String orgName=cell.getStringCellValue();
                if(StringUtils.isBlank(orgName)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域名称不能为空");
                }

                List<ProjectListVO> projectList = tbSysOrganMapper.findProjectSatisfiedDaoqu(orgCode,orgName);
                if(CollectionUtils.isEmpty(projectList)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域编号或者名称有误，请确认！！！");
                }


                cell = row.getCell(3);
                cell.setCellType(CellType.STRING);
                String seVpapr=cell.getStringCellValue();
                if(StringUtils.isBlank(seVpapr)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-车辆乱停乱放不能为空");
                }

                cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String seLlegal=cell.getStringCellValue();
                if(StringUtils.isBlank(seLlegal)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-违章搭建不能为空");
                }

                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String sePet=cell.getStringCellValue();
                if(StringUtils.isBlank(sePet)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-宠物管理不能为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String seNoise=cell.getStringCellValue();
                if(StringUtils.isBlank(seNoise)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-施工噪音管控不能为空");
                }

                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String seNonresid=cell.getStringCellValue();
                if(StringUtils.isBlank(seNonresid)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-非小区施工噪音为空");
                }

                cell = row.getCell(8);
                cell.setCellType(CellType.STRING);
                String seOtheroise=cell.getStringCellValue();
                if(StringUtils.isBlank(seOtheroise)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-其他噪音不能为空");
                }


                cell = row.getCell(9);
                cell.setCellType(CellType.STRING);
                String seCardchecking=cell.getStringCellValue();
                if(StringUtils.isBlank(seCardchecking)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-门岗查卡时间长不能为空");
                }


                cell = row.getCell(10);
                cell.setCellType(CellType.STRING);
                String seLaxcarking=cell.getStringCellValue();
                if(StringUtils.isBlank(seLaxcarking)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-门岗查卡不严不能为空");
                }

                cell = row.getCell(11);
                cell.setCellType(CellType.STRING);
                String seFireman=cell.getStringCellValue();
                if(StringUtils.isBlank(seFireman)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-消防管理不能为空");
                }

                cell = row.getCell(12);
                cell.setCellType(CellType.STRING);
                String seLlechaing=cell.getStringCellValue();
                if(StringUtils.isBlank(seLlechaing)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-违规充电不能为空");
                }

                cell = row.getCell(13);
                cell.setCellType(CellType.STRING);
                String seSense=cell.getStringCellValue();
                if(StringUtils.isBlank(seSense)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-安全感不能为空");
                }

                cell = row.getCell(14);
                cell.setCellType(CellType.STRING);
                String sePostwork=cell.getStringCellValue();
                if(StringUtils.isBlank(sePostwork)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-岗位工作纪律不能为空");
                }

                cell = row.getCell(15);
                cell.setCellType(CellType.STRING);
                String sePooratitude=cell.getStringCellValue();
                if(StringUtils.isBlank(sePooratitude)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-岗位服务态度差不能为空");
                }
                cell = row.getCell(16);
                cell.setCellType(CellType.STRING);
                String seConsciousness=cell.getStringCellValue();
                if(StringUtils.isBlank(seConsciousness)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-服务意识不能为空");
                }

                cell = row.getCell(17);
                cell.setCellType(CellType.STRING);
                String cuStafhad=cell.getStringCellValue();
                if(StringUtils.isBlank(cuStafhad)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台人员态度差不能为空");
                }

                cell = row.getCell(18);
                cell.setCellType(CellType.STRING);
                String cuFrontdesk=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrontdesk)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台业务办理不能为空");
                }

                cell = row.getCell(19);
                cell.setCellType(CellType.STRING);
                String cuHousekeeper=cell.getStringCellValue();
                if(StringUtils.isBlank(cuHousekeeper)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-不认识管家不能为空");
                }

                cell = row.getCell(20);
                cell.setCellType(CellType.STRING);
                String cuConhouse=cell.getStringCellValue();
                if(StringUtils.isBlank(cuConhouse)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-联系不上管家不能为空");
                }

                cell = row.getCell(21);
                cell.setCellType(CellType.STRING);
                String cuProblemfollow=cell.getStringCellValue();
                if(StringUtils.isBlank(cuProblemfollow)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-问题跟进不及时不能为空");
                }

                cell = row.getCell(22);
                cell.setCellType(CellType.STRING);
                String cuPoorachatide=cell.getStringCellValue();
                if(StringUtils.isBlank(cuPoorachatide)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-管家服务态度差不能为空");
                }

                cell = row.getCell(23);
                cell.setCellType(CellType.STRING);
                String cuFrequently=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrequently)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-管家更换频繁不能为空");
                }


                cell = row.getCell(24);
                cell.setCellType(CellType.STRING);
                String cuFrbujidesk=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrbujidesk)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台问题处理不及时不能为空");
                }


                cell = row.getCell(25);
                cell.setCellType(CellType.STRING);
                String grGreenwaste=cell.getStringCellValue();
                if(StringUtils.isBlank(grGreenwaste)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-绿化垃圾清运不能为空");
                }

                cell = row.getCell(26);
                cell.setCellType(CellType.STRING);
                String grMaintenance=cell.getStringCellValue();
                if(StringUtils.isBlank(grMaintenance)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-养护缺失不能为空");
                }

                cell = row.getCell(27);
                cell.setCellType(CellType.STRING);
                String grDowntrees=cell.getStringCellValue();
                if(StringUtils.isBlank(grDowntrees)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-砍伐树木不能为空");
                }

                cell = row.getCell(28);
                cell.setCellType(CellType.STRING);
                String grPlantruning=cell.getStringCellValue();
                if(StringUtils.isBlank(grPlantruning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物修剪不能为空");
                }

                cell = row.getCell(29);
                cell.setCellType(CellType.STRING);
                String grWitheeds=cell.getStringCellValue();
                if(StringUtils.isBlank(grWitheeds)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-杂草丛生不能为空");
                }

                cell = row.getCell(30);
                cell.setCellType(CellType.STRING);
                String grPlantdeath=cell.getStringCellValue();
                if(StringUtils.isBlank(grPlantdeath)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物死亡不能为空");
                }

                cell = row.getCell(31);
                cell.setCellType(CellType.STRING);
                String grLoess=cell.getStringCellValue();
                if(StringUtils.isBlank(grLoess)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-黄土裸露不能为空");
                }

                cell = row.getCell(32);
                cell.setCellType(CellType.STRING);
                String grSeedlingloss=cell.getStringCellValue();
                if(StringUtils.isBlank(grSeedlingloss)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-苗木缺失不能为空");
                }

                cell = row.getCell(33);
                cell.setCellType(CellType.STRING);
                String grFewplant=cell.getStringCellValue();
                if(StringUtils.isBlank(grFewplant)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物种类少不能为空");
                }

                cell = row.getCell(34);
                cell.setCellType(CellType.STRING);
                String grUnreasonable=cell.getStringCellValue();
                if(StringUtils.isBlank(grUnreasonable)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物搭配不合理不能为空");
                }

                cell = row.getCell(35);
                cell.setCellType(CellType.STRING);
                String grServiceimage=cell.getStringCellValue();
                if(StringUtils.isBlank(grServiceimage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-服务形象与态度不能为空");
                }

                cell = row.getCell(36);
                cell.setCellType(CellType.STRING);
                String clUnrplagacans=cell.getStringCellValue();
                if(StringUtils.isBlank(clUnrplagacans)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-垃圾桶摆放不合理不能为空");
                }

                cell = row.getCell(37);
                cell.setCellType(CellType.STRING);
                String clRemovaon=cell.getStringCellValue();
                if(StringUtils.isBlank(clRemovaon)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-垃圾清运不及时不能为空");
                }

                cell = row.getCell(38);
                cell.setCellType(CellType.STRING);
                String clOutdoorpublic=cell.getStringCellValue();
                if(StringUtils.isBlank(clOutdoorpublic)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-室外公共区域清洁不能为空");
                }

                cell = row.getCell(39);
                cell.setCellType(CellType.STRING);
                String clBuilinterior=cell.getStringCellValue();
                if(StringUtils.isBlank(clBuilinterior)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-楼宇室内清洁不能为空");
                }

                cell = row.getCell(40);
                cell.setCellType(CellType.STRING);
                String clGarcleang=cell.getStringCellValue();
                if(StringUtils.isBlank(clGarcleang)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-地下车库清洁不能为空");
                }

                cell = row.getCell(41);
                cell.setCellType(CellType.STRING);
                String clWaterscape=cell.getStringCellValue();
                if(StringUtils.isBlank(clWaterscape)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-景观水景不能为空");
                }

                cell = row.getCell(42);
                cell.setCellType(CellType.STRING);
                String clFpelimination=cell.getStringCellValue();
                if(StringUtils.isBlank(clFpelimination)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-四害消杀不能为空");
                }

                cell = row.getCell(43);
                cell.setCellType(CellType.STRING);
                String clCleanupaccu=cell.getStringCellValue();
                if(StringUtils.isBlank(clCleanupaccu)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-园区积水清理不能为空");
                }

                cell = row.getCell(44);
                cell.setCellType(CellType.STRING);
                String clServiceimage=cell.getStringCellValue();
                if(StringUtils.isBlank(clServiceimage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-服务形象与态度不能为空");
                }

                cell = row.getCell(45);
                cell.setCellType(CellType.STRING);
                String enPuicliting=cell.getStringCellValue();
                if(StringUtils.isBlank(enPuicliting)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公共照明不能为空");
                }

                cell = row.getCell(46);
                cell.setCellType(CellType.STRING);
                String enAmusement=cell.getStringCellValue();
                if(StringUtils.isBlank(enAmusement)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-游乐设施不能为空");
                }

                cell = row.getCell(47);
                cell.setCellType(CellType.STRING);
                String enElevator=cell.getStringCellValue();
                if(StringUtils.isBlank(enElevator)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-电梯不能为空");
                }

                cell = row.getCell(48);
                cell.setCellType(CellType.STRING);
                String enWaterupply=cell.getStringCellValue();
                if(StringUtils.isBlank(enWaterupply)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-供水设备不能为空");
                }

                cell = row.getCell(49);
                cell.setCellType(CellType.STRING);
                String enFireighting=cell.getStringCellValue();
                if(StringUtils.isBlank(enFireighting)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-消防设备不能为空");
                }

                cell = row.getCell(50);
                cell.setCellType(CellType.STRING);
                String enMonitoring=cell.getStringCellValue();
                if(StringUtils.isBlank(enMonitoring)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-监控系统不能为空");
                }

                cell = row.getCell(51);
                cell.setCellType(CellType.STRING);
                String enAccessconol=cell.getStringCellValue();
                if(StringUtils.isBlank(enAccessconol)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-门禁不能为空");
                }

                cell = row.getCell(52);
                cell.setCellType(CellType.STRING);
                String enRoadgate=cell.getStringCellValue();
                if(StringUtils.isBlank(enRoadgate)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-道闸不能为空");
                }

                cell = row.getCell(53);
                cell.setCellType(CellType.STRING);
                String enPublicarea=cell.getStringCellValue();
                if(StringUtils.isBlank(enPublicarea)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公区土建装修不能为空");
                }

                cell = row.getCell(54);
                cell.setCellType(CellType.STRING);
                String enDrainage=cell.getStringCellValue();
                if(StringUtils.isBlank(enDrainage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公区排水/排污不能为空");
                }

                cell = row.getCell(55);
                cell.setCellType(CellType.STRING);
                String enEquipment=cell.getStringCellValue();
                if(StringUtils.isBlank(enEquipment)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-其它设施设备不能为空");
                }

                cell = row.getCell(56);
                cell.setCellType(CellType.STRING);
                String enImageatude=cell.getStringCellValue();
                if(StringUtils.isBlank(enImageatude)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-工程岗位形象态度不能为空");
                }

                cell = row.getCell(57);
                cell.setCellType(CellType.STRING);
                String enHomemainte=cell.getStringCellValue();
                if(StringUtils.isBlank(enHomemainte)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-入户维修与服务态度不能为空");
                }


                SatisfiedDissatisfiedRegion satisf=new SatisfiedDissatisfiedRegion();
                satisf.setOrgCode(orgCode);
                satisf.setOrgName(orgName);
                if(!seVpapr.equals("/")){
                    satisf.setSeVpapr(df.format(Double.valueOf(seVpapr)));
                }else{
                    satisf.setSeVpapr("");
                }
                if(!seLlegal.equals("/")){
                    satisf.setSeLlegal(df.format(Double.valueOf(seLlegal)));
                }else{
                    satisf.setSeLlegal("");
                }
                if(!sePet.equals("/")){
                    satisf.setSePet(df.format(Double.valueOf(sePet)));
                }else{
                    satisf.setSePet("");
                }
                if(!seNoise.equals("/")){
                    satisf.setSeNoise(df.format(Double.valueOf(seNoise)));
                }else{
                    satisf.setSeNoise("");
                }
                if(!seNonresid.equals("/")){
                    satisf.setSeNonresid(df.format(Double.valueOf(seNonresid)));
                }else{
                    satisf.setSeNonresid("");
                }
                if(!seOtheroise.equals("/")){
                    satisf.setSeOtheroise(df.format(Double.valueOf(seOtheroise)));
                }else{
                    satisf.setSeOtheroise("");
                }
                if(!seCardchecking.equals("/")){
                    satisf.setSeCardchecking(df.format(Double.valueOf(seCardchecking)));
                }else{
                    satisf.setSeCardchecking("");
                }
                if(!seLaxcarking.equals("/")){
                    satisf.setSeLaxcarking(df.format(Double.valueOf(seLaxcarking)));
                }else{
                    satisf.setSeLaxcarking("");
                }
                if(!seFireman.equals("/")){
                    satisf.setSeFireman(df.format(Double.valueOf(seFireman)));
                }else{
                    satisf.setSeFireman("");
                }
                if(!seLlechaing.equals("/")){
                    satisf.setSeLlechaing(df.format(Double.valueOf(seLlechaing)));
                }else{
                    satisf.setSeLlechaing("");
                }
                if(!seSense.equals("/")){
                    satisf.setSeSense(df.format(Double.valueOf(seSense)));
                }else{
                    satisf.setSeSense("");
                }
                if(!sePostwork.equals("/")){
                    satisf.setSePostwork(df.format(Double.valueOf(sePostwork)));
                }else{
                    satisf.setSePostwork("");
                }
                if(!sePooratitude.equals("/")){
                    satisf.setSePooratitude(df.format(Double.valueOf(sePooratitude)));
                }else{
                    satisf.setSePooratitude("");
                }
                if(!seConsciousness.equals("/")){
                    satisf.setSeConsciousness(df.format(Double.valueOf(seConsciousness)));
                }else{
                    satisf.setSeConsciousness("");
                }
                if(!cuStafhad.equals("/")){
                    satisf.setCuStafhad(df.format(Double.valueOf(cuStafhad)));
                }else{
                    satisf.setCuStafhad("");
                }
                if(!cuFrontdesk.equals("/")){
                    satisf.setCuFrontdesk(df.format(Double.valueOf(cuFrontdesk)));
                }else{
                    satisf.setCuFrontdesk("");
                }
                if(!cuHousekeeper.equals("/")){
                    satisf.setCuHousekeeper(df.format(Double.valueOf(cuHousekeeper)));
                }else{
                    satisf.setCuHousekeeper("");
                }
                if(!cuConhouse.equals("/")){
                    satisf.setCuConhouse(df.format(Double.valueOf(cuConhouse)));
                }else{
                    satisf.setCuConhouse("");
                }
                if(!cuProblemfollow.equals("/")){
                    satisf.setCuProblemfollow(df.format(Double.valueOf(cuProblemfollow)));
                }else{
                    satisf.setCuProblemfollow("");
                }
                if(!cuPoorachatide.equals("/")){
                    satisf.setCuPoorachatide(df.format(Double.valueOf(cuPoorachatide)));
                }else{
                    satisf.setCuPoorachatide("");
                }
                if(!cuFrequently.equals("/")){
                    satisf.setCuFrequently(df.format(Double.valueOf(cuFrequently)));
                }else{
                    satisf.setCuFrequently("");
                }
                if(!cuFrbujidesk.equals("/")){
                    satisf.setCuFrbujidesk(df.format(Double.valueOf(cuFrbujidesk)));
                }else{
                    satisf.setCuFrbujidesk("");
                }
                if(!grGreenwaste.equals("/")){
                    satisf.setGrGreenwaste(df.format(Double.valueOf(grGreenwaste)));
                }else{
                    satisf.setGrGreenwaste("");
                }
                if(!grMaintenance.equals("/")){
                    satisf.setGrMaintenance(df.format(Double.valueOf(grMaintenance)));
                }else{
                    satisf.setGrMaintenance("");
                }
                if(!grDowntrees.equals("/")){
                    satisf.setGrDowntrees(df.format(Double.valueOf(grDowntrees)));
                }else{
                    satisf.setGrDowntrees("");
                }
                if(!grPlantruning.equals("/")){
                    satisf.setGrPlantruning(df.format(Double.valueOf(grPlantruning)));
                }else{
                    satisf.setGrPlantruning("");
                }
                if(!grWitheeds.equals("/")){
                    satisf.setGrWitheeds(df.format(Double.valueOf(grWitheeds)));
                }else{
                    satisf.setGrWitheeds("");
                }
                if(!grPlantdeath.equals("/")){
                    satisf.setGrPlantdeath(df.format(Double.valueOf(grPlantdeath)));
                }else{
                    satisf.setGrPlantdeath("");
                }
                if(!grLoess.equals("/")){
                    satisf.setGrLoess(df.format(Double.valueOf(grLoess)));
                }else{
                    satisf.setGrLoess("");
                }
                if(!grSeedlingloss.equals("/")){
                    satisf.setGrSeedlingloss(df.format(Double.valueOf(grSeedlingloss)));
                }else{
                    satisf.setGrSeedlingloss("");
                }
                if(!grFewplant.equals("/")){
                    satisf.setGrFewplant(df.format(Double.valueOf(grFewplant)));
                }else{
                    satisf.setGrFewplant("");
                }
                if(!grUnreasonable.equals("/")){
                    satisf.setGrUnreasonable(df.format(Double.valueOf(grUnreasonable)));
                }else{
                    satisf.setGrUnreasonable("");
                }
                if(!grServiceimage.equals("/")){
                    satisf.setGrServiceimage(df.format(Double.valueOf(grServiceimage)));
                }else{
                    satisf.setGrServiceimage("");
                }
                if(!clUnrplagacans.equals("/")){
                    satisf.setClUnrplagacans(df.format(Double.valueOf(clUnrplagacans)));
                }else{
                    satisf.setClUnrplagacans("");
                }
                if(!clRemovaon.equals("/")){
                    satisf.setClRemovaon(df.format(Double.valueOf(clRemovaon)));
                }else{
                    satisf.setClRemovaon("");
                }
                if(!clOutdoorpublic.equals("/")){
                    satisf.setClOutdoorpublic(df.format(Double.valueOf(clOutdoorpublic)));
                }else{
                    satisf.setClOutdoorpublic("");
                }
                if(!clBuilinterior.equals("/")){
                    satisf.setClBuilinterior(df.format(Double.valueOf(clBuilinterior)));
                }else{
                    satisf.setClBuilinterior("");
                }
                if(!clGarcleang.equals("/")){
                    satisf.setClGarcleang(df.format(Double.valueOf(clGarcleang)));
                }else{
                    satisf.setClGarcleang("");
                }
                if(!clWaterscape.equals("/")){
                    satisf.setClWaterscape(df.format(Double.valueOf(clWaterscape)));
                }else{
                    satisf.setClWaterscape("");
                }
                if(!clFpelimination.equals("/")){
                    satisf.setClFpelimination(df.format(Double.valueOf(clFpelimination)));
                }else{
                    satisf.setClFpelimination("");
                }
                if(!clCleanupaccu.equals("/")){
                    satisf.setClCleanupaccu(df.format(Double.valueOf(clCleanupaccu)));
                }else{
                    satisf.setClCleanupaccu("");
                }
                if(!clServiceimage.equals("/")){
                    satisf.setClServiceimage(df.format(Double.valueOf(clServiceimage)));
                }else{
                    satisf.setClServiceimage("");
                }
                if(!enPuicliting.equals("/")){
                    satisf.setEnPuicliting(df.format(Double.valueOf(enPuicliting)));
                }else{
                    satisf.setEnPuicliting("");
                }
                if(!enAmusement.equals("/")){
                    satisf.setEnAmusement(df.format(Double.valueOf(enAmusement)));
                }else{
                    satisf.setEnAmusement("");
                }
                if(!enElevator.equals("/")){
                    satisf.setEnElevator(df.format(Double.valueOf(enElevator)));
                }else{
                    satisf.setEnElevator("");
                }
                if(!enWaterupply.equals("/")){
                    satisf.setEnWaterupply(df.format(Double.valueOf(enWaterupply)));
                }else{
                    satisf.setEnWaterupply("");
                }
                if(!enFireighting.equals("/")){
                    satisf.setEnFireighting(df.format(Double.valueOf(enFireighting)));
                }else{
                    satisf.setEnFireighting("");
                }
                if(!enMonitoring.equals("/")){
                    satisf.setEnMonitoring(df.format(Double.valueOf(enMonitoring)));
                }else{
                    satisf.setEnMonitoring("");
                }
                if(!enAccessconol.equals("/")){
                    satisf.setEnAccessconol(df.format(Double.valueOf(enAccessconol)));
                }else{
                    satisf.setEnAccessconol("");
                }
                if(!enRoadgate.equals("/")){
                    satisf.setEnRoadgate(df.format(Double.valueOf(enRoadgate)));
                }else{
                    satisf.setEnRoadgate("");
                }
                if(!enPublicarea.equals("/")){
                    satisf.setEnPublicarea(df.format(Double.valueOf(enPublicarea)));
                }else{
                    satisf.setEnPublicarea("");
                }
                if(!enDrainage.equals("/")){
                    satisf.setEnDrainage(df.format(Double.valueOf(enDrainage)));
                }else{
                    satisf.setEnDrainage("");
                }
                if(!enEquipment.equals("/")){
                    satisf.setEnEquipment(df.format(Double.valueOf(enEquipment)));
                }else{
                    satisf.setEnEquipment("");
                }
                if(!enImageatude.equals("/")){
                    satisf.setEnImageatude(df.format(Double.valueOf(enImageatude)));
                }else{
                    satisf.setEnImageatude("");
                }
                if(!enHomemainte.equals("/")){
                    satisf.setEnHomemainte(df.format(Double.valueOf(enHomemainte)));
                }else{
                    satisf.setEnHomemainte("");
                }
                satisf.setYearMonth(yearMonth);
                satisf.setStatus(1);
                satisf.setCreateBy(userCode);
                satisf.setIsEditor(0);
            /*    moyueStr.add(yearMonth);
                orsaIns.add(satisf);*/
                SatisfiedDissatisfiedRegion sat=new SatisfiedDissatisfiedRegion();
                sat.setOrgCode(orgCode);
                sat.setYearMonth(yearMonth);
                sat.setStatus(1);
                List<SatisfiedDissatisfiedRegion> list=satisfiedDissatisfiedRegionMapper.select(sat);
                if(CollectionUtils.isNotEmpty(list)){
                    //修改
                    satisf.setId(list.get(0).getId());
                    satisf.setIsEditor(1);
                    satisf.setUpdateTime(new Date());
                    satisf.setUpdateBy(tbSysUser.getUserName());
                    orsaUpda.add(satisf);
                }else {
                    //添加
                    orsaIns.add(satisf);
                }
                k+=57;
            }
        }
  /*      Set<String> yueset=new LinkedHashSet<>(moyueStr);
        List<String> yuelist=new ArrayList<>(yueset);

            satisfiedDissatisfiedRegionMapper.updateDelete();*/


        Set<SatisfiedDissatisfiedRegion> setIn=new LinkedHashSet<>(orsaIns);
        List<SatisfiedDissatisfiedRegion> orListIn=new ArrayList<>(setIn);


        Set<SatisfiedDissatisfiedRegion> setUp=new LinkedHashSet<>(orsaUpda);
        List<SatisfiedDissatisfiedRegion> orListUp=new ArrayList<>(setUp);

        if(CollectionUtils.isNotEmpty(orListIn)){
            int indexIn=satisfiedDissatisfiedRegionMapper.insertPL(orListIn);
        }

        if(CollectionUtils.isNotEmpty(orListUp)){
            for (int i = 0; i <orListUp.size() ; i++) {
                satisfiedDissatisfiedRegionMapper.updateByPrimaryKeySelective(orListUp.get(i));
            }
        }

    }
    //不满意度项目导入
    public void satisfiedDissatisfiedProjectExcelToxls(Workbook xwb,HttpServletRequest request,HttpServletResponse response,
                                                       String fileName, String usname, String userCode, AccessToken accessToken){
        Sheet sheet = xwb.getSheetAt(5);//获取第几个页面0开始
        int sheetRowCount=sheet.getPhysicalNumberOfRows();//获取行数

        Row row = null;
        Cell cell;
        TbSysUser tbSysUser = tbSysUserMapper.findByUserCodeNew(accessToken.getUserCode());
        List<SatisfiedDissatisfiedProject> orsaIns=new ArrayList<>();
        List<SatisfiedDissatisfiedProject> orsaUpda=new ArrayList<>();
        List<String> moyueStr=new ArrayList<>();
        NumberFormat df = NumberFormat.getNumberInstance();
        df.setMaximumFractionDigits(5);
        for (int j = 0; j < sheet.getPhysicalNumberOfRows(); j++) {
            row = sheet.getRow(j+1);
            if(row==null) {
                break;
            }

            for (int k = 0; k < sheet.getRow(j).getPhysicalNumberOfCells(); k++) {
                cell = row.getCell(0);
                if(cell==null) {
                    break;
                }


                cell.setCellType(CellType.STRING);
                String yearMonth=cell.getStringCellValue();
                if(StringUtils.isBlank(yearMonth)){
                    break;
                }

                cell = row.getCell(1);
                cell.setCellType(CellType.STRING);
                String commCode=cell.getStringCellValue();
                if(StringUtils.isBlank(commCode)){
                    throw new ServiceException("第" + (j + 2) + "行" + "项目ID不能为空");
                }

                cell = row.getCell(2);
                cell.setCellType(CellType.STRING);
                String orgName=cell.getStringCellValue();
                if(StringUtils.isBlank(orgName)){
                    throw new ServiceException("第" + (j + 2) + "行" + "区域名称不能为空");
                }

                cell = row.getCell(3);
                cell.setCellType(CellType.STRING);
                String commName=cell.getStringCellValue();
                if(StringUtils.isBlank(commName)){
                    throw new ServiceException("第" + (j + 2) + "行" + "项目名称不能为空");
                }

                List<ProjectListVO> projectList = tbSysOrganMapper.findProjectSatisfiedDaoxiangmu(commCode,orgName,commName);
                if(CollectionUtils.isEmpty(projectList)){
                    throw new ServiceException("第" + (j + 2) + "行" + "项目编号或者名称有误，请确认！！！");
                }


                cell = row.getCell(4);
                cell.setCellType(CellType.STRING);
                String seVpapr=cell.getStringCellValue();
                if(StringUtils.isBlank(seVpapr)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-车辆乱停乱放不能为空");
                }

                cell = row.getCell(5);
                cell.setCellType(CellType.STRING);
                String seLlegal=cell.getStringCellValue();
                if(StringUtils.isBlank(seLlegal)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-违章搭建不能为空");
                }

                cell = row.getCell(6);
                cell.setCellType(CellType.STRING);
                String sePet=cell.getStringCellValue();
                if(StringUtils.isBlank(sePet)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-宠物管理不能为空");
                }

                cell = row.getCell(7);
                cell.setCellType(CellType.STRING);
                String seNoise=cell.getStringCellValue();
                if(StringUtils.isBlank(seNoise)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-施工噪音管控不能为空");
                }

                cell = row.getCell(8);
                cell.setCellType(CellType.STRING);
                String seNonresid=cell.getStringCellValue();
                if(StringUtils.isBlank(seNonresid)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-非小区施工噪音为空");
                }

                cell = row.getCell(9);
                cell.setCellType(CellType.STRING);
                String seOtheroise=cell.getStringCellValue();
                if(StringUtils.isBlank(seOtheroise)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-其他噪音不能为空");
                }


                cell = row.getCell(10);
                cell.setCellType(CellType.STRING);
                String seCardchecking=cell.getStringCellValue();
                if(StringUtils.isBlank(seCardchecking)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-门岗查卡时间长不能为空");
                }


                cell = row.getCell(11);
                cell.setCellType(CellType.STRING);
                String seLaxcarking=cell.getStringCellValue();
                if(StringUtils.isBlank(seLaxcarking)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-门岗查卡不严不能为空");
                }

                cell = row.getCell(12);
                cell.setCellType(CellType.STRING);
                String seFireman=cell.getStringCellValue();
                if(StringUtils.isBlank(seFireman)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-消防管理不能为空");
                }

                cell = row.getCell(13);
                cell.setCellType(CellType.STRING);
                String seLlechaing=cell.getStringCellValue();
                if(StringUtils.isBlank(seLlechaing)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-违规充电不能为空");
                }

                cell = row.getCell(14);
                cell.setCellType(CellType.STRING);
                String seSense=cell.getStringCellValue();
                if(StringUtils.isBlank(seSense)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-安全感不能为空");
                }

                cell = row.getCell(15);
                cell.setCellType(CellType.STRING);
                String sePostwork=cell.getStringCellValue();
                if(StringUtils.isBlank(sePostwork)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-岗位工作纪律不能为空");
                }

                cell = row.getCell(16);
                cell.setCellType(CellType.STRING);
                String sePooratitude=cell.getStringCellValue();
                if(StringUtils.isBlank(sePooratitude)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-岗位服务态度差不能为空");
                }
                cell = row.getCell(17);
                cell.setCellType(CellType.STRING);
                String seConsciousness=cell.getStringCellValue();
                if(StringUtils.isBlank(seConsciousness)){
                    throw new ServiceException("第" + (j + 2) + "行" + "安防-服务意识不能为空");
                }

                cell = row.getCell(18);
                cell.setCellType(CellType.STRING);
                String cuStafhad=cell.getStringCellValue();
                if(StringUtils.isBlank(cuStafhad)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台人员态度差不能为空");
                }

                cell = row.getCell(19);
                cell.setCellType(CellType.STRING);
                String cuFrontdesk=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrontdesk)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台业务办理不能为空");
                }

                cell = row.getCell(20);
                cell.setCellType(CellType.STRING);
                String cuHousekeeper=cell.getStringCellValue();
                if(StringUtils.isBlank(cuHousekeeper)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-不认识管家不能为空");
                }

                cell = row.getCell(21);
                cell.setCellType(CellType.STRING);
                String cuConhouse=cell.getStringCellValue();
                if(StringUtils.isBlank(cuConhouse)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-联系不上管家不能为空");
                }

                cell = row.getCell(22);
                cell.setCellType(CellType.STRING);
                String cuProblemfollow=cell.getStringCellValue();
                if(StringUtils.isBlank(cuProblemfollow)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-问题跟进不及时不能为空");
                }

                cell = row.getCell(23);
                cell.setCellType(CellType.STRING);
                String cuPoorachatide=cell.getStringCellValue();
                if(StringUtils.isBlank(cuPoorachatide)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-管家服务态度差不能为空");
                }

                cell = row.getCell(24);
                cell.setCellType(CellType.STRING);
                String cuFrequently=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrequently)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-管家更换频繁不能为空");
                }


                cell = row.getCell(25);
                cell.setCellType(CellType.STRING);
                String cuFrbujidesk=cell.getStringCellValue();
                if(StringUtils.isBlank(cuFrbujidesk)){
                    throw new ServiceException("第" + (j + 2) + "行" + "客服-前台问题处理不及时不能为空");
                }


                cell = row.getCell(26);
                cell.setCellType(CellType.STRING);
                String grGreenwaste=cell.getStringCellValue();
                if(StringUtils.isBlank(grGreenwaste)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-绿化垃圾清运不能为空");
                }

                cell = row.getCell(27);
                cell.setCellType(CellType.STRING);
                String grMaintenance=cell.getStringCellValue();
                if(StringUtils.isBlank(grMaintenance)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-养护缺失不能为空");
                }

                cell = row.getCell(28);
                cell.setCellType(CellType.STRING);
                String grDowntrees=cell.getStringCellValue();
                if(StringUtils.isBlank(grDowntrees)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-砍伐树木不能为空");
                }

                cell = row.getCell(29);
                cell.setCellType(CellType.STRING);
                String grPlantruning=cell.getStringCellValue();
                if(StringUtils.isBlank(grPlantruning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物修剪不能为空");
                }

                cell = row.getCell(30);
                cell.setCellType(CellType.STRING);
                String grWitheeds=cell.getStringCellValue();
                if(StringUtils.isBlank(grWitheeds)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-杂草丛生不能为空");
                }

                cell = row.getCell(31);
                cell.setCellType(CellType.STRING);
                String grPlantdeath=cell.getStringCellValue();
                if(StringUtils.isBlank(grPlantdeath)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物死亡不能为空");
                }

                cell = row.getCell(32);
                cell.setCellType(CellType.STRING);
                String grLoess=cell.getStringCellValue();
                if(StringUtils.isBlank(grLoess)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-黄土裸露不能为空");
                }

                cell = row.getCell(33);
                cell.setCellType(CellType.STRING);
                String grSeedlingloss=cell.getStringCellValue();
                if(StringUtils.isBlank(grSeedlingloss)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-苗木缺失不能为空");
                }

                cell = row.getCell(34);
                cell.setCellType(CellType.STRING);
                String grFewplant=cell.getStringCellValue();
                if(StringUtils.isBlank(grFewplant)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物种类少不能为空");
                }

                cell = row.getCell(35);
                cell.setCellType(CellType.STRING);
                String grUnreasonable=cell.getStringCellValue();
                if(StringUtils.isBlank(grUnreasonable)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-植物搭配不合理不能为空");
                }

                cell = row.getCell(36);
                cell.setCellType(CellType.STRING);
                String grServiceimage=cell.getStringCellValue();
                if(StringUtils.isBlank(grServiceimage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "绿化-服务形象与态度不能为空");
                }

                cell = row.getCell(37);
                cell.setCellType(CellType.STRING);
                String clUnrplagacans=cell.getStringCellValue();
                if(StringUtils.isBlank(clUnrplagacans)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-垃圾桶摆放不合理不能为空");
                }

                cell = row.getCell(38);
                cell.setCellType(CellType.STRING);
                String clRemovaon=cell.getStringCellValue();
                if(StringUtils.isBlank(clRemovaon)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-垃圾清运不及时不能为空");
                }

                cell = row.getCell(39);
                cell.setCellType(CellType.STRING);
                String clOutdoorpublic=cell.getStringCellValue();
                if(StringUtils.isBlank(clOutdoorpublic)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-室外公共区域清洁不能为空");
                }

                cell = row.getCell(40);
                cell.setCellType(CellType.STRING);
                String clBuilinterior=cell.getStringCellValue();
                if(StringUtils.isBlank(clBuilinterior)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-楼宇室内清洁不能为空");
                }

                cell = row.getCell(41);
                cell.setCellType(CellType.STRING);
                String clGarcleang=cell.getStringCellValue();
                if(StringUtils.isBlank(clGarcleang)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-地下车库清洁不能为空");
                }

                cell = row.getCell(42);
                cell.setCellType(CellType.STRING);
                String clWaterscape=cell.getStringCellValue();
                if(StringUtils.isBlank(clWaterscape)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-景观水景不能为空");
                }

                cell = row.getCell(43);
                cell.setCellType(CellType.STRING);
                String clFpelimination=cell.getStringCellValue();
                if(StringUtils.isBlank(clFpelimination)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-四害消杀不能为空");
                }

                cell = row.getCell(44);
                cell.setCellType(CellType.STRING);
                String clCleanupaccu=cell.getStringCellValue();
                if(StringUtils.isBlank(clCleanupaccu)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-园区积水清理不能为空");
                }

                cell = row.getCell(45);
                cell.setCellType(CellType.STRING);
                String clServiceimage=cell.getStringCellValue();
                if(StringUtils.isBlank(clServiceimage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "保洁-服务形象与态度不能为空");
                }

                cell = row.getCell(46);
                cell.setCellType(CellType.STRING);
                String enPuicliting=cell.getStringCellValue();
                if(StringUtils.isBlank(enPuicliting)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公共照明不能为空");
                }

                cell = row.getCell(47);
                cell.setCellType(CellType.STRING);
                String enAmusement=cell.getStringCellValue();
                if(StringUtils.isBlank(enAmusement)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-游乐设施不能为空");
                }

                cell = row.getCell(48);
                cell.setCellType(CellType.STRING);
                String enElevator=cell.getStringCellValue();
                if(StringUtils.isBlank(enElevator)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-电梯不能为空");
                }

                cell = row.getCell(49);
                cell.setCellType(CellType.STRING);
                String enWaterupply=cell.getStringCellValue();
                if(StringUtils.isBlank(enWaterupply)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-供水设备不能为空");
                }

                cell = row.getCell(50);
                cell.setCellType(CellType.STRING);
                String enFireighting=cell.getStringCellValue();
                if(StringUtils.isBlank(enFireighting)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-消防设备不能为空");
                }

                cell = row.getCell(51);
                cell.setCellType(CellType.STRING);
                String enMonitoring=cell.getStringCellValue();
                if(StringUtils.isBlank(enMonitoring)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-监控系统不能为空");
                }

                cell = row.getCell(52);
                cell.setCellType(CellType.STRING);
                String enAccessconol=cell.getStringCellValue();
                if(StringUtils.isBlank(enAccessconol)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-门禁不能为空");
                }

                cell = row.getCell(53);
                cell.setCellType(CellType.STRING);
                String enRoadgate=cell.getStringCellValue();
                if(StringUtils.isBlank(enRoadgate)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-道闸不能为空");
                }

                cell = row.getCell(54);
                cell.setCellType(CellType.STRING);
                String enPublicarea=cell.getStringCellValue();
                if(StringUtils.isBlank(enPublicarea)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公区土建装修不能为空");
                }

                cell = row.getCell(55);
                cell.setCellType(CellType.STRING);
                String enDrainage=cell.getStringCellValue();
                if(StringUtils.isBlank(enDrainage)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-公区排水/排污不能为空");
                }

                cell = row.getCell(56);
                cell.setCellType(CellType.STRING);
                String enEquipment=cell.getStringCellValue();
                if(StringUtils.isBlank(enEquipment)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-其它设施设备不能为空");
                }

                cell = row.getCell(57);
                cell.setCellType(CellType.STRING);
                String enImageatude=cell.getStringCellValue();
                if(StringUtils.isBlank(enImageatude)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-工程岗位形象态度不能为空");
                }

                cell = row.getCell(58);
                cell.setCellType(CellType.STRING);
                String enHomemainte=cell.getStringCellValue();
                if(StringUtils.isBlank(enHomemainte)){
                    throw new ServiceException("第" + (j + 2) + "行" + "工程-入户维修与服务态度不能为空");
                }

                cell = row.getCell(59);
                cell.setCellType(CellType.STRING);
                String chAblecharge=cell.getStringCellValue();
                if(StringUtils.isBlank(chAblecharge)){
                    throw new ServiceException("第" + (j + 2) + "行" + "收费-收费不合理不能为空");
                }

                cell = row.getCell(60);
                cell.setCellType(CellType.STRING);
                String comPublicbene=cell.getStringCellValue();
                if(StringUtils.isBlank(comPublicbene)){
                    throw new ServiceException("第" + (j + 2) + "行" + "社区经营-公共收益公示不能为空");
                }

                cell = row.getCell(61);
                cell.setCellType(CellType.STRING);
                String comNonstandard=cell.getStringCellValue();
                if(StringUtils.isBlank(comNonstandard)){
                    throw new ServiceException("第" + (j + 2) + "行" + "社区经营-经营管理不规范不能为空");
                }

                cell = row.getCell(62);
                cell.setCellType(CellType.STRING);
                String comOperation=cell.getStringCellValue();
                if(StringUtils.isBlank(comOperation)){
                    throw new ServiceException("第" + (j + 2) + "行" + "社区经营-经营管理不到位不能为空");
                }

                cell = row.getCell(63);
                cell.setCellType(CellType.STRING);
                String soActiveffect=cell.getStringCellValue();
                if(StringUtils.isBlank(soActiveffect)){
                    throw new ServiceException("第" + (j + 2) + "行" + "社文活动-活动效果不佳不能为空");
                }

                cell = row.getCell(64);
                cell.setCellType(CellType.STRING);
                String soNotification=cell.getStringCellValue();
                if(StringUtils.isBlank(soNotification)){
                    throw new ServiceException("第" + (j + 2) + "行" + "社文活动-活动通知不到位不能为空");
                }

                cell = row.getCell(65);
                cell.setCellType(CellType.STRING);
                String soActivitycon=cell.getStringCellValue();
                if(StringUtils.isBlank(soActivitycon)){
                    throw new ServiceException("第" + (j + 2) + "行" + "社文活动-活动管控不到位不能为空");
                }

                cell = row.getCell(66);
                cell.setCellType(CellType.STRING);
                String hoNdoorhouse=cell.getStringCellValue();
                if(StringUtils.isBlank(hoNdoorhouse)){
                    throw new ServiceException("第" + (j + 2) + "行" + "房产-户内房屋质量保修问题不能为空");
                }

                cell = row.getCell(67);
                cell.setCellType(CellType.STRING);
                String hoQuaproblems=cell.getStringCellValue();
                if(StringUtils.isBlank(hoQuaproblems)){
                    throw new ServiceException("第" + (j + 2) + "行" + "房产-公区工程质量问题不能为空");
                }

                cell = row.getCell(68);
                cell.setCellType(CellType.STRING);
                String hoSales=cell.getStringCellValue();
                if(StringUtils.isBlank(hoSales)){
                    throw new ServiceException("第" + (j + 2) + "行" + "房产-销售承诺不能为空");
                }

                cell = row.getCell(69);
                cell.setCellType(CellType.STRING);
                String hoNotsatisf=cell.getStringCellValue();
                if(StringUtils.isBlank(hoNotsatisf)){
                    throw new ServiceException("第" + (j + 2) + "行" + "房产-配套不满意不能为空");
                }

                cell = row.getCell(70);
                cell.setCellType(CellType.STRING);
                String hoUnplanning=cell.getStringCellValue();
                if(StringUtils.isBlank(hoUnplanning)){
                    throw new ServiceException("第" + (j + 2) + "行" + "房产-规划不合理不能为空");
                }

                cell = row.getCell(71);
                cell.setCellType(CellType.STRING);
                String hoRightcertifi=cell.getStringCellValue();
                if(StringUtils.isBlank(hoRightcertifi)){
                    throw new ServiceException("第" + (j + 2) + "行" + "房产-产权证、发票相关不能为空");
                }

                cell = row.getCell(72);
                cell.setCellType(CellType.STRING);
                String jtIndoorand=cell.getStringCellValue();
                if(StringUtils.isBlank(jtIndoorand)){
                    throw new ServiceException("第" + (j + 2) + "行" + "集团子公司业务-区内外楼巴服务不能为空");
                }

                cell = row.getCell(73);
                cell.setCellType(CellType.STRING);
                String jtCesother=cell.getStringCellValue();
                if(StringUtils.isBlank(jtCesother)){
                    throw new ServiceException("第" + (j + 2) + "行" + "集团子公司业务-旗下其他子公司服务不能为空");
                }


                cell = row.getCell(74);
                cell.setCellType(CellType.STRING);
                String yjTenanily=cell.getStringCellValue();
                if(StringUtils.isBlank(yjTenanily)){
                    throw new ServiceException("第" + (j + 2) + "行" + "业户纠纷-新旧业主、租客、家庭纠纷不能为空");
                }


                cell = row.getCell(75);
                cell.setCellType(CellType.STRING);
                String yjDispuween=cell.getStringCellValue();
                if(StringUtils.isBlank(yjDispuween)){
                    throw new ServiceException("第" + (j + 2) + "行" + "业户纠纷-业户与聘请单位/个人的劳资纠纷不能为空");
                }


                cell = row.getCell(76);
                cell.setCellType(CellType.STRING);
                String yjDiwuuyutre=cell.getStringCellValue();
                if(StringUtils.isBlank(yjDiwuuyutre)){
                    throw new ServiceException("第" + (j + 2) + "行" + "业户纠纷-共有建筑主体损坏维修纠纷不能为空");
                }


                cell = row.getCell(77);
                cell.setCellType(CellType.STRING);
                String szMunicipa=cell.getStringCellValue();
                if(StringUtils.isBlank(szMunicipa)){
                    throw new ServiceException("第" + (j + 2) + "行" + "市政、生活-市政配套不能为空");
                }


                cell = row.getCell(78);
                cell.setCellType(CellType.STRING);
                String szSurrounding=cell.getStringCellValue();
                if(StringUtils.isBlank(szSurrounding)){
                    throw new ServiceException("第" + (j + 2) + "行" + "市政、生活-小区周边环境管理不能为空");
                }


                cell = row.getCell(79);
                cell.setCellType(CellType.STRING);
                String gxPersonalized=cell.getStringCellValue();
                if(StringUtils.isBlank(gxPersonalized)){
                    throw new ServiceException("第" + (j + 2) + "行" + "个性化需求-个性化服务不能为空");
                }


                cell = row.getCell(80);
                cell.setCellType(CellType.STRING);
                String gxStandard=cell.getStringCellValue();
                if(StringUtils.isBlank(gxStandard)){
                    throw new ServiceException("第" + (j + 2) + "行" + "个性化需求-服务不到位不能为空");
                }


                cell = row.getCell(81);
                cell.setCellType(CellType.STRING);
                String qtOtherfactors=cell.getStringCellValue();
                if(StringUtils.isBlank(qtOtherfactors)){
                    throw new ServiceException("第" + (j + 2) + "行" + "其他-其它因素不能为空");
                }



                SatisfiedDissatisfiedProject satisf=new SatisfiedDissatisfiedProject();
                satisf.setCommCode(commCode);
                satisf.setCommName(commName);
                satisf.setOrgCode(projectList.get(0).getOrganCode());
                satisf.setOrgName(orgName);
                if(!seVpapr.equals("/")){
                    satisf.setSeVpapr(df.format(Double.valueOf(seVpapr)));
                }else{
                    satisf.setSeVpapr("");
                }
                if(!seLlegal.equals("/")){
                    satisf.setSeLlegal(df.format(Double.valueOf(seLlegal)));
                }else{
                    satisf.setSeLlegal("");
                }
                if(!sePet.equals("/")){
                    satisf.setSePet(df.format(Double.valueOf(sePet)));
                }else{
                    satisf.setSePet("");
                }
                if(!seNoise.equals("/")){
                    satisf.setSeNoise(df.format(Double.valueOf(seNoise)));
                }else{
                    satisf.setSeNoise("");
                }
                if(!seNonresid.equals("/")){
                    satisf.setSeNonresid(df.format(Double.valueOf(seNonresid)));
                }else{
                    satisf.setSeNonresid("");
                }
                if(!seOtheroise.equals("/")){
                    satisf.setSeOtheroise(df.format(Double.valueOf(seOtheroise)));
                }else{
                    satisf.setSeOtheroise("");
                }
                if(!seCardchecking.equals("/")){
                    satisf.setSeCardchecking(df.format(Double.valueOf(seCardchecking)));
                }else{
                    satisf.setSeCardchecking("");
                }
                if(!seLaxcarking.equals("/")){
                    satisf.setSeLaxcarking(df.format(Double.valueOf(seLaxcarking)));
                }else{
                    satisf.setSeLaxcarking("");
                }
                if(!seFireman.equals("/")){
                    satisf.setSeFireman(df.format(Double.valueOf(seFireman)));
                }else{
                    satisf.setSeFireman("");
                }
                if(!seLlechaing.equals("/")){
                    satisf.setSeLlechaing(df.format(Double.valueOf(seLlechaing)));
                }else{
                    satisf.setSeLlechaing("");
                }
                if(!seSense.equals("/")){
                    satisf.setSeSense(df.format(Double.valueOf(seSense)));
                }else{
                    satisf.setSeSense("");
                }
                if(!sePostwork.equals("/")){
                    satisf.setSePostwork(df.format(Double.valueOf(sePostwork)));
                }else{
                    satisf.setSePostwork("");
                }
                if(!sePooratitude.equals("/")){
                    satisf.setSePooratitude(df.format(Double.valueOf(sePooratitude)));
                }else{
                    satisf.setSePooratitude("");
                }
                if(!seConsciousness.equals("/")){
                    satisf.setSeConsciousness(df.format(Double.valueOf(seConsciousness)));
                }else{
                    satisf.setSeConsciousness("");
                }
                if(!cuStafhad.equals("/")){
                    satisf.setCuStafhad(df.format(Double.valueOf(cuStafhad)));
                }else{
                    satisf.setCuStafhad("");
                }
                if(!cuFrontdesk.equals("/")){
                    satisf.setCuFrontdesk(df.format(Double.valueOf(cuFrontdesk)));
                }else{
                    satisf.setCuFrontdesk("");
                }
                if(!cuHousekeeper.equals("/")){
                    satisf.setCuHousekeeper(df.format(Double.valueOf(cuHousekeeper)));
                }else{
                    satisf.setCuHousekeeper("");
                }
                if(!cuConhouse.equals("/")){
                    satisf.setCuConhouse(df.format(Double.valueOf(cuConhouse)));
                }else{
                    satisf.setCuConhouse("");
                }
                if(!cuProblemfollow.equals("/")){
                    satisf.setCuProblemfollow(df.format(Double.valueOf(cuProblemfollow)));
                }else{
                    satisf.setCuProblemfollow("");
                }
                if(!cuPoorachatide.equals("/")){
                    satisf.setCuPoorachatide(df.format(Double.valueOf(cuPoorachatide)));
                }else{
                    satisf.setCuPoorachatide("");
                }
                if(!cuFrequently.equals("/")){
                    satisf.setCuFrequently(df.format(Double.valueOf(cuFrequently)));
                }else{
                    satisf.setCuFrequently("");
                }
                if(!cuFrbujidesk.equals("/")){
                    satisf.setCuFrbujidesk(df.format(Double.valueOf(cuFrbujidesk)));
                }else{
                    satisf.setCuFrbujidesk("");
                }
                if(!grGreenwaste.equals("/")){
                    satisf.setGrGreenwaste(df.format(Double.valueOf(grGreenwaste)));
                }else{
                    satisf.setGrGreenwaste("");
                }
                if(!grMaintenance.equals("/")){
                    satisf.setGrMaintenance(df.format(Double.valueOf(grMaintenance)));
                }else{
                    satisf.setGrMaintenance("");
                }
                if(!grDowntrees.equals("/")){
                    satisf.setGrDowntrees(df.format(Double.valueOf(grDowntrees)));
                }else{
                    satisf.setGrDowntrees("");
                }
                if(!grPlantruning.equals("/")){
                    satisf.setGrPlantruning(df.format(Double.valueOf(grPlantruning)));
                }else{
                    satisf.setGrPlantruning("");
                }
                if(!grWitheeds.equals("/")){
                    satisf.setGrWitheeds(df.format(Double.valueOf(grWitheeds)));
                }else{
                    satisf.setGrWitheeds("");
                }
                if(!grPlantdeath.equals("/")){
                    satisf.setGrPlantdeath(df.format(Double.valueOf(grPlantdeath)));
                }else{
                    satisf.setGrPlantdeath("");
                }
                if(!grLoess.equals("/")){
                    satisf.setGrLoess(df.format(Double.valueOf(grLoess)));
                }else{
                    satisf.setGrLoess("");
                }
                if(!grSeedlingloss.equals("/")){
                    satisf.setGrSeedlingloss(df.format(Double.valueOf(grSeedlingloss)));
                }else{
                    satisf.setGrSeedlingloss("");
                }
                if(!grFewplant.equals("/")){
                    satisf.setGrFewplant(df.format(Double.valueOf(grFewplant)));
                }else{
                    satisf.setGrFewplant("");
                }
                if(!grUnreasonable.equals("/")){
                    satisf.setGrUnreasonable(df.format(Double.valueOf(grUnreasonable)));
                }else{
                    satisf.setGrUnreasonable("");
                }
                if(!grServiceimage.equals("/")){
                    satisf.setGrServiceimage(df.format(Double.valueOf(grServiceimage)));
                }else{
                    satisf.setGrServiceimage("");
                }
                if(!clUnrplagacans.equals("/")){
                    satisf.setClUnrplagacans(df.format(Double.valueOf(clUnrplagacans)));
                }else{
                    satisf.setClUnrplagacans("");
                }
                if(!clRemovaon.equals("/")){
                    satisf.setClRemovaon(df.format(Double.valueOf(clRemovaon)));
                }else{
                    satisf.setClRemovaon("");
                }
                if(!clOutdoorpublic.equals("/")){
                    satisf.setClOutdoorpublic(df.format(Double.valueOf(clOutdoorpublic)));
                }else{
                    satisf.setClOutdoorpublic("");
                }
                if(!clBuilinterior.equals("/")){
                    satisf.setClBuilinterior(df.format(Double.valueOf(clBuilinterior)));
                }else{
                    satisf.setClBuilinterior("");
                }
                if(!clGarcleang.equals("/")){
                    satisf.setClGarcleang(df.format(Double.valueOf(clGarcleang)));
                }else{
                    satisf.setClGarcleang("");
                }
                if(!clWaterscape.equals("/")){
                    satisf.setClWaterscape(df.format(Double.valueOf(clWaterscape)));
                }else{
                    satisf.setClWaterscape("");
                }
                if(!clFpelimination.equals("/")){
                    satisf.setClFpelimination(df.format(Double.valueOf(clFpelimination)));
                }else{
                    satisf.setClFpelimination("");
                }
                if(!clCleanupaccu.equals("/")){
                    satisf.setClCleanupaccu(df.format(Double.valueOf(clCleanupaccu)));
                }else{
                    satisf.setClCleanupaccu("");
                }
                if(!clServiceimage.equals("/")){
                    satisf.setClServiceimage(df.format(Double.valueOf(clServiceimage)));
                }else{
                    satisf.setClServiceimage("");
                }
                if(!enPuicliting.equals("/")){
                    satisf.setEnPuicliting(df.format(Double.valueOf(enPuicliting)));
                }else{
                    satisf.setEnPuicliting("");
                }
                if(!enAmusement.equals("/")){
                    satisf.setEnAmusement(df.format(Double.valueOf(enAmusement)));
                }else{
                    satisf.setEnAmusement("");
                }
                if(!enElevator.equals("/")){
                    satisf.setEnElevator(df.format(Double.valueOf(enElevator)));
                }else{
                    satisf.setEnElevator("");
                }
                if(!enWaterupply.equals("/")){
                    satisf.setEnWaterupply(df.format(Double.valueOf(enWaterupply)));
                }else{
                    satisf.setEnWaterupply("");
                }
                if(!enFireighting.equals("/")){
                    satisf.setEnFireighting(df.format(Double.valueOf(enFireighting)));
                }else{
                    satisf.setEnFireighting("");
                }
                if(!enMonitoring.equals("/")){
                    satisf.setEnMonitoring(df.format(Double.valueOf(enMonitoring)));
                }else{
                    satisf.setEnMonitoring("");
                }
                if(!enAccessconol.equals("/")){
                    satisf.setEnAccessconol(df.format(Double.valueOf(enAccessconol)));
                }else{
                    satisf.setEnAccessconol("");
                }
                if(!enRoadgate.equals("/")){
                    satisf.setEnRoadgate(df.format(Double.valueOf(enRoadgate)));
                }else{
                    satisf.setEnRoadgate("");
                }
                if(!enPublicarea.equals("/")){
                    satisf.setEnPublicarea(df.format(Double.valueOf(enPublicarea)));
                }else{
                    satisf.setEnPublicarea("");
                }
                if(!enDrainage.equals("/")){
                    satisf.setEnDrainage(df.format(Double.valueOf(enDrainage)));
                }else{
                    satisf.setEnDrainage("");
                }
                if(!enEquipment.equals("/")){
                    satisf.setEnEquipment(df.format(Double.valueOf(enEquipment)));
                }else{
                    satisf.setEnEquipment("");
                }
                if(!enImageatude.equals("/")){
                    satisf.setEnImageatude(df.format(Double.valueOf(enImageatude)));
                }else{
                    satisf.setEnImageatude("");
                }
                if(!enHomemainte.equals("/")){
                    satisf.setEnHomemainte(df.format(Double.valueOf(enHomemainte)));
                }else{
                    satisf.setEnHomemainte("");
                }
                if(!chAblecharge.equals("/")){
                    satisf.setChAblecharge(df.format(Double.valueOf(chAblecharge)));
                }else{
                    satisf.setChAblecharge("");
                }
                if(!comPublicbene.equals("/")){
                    satisf.setComPublicbene(df.format(Double.valueOf(comPublicbene)));
                }else{
                    satisf.setComPublicbene("");
                }
                if(!comNonstandard.equals("/")){
                    satisf.setComNonstandard(df.format(Double.valueOf(comNonstandard)));
                }else{
                    satisf.setComNonstandard("");
                }
                if(!comOperation.equals("/")){
                    satisf.setComOperation(df.format(Double.valueOf(comOperation)));
                }else{
                    satisf.setComOperation("");
                }
                if(!soActiveffect.equals("/")){
                    satisf.setSoActiveffect(df.format(Double.valueOf(soActiveffect)));
                }else{
                    satisf.setSoActiveffect("");
                }
                if(!soNotification.equals("/")){
                    satisf.setSoNotification(df.format(Double.valueOf(soNotification)));
                }else{
                    satisf.setSoNotification("");
                }
                if(!soActivitycon.equals("/")){
                    satisf.setSoActivitycon(df.format(Double.valueOf(soActivitycon)));
                }else{
                    satisf.setSoActivitycon("");
                }
                if(!hoNdoorhouse.equals("/")){
                    satisf.setHoNdoorhouse(df.format(Double.valueOf(hoNdoorhouse)));
                }else{
                    satisf.setHoNdoorhouse("");
                }
                if(!hoQuaproblems.equals("/")){
                    satisf.setHoQuaproblems(df.format(Double.valueOf(hoQuaproblems)));
                }else{
                    satisf.setHoQuaproblems("");
                }
                if(!hoSales.equals("/")){
                    satisf.setHoSales(df.format(Double.valueOf(hoSales)));
                }else{
                    satisf.setHoSales("");
                }
                if(!hoNotsatisf.equals("/")){
                    satisf.setHoNotsatisf(df.format(Double.valueOf(hoNotsatisf)));
                }else{
                    satisf.setHoNotsatisf("");
                }
                if(!hoUnplanning.equals("/")){
                    satisf.setHoUnplanning(df.format(Double.valueOf(hoUnplanning)));
                }else{
                    satisf.setHoUnplanning("");
                }
                if(!hoRightcertifi.equals("/")){
                    satisf.setHoRightcertifi(df.format(Double.valueOf(hoRightcertifi)));
                }else{
                    satisf.setHoRightcertifi("");
                }
                if(!jtIndoorand.equals("/")){
                    satisf.setJtIndoorand(df.format(Double.valueOf(jtIndoorand)));
                }else{
                    satisf.setJtIndoorand("");
                }
                if(!jtCesother.equals("/")){
                    satisf.setJtCesother(df.format(Double.valueOf(jtCesother)));
                }else{
                    satisf.setJtCesother("");
                }
                if(!yjTenanily.equals("/")){
                    satisf.setYjTenanily(df.format(Double.valueOf(yjTenanily)));
                }else{
                    satisf.setYjTenanily("");
                }
                if(!yjDispuween.equals("/")){
                    satisf.setYjDispuween(df.format(Double.valueOf(yjDispuween)));
                }else{
                    satisf.setYjDispuween("");
                }
                if(!yjDiwuuyutre.equals("/")){
                    satisf.setYjDiwuuyutre(df.format(Double.valueOf(yjDiwuuyutre)));
                }else{
                    satisf.setYjDiwuuyutre("");
                }
                if(!szMunicipa.equals("/")){
                    satisf.setSzMunicipa(df.format(Double.valueOf(szMunicipa)));
                }else{
                    satisf.setSzMunicipa("");
                }
                if(!szSurrounding.equals("/")){
                    satisf.setSzSurrounding(df.format(Double.valueOf(szSurrounding)));
                }else{
                    satisf.setSzSurrounding("");
                }
                if(!gxPersonalized.equals("/")){
                    satisf.setGxPersonalized(df.format(Double.valueOf(gxPersonalized)));
                }else{
                    satisf.setGxPersonalized("");
                }
                if(!gxStandard.equals("/")){
                    satisf.setGxStandard(df.format(Double.valueOf(gxStandard)));
                }else{
                    satisf.setGxStandard("");
                }
                if(!qtOtherfactors.equals("/")){
                    satisf.setQtOtherfactors(df.format(Double.valueOf(qtOtherfactors)));
                }else{
                    satisf.setQtOtherfactors("");
                }
                satisf.setYearMonth(yearMonth);
                satisf.setStatus(1);
                satisf.setCreateBy(userCode);
                satisf.setIsEditor(0);
              /*  moyueStr.add(yearMonth);
                orsaIns.add(satisf);*/
                SatisfiedDissatisfiedProject sat=new SatisfiedDissatisfiedProject();
                sat.setCommCode(commCode);
                sat.setYearMonth(yearMonth);
                sat.setStatus(1);
                List<SatisfiedDissatisfiedProject> list=satisfiedDissatisfiedProjectMapper.select(sat);
                if(CollectionUtils.isNotEmpty(list)){
                    //修改
                    satisf.setId(list.get(0).getId());
                    satisf.setIsEditor(1);
                    satisf.setUpdateTime(new Date());
                    satisf.setUpdateBy(tbSysUser.getUserName());
                    orsaUpda.add(satisf);
                }else {
                    //添加
                    orsaIns.add(satisf);
                }
                k+=81;
            }
        }
/*        Set<String> yueset=new LinkedHashSet<>(moyueStr);
        List<String> yuelist=new ArrayList<>(yueset);

            satisfiedDissatisfiedProjectMapper.updateDelete();*/


        Set<SatisfiedDissatisfiedProject> setIn=new LinkedHashSet<>(orsaIns);
        List<SatisfiedDissatisfiedProject> orListIn=new ArrayList<>(setIn);


        Set<SatisfiedDissatisfiedProject> setUp=new LinkedHashSet<>(orsaUpda);
        List<SatisfiedDissatisfiedProject> orListUp=new ArrayList<>(setUp);

        if(CollectionUtils.isNotEmpty(orListIn)){
            int indexIn=satisfiedDissatisfiedProjectMapper.insertPL(orListIn);
        }

        if(CollectionUtils.isNotEmpty(orListUp)){
            for (int i = 0; i <orListUp.size() ; i++) {
                satisfiedDissatisfiedProjectMapper.updateByPrimaryKeySelective(orListUp.get(i));
            }
        }

    }

    //身份认证
    public Result checkIdentity(String clientId, String timeString, String sign){
        ShareConfig share=new ShareConfig();
        share.setClientId(clientId);
        ShareConfig shareConfig = shareConfigMapper.selectOne(share);
        if(shareConfig ==null){
            return Response.responseFail("认证失败:客户端编码有误");
        }
        String clientSecret = shareConfig.getClientSecret();
        SimpleDateFormat sb=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            String sd = sb.format(new Date(Long.valueOf(timeString+"000")));
            Date parse = sb.parse(sd);
            Date date=new Date();
            long l = date.getTime() - parse.getTime();
            if(l>5*60*1000){
                return Response.responseFail("参数错误:调用时间与参数时间不能超过5分钟");
            }
        }catch (Exception e){
            return Response.responseFail("参数错误:timeString格式有误");
        }

        String md5String =clientId+clientSecret+timeString;
        String s = MD5.GetMD5Code(md5String);
        if(!s.equals(sign)){
            return Response.responseFail("认证失败:签名错误");
        }
        return Response.response("认证成功");
    }

    public List<String> queryRoleCodes(String[] roles, String userCode) {
        //保洁模块的权限问题：admin=ck_admin>区域>项目>其他
        Condition condition = new Condition(UserRoles.class);
        condition.selectProperties("roleCode");
        Example.Criteria criteria = condition.createCriteria();
        criteria.andEqualTo("userCode", userCode);
        if (roles != null && roles.length > 0) {
            criteria.andIn("roleCode", Arrays.asList(roles));
        }

        List<UserRoles> rolesList = userRolesMapper.selectByCondition(condition);
        if (CollectionUtils.isNotEmpty(rolesList)) {
            return rolesList.stream().map(e -> e.getRoleCode()).collect(Collectors.toList());
        }
        // 权限不足
        throw new ServiceException("权限不足");
    }
}
