智慧保安后台管理-外网项目备份
Administrator
2021-11-29 d23d3a11db4df64fda1100791f3421a5c14e18f4
src/main/java/org/springblade/modules/dispatcher/service/impl/DispatcherUnitServiceImpl.java
@@ -57,10 +57,10 @@
   @Override
   public IPage<DispatcherUnitVO> selectDispatcherUnitPage(IPage<DispatcherUnitVO> page, DispatcherUnitVO dispatcherUnitVO) {
      List<DispatcherUnitVO> dispatcherUnitVOS = baseMapper.selectDispatcherUnitPage(page, dispatcherUnitVO);
      dispatcherUnitVOS.forEach(dispatcherUnitVO1 -> {
         //查询派遣记录条数
         dispatcherUnitVO1.setNum(dispatcherService.getDispatcherCount(dispatcherUnitVO1));
      });
//      dispatcherUnitVOS.forEach(dispatcherUnitVO1 -> {
//         //查询派遣记录条数
//         dispatcherUnitVO1.setNum(dispatcherService.getDispatcherCount(dispatcherUnitVO1));
//      });
      return page.setRecords(dispatcherUnitVOS);
   }
@@ -117,6 +117,22 @@
            dispatcherUnit.setPhone(dispatcherUnitExcel.getPhone());
         }
         if (dispatcherUnitExcel.getSecurityLinkman()!=null && dispatcherUnitExcel.getSecurityLinkman()!=""){
            dispatcherUnit.setSecurityLinkman(dispatcherUnitExcel.getSecurityLinkman());
         }
         if (dispatcherUnitExcel.getCell()!=null && dispatcherUnitExcel.getCell()!=""){
            dispatcherUnit.setCell(dispatcherUnitExcel.getCell());
         }
         if (dispatcherUnitExcel.getServeType()!=null && dispatcherUnitExcel.getServeType()!=""){
            dispatcherUnit.setServeType(dispatcherUnitExcel.getServeType());
         }
         if (dispatcherUnitExcel.getNum()!=null){
            dispatcherUnit.setNum(dispatcherUnitExcel.getNum());
         }
         dispatcherUnit.setStartTime(dispatcherUnitExcel.getStartTime());
         dispatcherUnit.setEndTime(dispatcherUnitExcel.getEndTime());
@@ -153,7 +169,7 @@
         //数据同步
         String s1 =
            "insert into sys_dispatcher_unit(id,name,dept_id,linkman,phone,create_time,start_time,end_time) " +
            "insert into sys_dispatcher_unit(id,name,dept_id,linkman,phone,create_time,start_time,end_time,serve_type,security_linkman,cell,num) " +
               "values(" + "'" + dispatcherUnit.getId() + "'" + "," +
               "'" + dispatcherUnit.getName() + "'" + "," +
               "'" + dispatcherUnit.getDeptId() + "'" + "," +
@@ -161,7 +177,11 @@
               "'" + dispatcherUnit.getPhone() + "'" + "," +
               "'" + 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()) + "'" + ")";
               "'" + new SimpleDateFormat("yyyy/MM/dd").format(dispatcherUnit.getEndTime()) + "'" + "," +
               "'" + dispatcherUnit.getServeType() + "'" + "," +
               "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," +
               "'" + dispatcherUnit.getCell() + "'" + "," +
               "'" + dispatcherUnit.getNum() + "'" + ")";
         FtpUtil.sqlFileUpload(s1);
      });
   }