| | |
| | | |
| | | //数据同步 |
| | | 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() + "'" + "," + |
| | |
| | | "'" + 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 { |
| | | //修改 |
| | |
| | | ",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); |
| | | //内网同步派遣记录修改合同时间 |
| | |
| | | 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(); |
| | |
| | | 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); |
| | |
| | | @TableField("serve_type") |
| | | private String serveType; |
| | | |
| | | /** |
| | | * 负责人(保安公司人员) |
| | | */ |
| | | @TableField("security_linkman") |
| | | private String securityLinkman; |
| | | |
| | | /** |
| | | * 负责人电话 |
| | | */ |
| | | private String cell; |
| | | |
| | | /** |
| | | * 派遣人数 |
| | | */ |
| | | private Integer num; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @ColumnWidth(25) |
| | | @ExcelProperty("保安公司名称*") |
| | | @ExcelProperty("企业名称*") |
| | | private String deptName; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("联系人*") |
| | | @ExcelProperty("服务对象联系人*") |
| | | private String linkman; |
| | | |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("联系电话*") |
| | | @ExcelProperty("服务对象联系电话*") |
| | | private String phone; |
| | | |
| | | |
| | |
| | | @DateTimeFormat("yyyy/MM/dd") |
| | | private Date endTime; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("保安服务类型") |
| | | private String serveType; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("负责人*") |
| | | private String securityLinkman; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("负责人联系电话*") |
| | | private String cell; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("派遣保安员数*") |
| | | private Integer num; |
| | | |
| | | |
| | | } |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | 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()); |
| | | |
| | |
| | | |
| | | //数据同步 |
| | | 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() + "'" + "," + |
| | |
| | | "'" + 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); |
| | | }); |
| | | } |