智慧保安后台管理-外网
Administrator
2021-11-29 d23d3a11db4df64fda1100791f3421a5c14e18f4
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherUnitController.java
@@ -136,7 +136,8 @@
         //数据同步
         String s1 =
            "insert into sys_dispatcher_unit(id,name,dept_id,linkman,phone,jurisdiction,create_time,start_time,end_time,serve_type) " +
            "insert into sys_dispatcher_unit(id,name,dept_id,linkman,phone,jurisdiction,create_time,start_time,end_time," +
               "serve_type,security_linkman,cell,num) " +
               "values(" + "'" + dispatcherUnit.getId() + "'" + "," +
               "'" + dispatcherUnit.getName() + "'" + "," +
               "'" + dispatcherUnit.getDeptId() + "'" + "," +
@@ -146,7 +147,10 @@
               "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcherUnit.getCreateTime()) + "'" + "," +
               "'" + new SimpleDateFormat("yyyy-MM-dd").format(dispatcherUnit.getStartTime()) + "'" + "," +
               "'" + new SimpleDateFormat("yyyy-MM-dd").format(dispatcherUnit.getEndTime()) + "'" + "," +
               "'" +dispatcherUnit.getServeType() + "'" + ")";
               "'" + dispatcherUnit.getServeType() + "'" + "," +
               "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," +
               "'" + dispatcherUnit.getCell() + "'" + "," +
               "'" +dispatcherUnit.getNum() + "'" + ")";
         FtpUtil.sqlFileUpload(s1);
      }else {
         //修改
@@ -169,6 +173,9 @@
               ",start_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(dispatcherUnit.getStartTime()) + "'" +
               ",end_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(dispatcherUnit.getEndTime()) + "'" +
               ",serve_type = " + "'" + dispatcherUnit.getServeType() + "'" +
               ",security_linkman = " + "'" + dispatcherUnit.getSecurityLinkman() + "'" +
               ",cell = " + "'" + dispatcherUnit.getCell() + "'" +
               ",num = " + "'" + dispatcherUnit.getNum() + "'" +
               " " +"where id = " + "'" + dispatcherUnit.getId() + "'";
         FtpUtil.sqlFileUpload(s1);
         //内网同步派遣记录修改合同时间
@@ -222,6 +229,10 @@
      unitExcel.setPhone("13112341234");
      unitExcel.setStartTime(new SimpleDateFormat("yyyy/MM/dd").parse("2020/5/1"));
      unitExcel.setEndTime(new SimpleDateFormat("yyyy/MM/dd").parse("2021/5/1"));
      unitExcel.setServeType("***");
      unitExcel.setSecurityLinkman("王老五");
      unitExcel.setCell("13112341234");
      unitExcel.setNum(10);
      list.add(unitExcel);
      DispatcherUnitExcel unitExcel1 = new DispatcherUnitExcel();
@@ -231,6 +242,10 @@
      unitExcel1.setPhone("13112341234");
      unitExcel1.setStartTime(new SimpleDateFormat("yyyy/MM/dd").parse("2020/10/10"));
      unitExcel1.setEndTime(new SimpleDateFormat("yyyy/MM/dd").parse("2021/10/10"));
      unitExcel1.setServeType("***");
      unitExcel1.setSecurityLinkman("钱小七");
      unitExcel1.setCell("13112341234");
      unitExcel1.setNum(100);
      list.add(unitExcel1);
      ExcelUtil.export(response, "派遣单位数据导入模板"+ DateUtil.time(), "派遣单位数据表", list, DispatcherUnitExcel.class);