智慧保安后台管理-外网项目备份
zhongrj
2023-09-17 8853292babb2ad94de4a3207966f1e83b767cd2d
src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java
@@ -47,6 +47,7 @@
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IDeptService;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@@ -75,6 +76,7 @@
   private final IInformationService informationService;
   private final IUserService userService;
   private final IAttachService attachService;
   private final MyAsyncService myAsyncService;
   /**
    * 详情
@@ -140,7 +142,8 @@
         String id = map.get("id").toString();
         recordService.removeByIds(Func.toLongList(id));
         String s1 = "delete from sys_record where id = " + "'" + id + "'";
         FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.dataSync(s1);
      }
      record.setStorage("1");
      record.setType("2");
@@ -164,7 +167,8 @@
         "," + "'" + record.getChangecontacts() + "'" +
         "," + "'" + record.getChangecontactscell() + "'" +
         ")";
      FtpUtil.sqlFileUpload(s);
      //FtpUtil.sqlFileUpload(s);
      myAsyncService.dataSync(s);
      return R.success("成功");
   }
@@ -222,7 +226,8 @@
                     "update sys_information set representative = " + "'" + information1.getRepresentative() + "'" +
                     ",representativecell = " + "'" + information1.getRepresentativecell()  + "'" +
                     " " + "where id = " + "'" + information1.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.dataSync(s1);
         }else {
            //按组织机构查询
            Information information2 = new Information();
@@ -245,7 +250,8 @@
                  "update sys_information set representative = " + "'" + information1.getRepresentative() + "'" +
                  ",representativecell = " + "'" + information1.getRepresentativecell()  + "'" +
                  " " + "where id = " + "'" + information1.getId() + "'";
               FtpUtil.sqlFileUpload(s1);
               //FtpUtil.sqlFileUpload(s1);
               myAsyncService.dataSync(s1);
            }else {
               //设置未审核不通过
               record.setType("1");
@@ -255,7 +261,8 @@
               String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
                  ",approve = " + "'" + record.getApprove() + "'" +
                  " " + "where id = " + "'" + record.getId() + "'";
               FtpUtil.sqlFileUpload(s1);
               //FtpUtil.sqlFileUpload(s1);
               myAsyncService.dataSync(s1);
               throw new ServiceException("当前公司单位未保安服务系统存在,请先注册!");
            }
         }
@@ -268,7 +275,8 @@
         String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
            ",approve = " + "'" + record.getApprove() + "'" +
            " " + "where id = " + "'" + record.getId() + "'";
         FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.dataSync(s1);
      }
      //返回数据
      return R.status(status);