智慧保安后台管理-外网
tangzy
2022-02-24 d4b00c05321d9373a33bfb26618735e2a5868a81
src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
@@ -33,6 +33,7 @@
import org.springblade.modules.revoke.entity.Revoke;
import org.springblade.modules.revoke.service.IRevokeService;
import org.springblade.modules.revoke.vo.RevokeVO;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@@ -54,6 +55,8 @@
   private final IRevokeService revokeService;
   private final IInformationService informationService;
   private final MyAsyncService myAsyncService;
   /**
    * 详情
    */
@@ -86,21 +89,6 @@
   public R<IPage<RevokeVO>> page(RevokeVO revoke, Query query) {
      IPage<RevokeVO> pages;
      pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,revoke.getJurisdiction());
//      if (revoke.getUsetype().equals("0")) {
//         pages = revokeService.selectRevokePage(Condition.getPage(query), revoke,null);
//      } else if (revoke.getUsetype().equals("1")) {
//         String childer = informationService.selJurchilder(revoke.getJurisdiction());
//         String[] split = childer.split(",");
//         String strArrays = "";
//         for (int j = 0; j < split.length; j++) {
//            strArrays += "'" + split[j] + "',";
//         }
//         String jurisdiction = strArrays.substring(0, strArrays.length() - 1);
//         pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,jurisdiction);
//      } else {
//         pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,null);
//      }
      return R.data(pages);
   }
@@ -121,9 +109,8 @@
      revoke.setStorage("1");
      revoke.setType("2");
      revoke.setPermitime(new Date());
      revokeService.save(revoke);
      //String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getEstablishtime());
      //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getPermitime());
      boolean save = revokeService.save(revoke);
      if (save) {
      String s = "insert into sys_revoke(id,creditCode,enterpriseName,representative," +
         "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," +
         "address,business,region,registration,industry,type,deptid,ptype,representativecell,contacts,contactscell,reason,jurisdiction,cardid)" +
@@ -136,7 +123,8 @@
         + revoke.getType() + "'" + "," + "'" + revoke.getDeptid() + "'" + "," + "'" + revoke.getPtype() + "'" + "," +
         "'" + revoke.getRepresentativecell() + "'" + "," + "'" + revoke.getContacts() + "'" + "," + "'" + revoke.getContactscell() + "'" + "," +
         "'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" +"," + "'" + revoke.getCardid() + "'"+ ")";
      FtpUtil.sqlFileUpload(s);
         myAsyncService.FTP(s);
      }
      return R.success("成功");
   }