tangzy
2021-08-25 55c7ca1ef88e9b3cf772cbf77eed3ac81dcfb41a
src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
@@ -27,12 +27,14 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.revoke.entity.Revoke;
import org.springblade.modules.revoke.service.IRevokeService;
import org.springblade.modules.revoke.vo.RevokeVO;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
@@ -96,10 +98,28 @@
         String id = map.get("id").toString();
         revokeService.removeByIds(Func.toLongList(id));
      }
      revoke.setStorage("1");
      revoke.setType("2");
      revoke.setPtype("4");
      revoke.setPtype("6");
      revoke.setPermitime(new Date());
      return R.status(revokeService.save(revoke));
      revokeService.save(revoke);
      String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getEstablishtime());
      String s = "insert into sys_revoke(id,creditCode,enterpriseName,representative,establishTime," +
         "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," +
         "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,reason)" +
         "values(" + "'" + revoke.getId() + "'" + "," + "'" + revoke.getCreditcode() + "'" + "," + "'" + revoke.getEnterprisename() + "'" + "," + "'"
         + revoke.getRepresentative() + "'" + "," +
         "'" + formatStr + "'" + "," + "'" + revoke.getRegisteredcapital() + "'" + "," + "'"
         + revoke.getOrganizationcode() + "'" + "," + "'" + revoke.getRegistrationnumber() + "'" + "," +
         "'" + revoke.getIdentificationnumber() + "'" + "," + "'" + revoke.getEnterprises() + "'" + "," + "'" +
         revoke.getAddress() + "'" + "," + "'" + revoke.getBusiness() + "'" + "," + "'" +
         revoke.getRegion() + "'" + "," + "'" + revoke.getRegistration() + "'" + "," + "'" + revoke.getIndustry()+ "'" + "," + "'"
         + revoke.getType() + "'" + "," +
         "'" + revoke.getPermitime() + "'" + "," + "'" + revoke.getDeptid() + "'" + "," + "'" + revoke.getPtype() + "'" + "," +
         "'" + revoke.getRepresentativecell() + "'" + "," + "'" + revoke.getContacts() + "'" + "," + "'" + revoke.getContactscell() + "'"+"," +
         "'" + revoke.getReason() + "'"+")" ;
      FtpUtil.sqlFileUpload(s);
      return R.success("成功");
   }
   /**
@@ -118,7 +138,7 @@
      else {
         revoke.setStorage("0");
         revoke.setType("2");
         revoke.setPtype("4");
         revoke.setPtype("6");
         revoke.setPermitime(new Date());
         revokeService.save(revoke);
      }
@@ -156,5 +176,10 @@
      return R.status(revokeService.removeByIds(Func.toLongList(ids)));
   }
   @PostMapping("/selectIn")
   public R selectIn(String cardid) {
      Map map = revokeService.selectIn(cardid);
      return R.data(map);
   }
}