| | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.exam.excel.ExamScoreExcel; |
| | | import org.springblade.modules.exam.excel.ExamScoreImporter; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | |
| | | private final IDispatcherUnitService dispatcherUnitService; |
| | | private final IDispatcherService dispatcherService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | |
| | | dispatcherUnit.setCreateTime(new Date()); |
| | | //新增 |
| | | status = dispatcherUnitService.save(dispatcherUnit); |
| | | |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_dispatcher_unit(id,name,dept_id,linkman,phone,jurisdiction,create_time,start_time,end_time," + |
| | |
| | | "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" +dispatcherUnit.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改 |
| | | status = dispatcherUnitService.updateById(dispatcherUnit); |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String endTime = sdf.format(date); |
| | | dispatcherService.updateEndtime(endTime,ids); |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_dispatcher_unit set name = " + "'" + dispatcherUnit.getName() + "'" + |
| | |
| | | ",cell = " + "'" + dispatcherUnit.getCell() + "'" + |
| | | ",num = " + "'" + dispatcherUnit.getNum() + "'" + |
| | | " " +"where id = " + "'" + dispatcherUnit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //内网同步派遣记录修改合同时间 |
| | | String s2 = |
| | | "update sys_dispatcher set end_time = " + "'" + endTime + "'" +" " + "where dispatcher_unit_id = " + "'" + ids + "'"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_dispatcher_unit where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(dispatcherUnitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入派遣单位数据 |
| | | * |
| | | * @param isCovered 1 覆盖 0不覆盖 |
| | | * @return |
| | | */ |