智慧保安后台管理-外网项目备份
tangzy
2021-11-05 425fb772c347a85fe8c9cb38a7a386d6368402cd
src/main/java/org/springblade/modules/record/controller/RecordController.java
@@ -35,6 +35,7 @@
import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.information.entity.Information;
import org.springblade.modules.information.service.IInformationService;
import org.springblade.modules.permit.vo.PermitVO;
import org.springblade.modules.record.entity.Record;
import org.springblade.modules.record.service.IRecordService;
import org.springblade.modules.record.vo.RecordVO;
@@ -101,7 +102,22 @@
   @ApiOperationSupport(order = 3)
   @ApiOperation(value = "分页", notes = "传入record")
   public R<IPage<RecordVO>> page(RecordVO record, Query query) {
      IPage<RecordVO> pages = recordService.selectRecordPage(Condition.getPage(query), record);
      IPage<RecordVO> pages;
      if (record.getUsetype().equals("0")) {
         pages = recordService.selectRecordPage(Condition.getPage(query), record, null);
      } else if (record.getUsetype().equals("1")) {
         String childer = informationService.selJurchilder(record.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 = recordService.selectRecordPage(Condition.getPage(query), record, jurisdiction);
      } else {
         pages = recordService.selectRecordPage(Condition.getPage(query), record, null);
      }
      return R.data(pages);
   }
@@ -118,20 +134,21 @@
      if (map != null) {
         String id = map.get("id").toString();
         recordService.removeByIds(Func.toLongList(id));
         String s1 = "delete from sys_record where id = " + "'" + id + "'";
         FtpUtil.sqlFileUpload(s1);
      }
      record.setStorage("1");
      record.setType("2");
      record.setPermitime(new Date());
      recordService.save(record);
      String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime());
      String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime());
      String s = "insert into sys_record(id,enterpriseName,representative," +
         "address,business,registration,industry,type,permitime,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction,cardid,storage,overtime)" +
         "values(" + "'" + record.getId() + "'"+ "," + "'" + record.getEnterprisename() + "'" + "," +
      //String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime());
      //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime());
      String s = "insert into sys_record(id,representative," +
         "address,business,registration,industry,type,ptype,representativecell,contacts,contactscell,perid,offices,jurisdiction,cardid,storage,overtime)" +
         "values(" + "'" + record.getId() + "'" + "," +
         "'" + record.getRepresentative() + "'"+ "," + "'" +
         record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry() + "'" + "," + "'" + record.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + record.getPtype() + "'" + "," +
         "'" + record.getRepresentativecell() + "'" + "," + "'" + record.getContacts() + "'" + "," + "'" + record.getContactscell() + "'" + "," +"'" + record.getPerid() + "'" + "," + "'" + record.getOffices() + "'" + "," +
         "'" + offtime + "'" + "," + "'" + record.getJurisdiction() + "'" +
         record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry() + "'" + "," + "'" + record.getType() + "'" + "," + "'" + record.getPtype() + "'" + "," +
         "'" + record.getRepresentativecell() + "'" + "," + "'" + record.getContacts() + "'" + "," + "'" + record.getContactscell() + "'" + "," + "'" + record.getPerid() + "'" + "," + "'" + record.getOffices() + "'" + "," + "'" + record.getJurisdiction() + "'" +
         "," + "'" + record.getCardid() + "'"+
         "," + "'" + record.getStorage() + "'"+
         "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOvertime()) + "'"
@@ -232,8 +249,7 @@
            ",xopinion = " + "'" + record.getXopinion() + "'"+
            " " +"where id = " + "'" + record.getId() + "'";
         FtpUtil.sqlFileUpload(s1);
      }
      else {
      } else {
         String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
            ",papprove = " + "'" + record.getPapprove() + "'"+
            ",xapprove = " + "'" + record.getXapprove() + "'"+