智慧保安后台管理-外网-验收版本
tangzy
2021-12-06 cc057177b2fb17aee9a173a6adbabdc578fd74c7
src/main/java/org/springblade/modules/seinspect/controller/SeinspectController.java
@@ -94,29 +94,32 @@
   public R save(@Valid @RequestBody Seinspect seinspect) throws Exception {
      seinspectService.save(seinspect);
      String url = "";
      String[] split = seinspect.getUrl().split(",");
      for (int i = 0; i < split.length; i++) {
         String s = split[i].substring(26, split[i].length());
         url += FtpConstant.ip + s + ",";
      if (seinspect.getUrl()!=null&& !"".equals(seinspect.getUrl())){
         String[] split = seinspect.getUrl().split(",");
         for (int i = 0; i < split.length; i++) {
            String s = split[i].substring(26, split[i].length());
            url += FtpConstant.ip + s + ",";
         }
         String substring = url.substring(0, url.length() - 1);
         seinspect.setUrl(substring);
      }
      String substring = url.substring(0, url.length() - 1);
      seinspect.setUrl(substring);
      //数据同步
      String s1 =
         "insert into sys_seinspect(id,realName,carid,sName,inspectman,deptName,reviewTime,insid,examination_type,url,jid,deptid,jurisdiction) " +
         "insert into sys_seinspect(id,realName,carid,sName,inspectman,deptName,reviewTime,insid,examination_type,url,jid,deptid,jurisdiction,handler_result) " +
            "values(" + "'" + seinspect.getId() + "'" + "," +
            "'" + seinspect.getRealname() + "'" + "," +
            "'" + seinspect.getCarid() + "'" + "," +
            "'" + seinspect.getSname() + "'" + "," +
            "'" + seinspect.getInspectman() + "'" + "," +
            "'" + seinspect.getDeptname() + "'" + "," +
            "'" + new SimpleDateFormat("yyyy-MM-dd").format(seinspect.getReviewtime()) + "'" + "," +
            "'" + seinspect.getReviewtime() + "'" + "," +
            "'" + seinspect.getInsid() + "'" + "," +
            "'" + seinspect.getExaminationType() + "'" + "," +
            "'" + seinspect.getUrl() + "'" + "," +
            "'" + seinspect.getJid() + "'" + "," +
            "'" + seinspect.getDeptid() + "'" + "," +
            "'" +seinspect.getJurisdiction() + "'" + ")";
            "'" + seinspect.getJurisdiction() + "'" + "," +
            "'" +seinspect.getHandlerResult() + "'" + ")";
      FtpUtil.sqlFileUpload(s1);
      return R.success("成功");
   }