| | |
| | | if (null == dispatcherUnit.getId()) { |
| | | dispatcherUnit.setCreateTime(new Date()); |
| | | //新增 |
| | | status = dispatcherUnitService.save(dispatcherUnit); |
| | | status = dispatcherUnitService.save(dispatcherUnit1); |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "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() + "'" + "," + |
| | | "values(" + "'" + dispatcherUnit1.getId() + "'" + "," + |
| | | "'" + dispatcherUnit.getName() + "'" + "," + |
| | | "'" + dispatcherUnit.getDeptId() + "'" + "," + |
| | | "'" + dispatcherUnit1.getLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit1.getPhone() + "'" + "," + |
| | | "'" + dispatcherUnit.getLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit.getPhone() + "'" + "," + |
| | | "'" + dispatcherUnit.getJurisdiction() + "'" + "," + |
| | | "'" + 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() + "'" + "," + |
| | | "'" + dispatcherUnit1.getSecurityLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit1.getCell() + "'" + "," + |
| | | "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" + dispatcherUnit.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } else { |
| | | //修改 |
| | | status = dispatcherUnitService.updateById(dispatcherUnit); |
| | | status = dispatcherUnitService.updateById(dispatcherUnit1); |
| | | //派遣记录修改合同时间 |
| | | |
| | | Long id = dispatcherUnit.getId(); |