| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.dispatcher.entity.DispatcherUnit; |
| | | import org.springblade.modules.dispatcher.service.IDispatcherUnitService; |
| | | import org.springblade.modules.system.entity.User; |
| | |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.status(status); |
| | | } |
| | | |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | dispatcher.setUpdateTime(new Date()); |
| | |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //没有修改保安员,只修改了派遣时间等信息 |
| | |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | User user = new User(); |
| | |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | User user = new User(); |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | |
| | | }); |
| | |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //修改原保安人员的派遣状态 |
| | |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //修改原保安人员的派遣状态 |
| | |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | if (null != dispatcherUnit.getDistrict() && !dispatcherUnit.getDistrict().equals("") && !dispatcherUnit.getDistrict().equals(-1)) { |
| | |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //没有修改保安员,只修改了派遣时间等信息 |
| | |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //没有修改保安员,只修改了派遣时间等信息 |
| | |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_dispatcher where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(dispatcherService.removeByIds(Func.toLongList(ids))); |
| | | } |