新增数据同步方式及配置,当选择为sql时则为数据库直连同步,全局替换所有的同步方法,用户修改,离职,注销修改调整,文件上传去除同步推送上传
52 files modified
3 files added
| New file |
| | |
| | | package org.springblade.common.config; |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 数据同步配置 |
| | | * @author zhongrj |
| | | * @since 2022-08-22 |
| | | */ |
| | | @ConfigurationProperties(prefix = "data.sync") |
| | | @Component |
| | | public class DataSyncConfig { |
| | | |
| | | /** |
| | | * 同步类型: ftp,sql |
| | | */ |
| | | public static String type; |
| | | |
| | | /** |
| | | * 数据库连接驱动 |
| | | */ |
| | | public static String driver; |
| | | |
| | | /** |
| | | * 数据库连接 url |
| | | */ |
| | | public static String url; |
| | | |
| | | /** |
| | | * 数据库连接用户名 |
| | | */ |
| | | public static String username; |
| | | |
| | | /** |
| | | * 数据库连接密码 |
| | | */ |
| | | public static String password; |
| | | |
| | | public void setType(String type) { |
| | | DataSyncConfig.type = type; |
| | | } |
| | | |
| | | public void setDriver(String driver) { |
| | | DataSyncConfig.driver = driver; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | DataSyncConfig.url = url; |
| | | } |
| | | |
| | | public void setUsername(String username) { |
| | | DataSyncConfig.username = username; |
| | | } |
| | | |
| | | public void setPassword(String password) { |
| | | DataSyncConfig.password = password; |
| | | } |
| | | } |
| New file |
| | |
| | | package org.springblade.common.utils; |
| | | |
| | | import okhttp3.OkHttpClient; |
| | | import okhttp3.Request; |
| | | import okhttp3.Response; |
| | | |
| | | import java.util.function.BiConsumer; |
| | | import java.util.function.Consumer; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | | * @date 2021-08-12 |
| | | */ |
| | | public class InvestigateUtil { |
| | | |
| | | /** |
| | | * 人员审查 |
| | | * |
| | | * @param idCardNo 人员身份证号 |
| | | * @return |
| | | */ |
| | | public static String httpGet(String idCardNo, Integer pageNum, Integer pageSize) { |
| | | OkHttpClient client = new OkHttpClient(); |
| | | Request request = new Request.Builder() |
| | | .url("http://47.49.27.44:8000/dbapi/dmc_bjhc?page_num=" + pageNum + "&page_size=" + pageSize + "&sfzh=" + idCardNo) |
| | | .get() |
| | | .addHeader("Authorization", "Bearer eyJ0eXAiOiJqd3QiLCJhbGciOiJIUzI1NiIsInVjIjoiMzYwNjAyMTk4OTA3MDgxMDE4IiwidG9rZW5fdHlwZSI6MX0.eyJpc3MiOiJITGdGVGYwZWwwNTRDYlNWNUptMUY1eXA3UjRWNnpuMyIsImlhdCI6MTYyOTc5NDk4MH0.KOyEdkXDc5FP98KFLYOBnDgthJZF6VDOxJvlYFrXmrA") |
| | | .build(); |
| | | try { |
| | | Response response = client.newCall(request).execute(); |
| | | return response.body().string(); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 人员审查 |
| | | * |
| | | * @param idCardNo 人员身份证号 |
| | | * @return |
| | | */ |
| | | public static String httpGetOne(String idCardNo) { |
| | | OkHttpClient client = new OkHttpClient(); |
| | | Request request = new Request.Builder() |
| | | .url("http://47.49.27.44:8000/dbapi/dmc_bjhc?page_num=1&page_size=1000&sfzh=" + idCardNo) |
| | | .get() |
| | | .addHeader("Authorization", "Bearer eyJ0eXAiOiJqd3QiLCJhbGciOiJIUzI1NiIsInVjIjoiMzYwNjAyMTk4OTA3MDgxMDE4IiwidG9rZW5fdHlwZSI6MX0.eyJpc3MiOiJITGdGVGYwZWwwNTRDYlNWNUptMUY1eXA3UjRWNnpuMyIsImlhdCI6MTYyOTc5NDk4MH0.KOyEdkXDc5FP98KFLYOBnDgthJZF6VDOxJvlYFrXmrA") |
| | | .build(); |
| | | try { |
| | | Response response = client.newCall(request).execute(); |
| | | return response.body().string(); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 枪支定位 |
| | | * |
| | | * @param idCardNo 护卫员身份证号 |
| | | * @param deptName 所在单位名称 |
| | | * @param startTime 定位开始时间 |
| | | * @param endTime 定位结束时间 |
| | | */ |
| | | public static String httpGetGunPosition(String idCardNo, String deptName, String startTime, String endTime, Integer pageNum, Integer pageSize) { |
| | | OkHttpClient client = new OkHttpClient(); |
| | | String hwysfzh = ""; |
| | | String szdw = ""; |
| | | String kssj = ""; |
| | | String jssj = ""; |
| | | String page_size = "&page_size=" + pageSize; |
| | | String page_num = "&page_num=" + pageNum; |
| | | if (idCardNo != null && !idCardNo.equals("")) { |
| | | hwysfzh = "&hwysfzh=" + idCardNo; |
| | | } |
| | | if (deptName != null && !deptName.equals("")) { |
| | | szdw = "&szdw=" + deptName; |
| | | } |
| | | if (startTime != null && !startTime.equals("")) { |
| | | kssj = "&kssj=" + startTime; |
| | | } |
| | | if (endTime != null && !endTime.equals("")) { |
| | | jssj = "&jssj=" + endTime; |
| | | } |
| | | |
| | | Request request = new Request.Builder() |
| | | .url("http://47.49.27.44:8000/dbapi/dmc_qzdw?" + hwysfzh + szdw + kssj + jssj) |
| | | .get() |
| | | .addHeader("Authorization", "Bearer eyJ0eXAiOiJqd3QiLCJhbGciOiJIUzI1NiIsInVjIjoiMzYwNjAyMTk4OTA3MDgxMDE4IiwidG9rZW5fdHlwZSI6MX0.eyJpc3MiOiI3aWN5MXplc3N2eVBPVlJKUVk2aHpPRTJhc0JMdkw1MyIsImlhdCI6MTYyOTI1MTMzOX0.DLasFawQHexpRBFORQU64tbSR_n76bpway42GfIwPf4") |
| | | .build(); |
| | | try { |
| | | Response response = client.newCall(request).execute(); |
| | | return response.body().string(); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // 工具方法 |
| | | public static <T> Consumer<T> consumerWithIndex(BiConsumer<T, Integer> consumer) { |
| | | class Obj { |
| | | int i; |
| | | } |
| | | Obj obj = new Obj(); |
| | | return t -> { |
| | | int index = obj.i++; |
| | | consumer.accept(t, index); |
| | | }; |
| | | } |
| | | } |
| | |
| | | package org.springblade.modules.FTP; |
| | | |
| | | |
| | | import org.springblade.common.config.DataSyncConfig; |
| | | import org.springblade.common.config.FtpConfig; |
| | | |
| | | import java.io.File; |
| | | import java.sql.Connection; |
| | | import java.sql.DriverManager; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.SQLException; |
| | | |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | import static org.springblade.common.config.FtpConfig.localPath; |
| | | |
| | | |
| | | public class MysqlCenlint { |
| | |
| | | try { |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.jdbc.Driver"; |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = username; |
| | | String password = FtpConfig.password; |
| | | String driver = DataSyncConfig.driver; |
| | | //换成要连接的数据库信息 |
| | | String url = DataSyncConfig.url; |
| | | String user = DataSyncConfig.username; |
| | | String password = DataSyncConfig.password; |
| | | Class.forName ( driver ); |
| | | Connection conn = (Connection) DriverManager.getConnection ( url, user, password ); |
| | | if (!conn.isClosed ()) { |
| | | System.out.println ( "数据库连接成功:" ); |
| | | String sqls = sql; //sql |
| | | //sql |
| | | String sqls = sql; |
| | | PreparedStatement ps = conn.prepareStatement ( sqls ); |
| | | boolean execute = ps.execute(); |
| | | ps.close (); |
| | |
| | | try { |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.jdbc.Driver"; |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = username; |
| | | String password = FtpConfig.password; |
| | | String driver = DataSyncConfig.driver; |
| | | //换成要连接的数据库信息 |
| | | String url = DataSyncConfig.url; |
| | | String user = DataSyncConfig.username; |
| | | String password = DataSyncConfig.password; |
| | | Class.forName ( driver ); |
| | | Connection conn = (Connection) DriverManager.getConnection ( url, user, password ); |
| | | if (!conn.isClosed ()) { |
| | |
| | | try { |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.jdbc.Driver"; |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = username; |
| | | String password = FtpConfig.password; |
| | | String driver = DataSyncConfig.driver; |
| | | //换成要连接的数据库信息 |
| | | String url = DataSyncConfig.url; |
| | | String user = DataSyncConfig.username; |
| | | String password = DataSyncConfig.password; |
| | | Class.forName ( driver ); |
| | | Connection conn = (Connection) DriverManager.getConnection ( url, user, password ); |
| | | if (!conn.isClosed ()) { |
| | |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | return R.data(save); |
| | | } |
| | | |
| | |
| | | ",update_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "" + |
| | | "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | }else { |
| | | //内网同步 |
| | | String s = |
| | |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | }else { |
| | | //内网同步 |
| | |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | //返回 |
| | | return R.status(b); |
| | |
| | | ",update_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "" + |
| | | "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | }else { |
| | | //内网同步 |
| | | String s = |
| | |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | }else { |
| | | //内网同步 |
| | |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | }); |
| | | //返回 |
| | |
| | | + "'" + records.getType() + "'" + "," |
| | | + "'" + records.getAuditStatus() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | //判断类型,如果是证书的,审核未通过的可以再次申请,审核通过的,暂时不给于新增记录 |
| | |
| | | + "'" + records.getType() + "'" + "," |
| | | + "'" + records.getAuditStatus() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | |
| | |
| | | "update sys_accreditation_records set status = " + accreditationRecords.getStatus() + "" + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | }); |
| | | return true; |
| | | } |
| | |
| | | "'" + "," + "'" + apply.getApplyStatus() + "'" + "," + "'" + apply.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + user1.getIsApply() + " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_apply where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(applyService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "update sys_apply set apply_status = " + apply.getApplyStatus() + " " + "where id = " + "'" + apply.getId() + "';" + |
| | | "update blade_user set is_apply = " + user.getIsApply() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | |
| | |
| | | "," + "'" + format + "'" + |
| | | "," + "'" + endTimeFormat + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | //修改报名信息 |
| | | applyIds.forEach(apply -> { |
| | |
| | | "update sys_apply set exam_id = " + apply.getExamId() + ",candidate_no = " + "'" + apply.getCandidateNo() + "'" + |
| | | " " + "where id = " + "'" + apply.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "," + "'" + examScore.getExamId() + "'" + |
| | | "," + "'" + examScore.getApplyId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | return examScore; |
| | | } |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_exam_payment where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(examPaymentService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | +"'" + apply1.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | }else { |
| | | if (user1.getIsApply()!=1) { |
| | | Apply apply1 = new Apply(); |
| | |
| | | +"'" + apply1.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | String s1 = |
| | | "update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | //模拟考 |
| | | if (apply.getExamType()==2){ |
| | |
| | | String s1 = |
| | | "update sys_training_registration set is_exam = " + trainingRegistration.getIsExam() + " " +"where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | |
| | |
| | | "'" + coinspect.getResults() + "'" + "," + |
| | | "'" + coinspect.getUrl() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.success("新增成功"); |
| | | } |
| | | |
| New file |
| | |
| | | package org.springblade.modules.dataSync; |
| | | |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | import org.springblade.common.config.DataSyncConfig; |
| | | import org.springblade.common.utils.InvestigateUtil; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import javax.annotation.PostConstruct; |
| | | import java.io.File; |
| | | import java.sql.Connection; |
| | | import java.sql.DriverManager; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.SQLException; |
| | | import java.util.Date; |
| | | |
| | | @Component |
| | | public class MysqlCenlint { |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | //声明对象 |
| | | private static MysqlCenlint mysqlCenlint; |
| | | |
| | | /** |
| | | * 初始化 |
| | | */ |
| | | @PostConstruct |
| | | public void init(){ |
| | | mysqlCenlint = this; |
| | | mysqlCenlint.userService = this.userService; |
| | | } |
| | | |
| | | /** |
| | | * sql 连接 |
| | | * @param sql |
| | | */ |
| | | public static void sqlConnect(String sql,Integer type){ |
| | | String driver = DataSyncConfig.driver; |
| | | //换成要连接的数据库信息 |
| | | String url = DataSyncConfig.url; |
| | | String user = DataSyncConfig.username; |
| | | String password = DataSyncConfig.password; |
| | | Connection conn = null; |
| | | PreparedStatement ps = null; |
| | | try { |
| | | Class.forName ( driver ); |
| | | conn = (Connection) DriverManager.getConnection ( url, user, password ); |
| | | if (!conn.isClosed ()) { |
| | | System.out.println ( "数据库连接成功:" ); |
| | | String sqls = sql; |
| | | ps = conn.prepareStatement ( sqls ); |
| | | //判断是否为修改,删除 |
| | | if (type==1){ |
| | | //修改删除 |
| | | ps.executeUpdate(); |
| | | }else { |
| | | //新增 |
| | | ps.execute(); |
| | | } |
| | | } |
| | | } catch (ClassNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace (); |
| | | }finally { |
| | | try { |
| | | ps.close(); |
| | | conn.close(); |
| | | } catch (SQLException throwables) { |
| | | throwables.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 连接mysql数据库 新增 |
| | | * @param sql |
| | | */ |
| | | public static void inster(String sql) { |
| | | sqlConnect(sql,2); |
| | | try { |
| | | Thread.sleep(300); |
| | | //对比 sql 字符串,如果是是往用户表里插入保安员数据,则调用公安审查接口 |
| | | String insertUserSql = "insert into blade_user"; |
| | | if (sql.contains(insertUserSql)){ |
| | | //如果包含,调用公安接口进行保安员审查 |
| | | getMxaminationSecurityInfo(sql); |
| | | } |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 审查保安员 |
| | | * @param sqls 新增的sql 语句 |
| | | */ |
| | | private static void getMxaminationSecurityInfo(String sqls) { |
| | | //解析sql,读取数据,取出角色,如果是保安员,则审查,如果不是就不审查 |
| | | //获取第一个 ( ) 的位置 |
| | | int a = sqls.indexOf("("); |
| | | int b = sqls.indexOf(")"); |
| | | //获取第二个 ( )的位置 |
| | | a = sqls.indexOf("(",a+1); |
| | | b = sqls.indexOf(")",b+1); |
| | | //截取字符串 |
| | | String subSql = sqls.substring(a, b); |
| | | String[] splitSql = subSql.split(","); |
| | | //读取角色 |
| | | String roleId = splitSql[10]; |
| | | //去除单引号 |
| | | String subRoleId = roleId.substring(1, roleId.length() - 1); |
| | | //如果是保安员 |
| | | if (subRoleId.equals("1412226235153731586")){ |
| | | //读取身份证号 |
| | | String cardid = splitSql[12]; |
| | | //去除单引号 |
| | | String subCardid = cardid.substring(1, cardid.length() - 1); |
| | | User user = new User(); |
| | | String userId = splitSql[0].substring(2, splitSql[0].length() - 1); |
| | | user.setId(Long.parseLong(userId)); |
| | | System.out.println("身份证:"+subCardid); |
| | | //远程调用接口 |
| | | String body = InvestigateUtil.httpGetOne(subCardid); |
| | | JSONObject jsonObject = new JSONObject(body); |
| | | Object data = jsonObject.get("data"); |
| | | JSONObject jsonData = new JSONObject(data.toString()); |
| | | JSONArray res = jsonData.getJSONArray("res"); |
| | | //设置审核时间 |
| | | user.setAuditTime(new Date()); |
| | | if (res.length() == 0) { |
| | | //没有数据正常 |
| | | user.setExaminationType("0"); |
| | | } else { |
| | | int count = 0; |
| | | user.setExaminationType("1"); |
| | | for (int i = 0; i < res.length(); i++) { |
| | | if (res.getJSONObject(i).get("zdrylbjh").toString() != null |
| | | && res.getJSONObject(i).get("zdrylbjh").toString() != "" |
| | | && res.getJSONObject(i).get("zdrylbjh").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("zdrylbjh").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | break; |
| | | } |
| | | if (res.getJSONObject(i).get("zdryxlmc").toString() != null |
| | | && res.getJSONObject(i).get("zdryxlmc").toString() != "" |
| | | && res.getJSONObject(i).get("zdryxlmc").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("zdryxlmc").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | break; |
| | | } |
| | | if (res.getJSONObject(i).get("ztrylx").toString() != null |
| | | && res.getJSONObject(i).get("ztrylx").toString() != "" |
| | | && res.getJSONObject(i).get("ztrylx").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("ztrylx").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | break; |
| | | } |
| | | // if (res.getJSONObject(i).get("ajlbmc").toString() != null |
| | | // && res.getJSONObject(i).get("ajlbmc").toString() != "") { |
| | | // user.setExaminationMx(res.getJSONObject(i).get("ajlbmc").toString()); |
| | | // //更新用户数据 |
| | | // userService.updateById(user); |
| | | // break; |
| | | // } |
| | | count++; |
| | | //条件中的数据都为空,则审查为正常 |
| | | if (count==res.length()){ |
| | | //更新用户数据,设为正常 |
| | | user.setExaminationType("0"); |
| | | mysqlCenlint.userService.updateById(user); |
| | | } |
| | | } |
| | | } |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 连接mysql数据库 修改 |
| | | * @param sql |
| | | */ |
| | | public static void update(String sql) { |
| | | sqlConnect(sql,1); |
| | | } |
| | | |
| | | /** |
| | | * 连接mysql数据库 删除 |
| | | * @param sql |
| | | */ |
| | | public static void delete(String sql) { |
| | | sqlConnect(sql,1); |
| | | } |
| | | } |
| | |
| | | "'" + notice.getCoverUrl() + "'" + "," + |
| | | "'" + notice.getType() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //修改 |
| | |
| | | ",type = " + "'" + notice.getType() + "'" + |
| | | " " + "where id = " + "'" + notice.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from blade_notice where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); |
| | | return R.status(temp); |
| | |
| | | "'" + directive.getSendTime() + "'" + "," + |
| | | "'" + directive.getContent() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | if (status) { |
| | | //新增图片 |
| | |
| | | "'" + directiveFile.getDirectiveId() + "'" + "," + |
| | | "'" + urls+ "'"+ ")"; |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | if (!status) { |
| | | return R.status(false); |
| | | } |
| | |
| | | ",content = " + "'" + directive.getContent() + "'" + |
| | | " " + "where id = " + "'" + directive.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | boolean status = false; |
| | | if (update) { |
| | |
| | | "'" + directiveFile.getDirectiveId() + "'" + "," + |
| | | "'" + urls + "'"+ ")"; |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | if (!status) { |
| | | R.status(false); |
| | | } |
| | |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.status(status); |
| | | } |
| | | |
| | |
| | | "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); |
| | | } |
| | | } |
| | | } |
| | |
| | | "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(); |
| | |
| | | "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))); |
| | | } |
| | |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" + dispatcherUnit.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //修改 |
| | |
| | | ",num = " + "'" + dispatcherUnit.getNum() + "'" + |
| | | " " + "where id = " + "'" + dispatcherUnit.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //内网同步派遣记录修改合同时间 |
| | | String s2 = |
| | | "update sys_dispatcher set end_time = " + "'" + endTime + "'" + " " + "where dispatcher_unit_id = " + "'" + ids + "'"; |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_dispatcher_unit where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(dispatcherUnitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" + dispatcherUnit.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | } |
| | | } |
| | |
| | | "'" + car.getMode() + "'" + "," + |
| | | "'" + car.getJurisdiction() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | |
| | | } else { |
| | |
| | | ",jurisdiction = " + "'" + car.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + car.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_car where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(carService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //修改 |
| | |
| | | ",person_in_charge = " + "'" + equipage.getPersonInCharge() + "'" + |
| | | " " + "where id = " + "'" + equipage.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_equipage where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(equipageService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "'" + gun.getCardNo() + "'" + "," + |
| | | "'" + gun.getJurisdiction() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //修改 |
| | |
| | | ",card_no = " + "'" + gun.getCardNo() + "'" + |
| | | " " + "where id = " + "'" + gun.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_gun where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(gunService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | //内网同步 |
| | |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocationInfo.getRecordTime()) + "'" + |
| | | " " + "where id = " + "'" + liveLocationInfo.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocationInfo.getRecordTime()) + "'" + |
| | | " " + "where id = " + "'" + liveLocationInfo.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | "," + "'" + car.getUmweltsatz() + "'" + |
| | | "," + "'" + car.getMode() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | }); |
| | | }else { |
| | |
| | | "'" + new SimpleDateFormat("yyyy/MM/dd").format(equipage.getDateForProduction()) + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }else { |
| | | //数据推送 |
| | | String s1 = |
| | |
| | | "'" + equipage.getBrand() + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "'" + gun.getPersonInCharge() + "'" + "," + |
| | | "'" +gun.getCardNo() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | }); |
| | | }else { |
| | |
| | | "'" + "," + "'" + examPaper.getExamType() + |
| | | "'" + "," + "'" + format + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | return R.status(save); |
| | | } |
| | |
| | | ",start_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exam.getStartTime()) + "'" + |
| | | " " + "where id = " + "'" + exam.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | |
| | | //内网同步 |
| | | String s1 = "delete from ksxt_exam where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | boolean temp = examPaperService.removeByIds(Func.toLongList(ids)); |
| | | return R.status(temp); |
| | |
| | | + ",confirm_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exam.getConfirmTime()) + "'" |
| | | + " " + "where id = " + "'" + exam.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | //返回数据 |
| | | return R.data(status); |
| | |
| | | + ",audit_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examPaper.getAuditTime()) + "'" |
| | | + " " + "where id = " + "'" + examPaper.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | //查询当前考试已报名的人员培训报名数据集合 |
| | | List<TrainingRegistration> trainingRegistrations = examPaperService.getTrainList(examPaper.getId()); |
| | |
| | | + ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "values(" + "'" + sid + "'" + |
| | | "," + "'" + format + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | //数据同步 |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | //返回 |
| | | return R.status(save); |
| | |
| | | "update exam_score set qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(status); |
| | | } |
| | |
| | | ",user_type = " + "'" + user1.getUserType() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | //本地修改 |
| | | return R.status(examScoreService.updateById(examScore)); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from exam_score where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(examScoreService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "update sys_apply set is_exam = " + apply1.getIsExam() + " " + "where id = " + "'" + apply1.getId() + "';" + |
| | | "update blade_user set is_apply = " + user.getIsApply() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | } |
| | | //培训考试 |
| | |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " + "where id = " + "'" + trainingRegistration1.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | //设置提交时间 |
| | | examScore.setExamEndTime(new Date()); |
| | |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | if (i > 0) { |
| | | //返回结果 |
| | |
| | | // ",user_type = " + "'" + user.getUserType() + "'" + |
| | | // " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //更新成绩数据 |
| | | baseMapper.updateById(examScore); |
| | | } else { |
| | |
| | | " " + "where id = " + "'" + user.getId() + "';" + |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | return true; |
| | | } |
| | |
| | | " " + "where id = " + "'" + user.getId() + "';" + |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | return true; |
| | | } |
| | |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " + "where id = " + "'" + trainingRegistration1.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | //设置理论得分 |
| | | score.setTheoryGrade(count); |
| | |
| | | ",qualified = " + "'" + score.getQualified() + "'" + |
| | | " " + "where id = " + "'" + score.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | if (i > 0) { |
| | | //返回结果 |
| | |
| | | "," + "'" + examAnswerRecord.getAnswerResult() + "'" + |
| | | "," + "'" + examAnswerRecord.getScoreId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | /** |
| | |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //实操成绩不为空 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | |
| | | + "," + "'" + securityPaper.getApplyId() + "'" |
| | | + "," +"'" + securityPaper.getExamId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //不合格 |
| | |
| | | ",is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | //审核时间 |
| | |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //实操成绩不为空 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | |
| | | ",is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | //审核时间 |
| | |
| | | + ",securityId = " + "'" + experience.getSecurityid() + "'" |
| | | + " " + "where id = " + "'" + experience.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | }else { |
| | | //新增 |
| | |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | return R.status(status); |
| | | } |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getRoleId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | } |
| | | } |
| | |
| | | ",licence = " + "'" + licences + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | //保安公司信息 |
| | | String s1 = "delete from sys_information where departmentid = " + "'" + s + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //主要管理人 |
| | | String s2 = "delete from sys_shareholder where dept_id = " + "'" + s + "'"; |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | //出资人 |
| | | String s3 = "delete from sys_member where dept_id = " + "'" + s + "'"; |
| | | //FtpUtil.sqlFileUpload(s3); |
| | | myAsyncService.FTP(s3); |
| | | myAsyncService.dataSync(s3); |
| | | //组织机构信息逻辑删除 |
| | | String s4 = "update blade_dept set is_deleted = 1 where id = " + "'" + s + "'"; |
| | | //FtpUtil.sqlFileUpload(s4); |
| | | myAsyncService.FTP(s4); |
| | | myAsyncService.dataSync(s4); |
| | | //保安公司人员信息删除 |
| | | String s5 = "update blade_user set is_deleted = 1 where dept_id " + "'" + s + "'"; |
| | | //FtpUtil.sqlFileUpload(s5); |
| | | myAsyncService.FTP(s5); |
| | | myAsyncService.dataSync(s5); |
| | | }); |
| | | //返回 |
| | | return R.success("删除成功"); |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + "," + |
| | | "'" + liveLocation.getLocation() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //更新 |
| | |
| | | ",location = " + "'" + liveLocation.getLocation() + "'" + |
| | | " " + "where id = " + "'" + liveLocation.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | |
| | |
| | | "'" + locus.getLongitude() + "'" + "," + |
| | | "'" + locus.getLatitude() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | |
| | | if (save1) { |
| | | //返回数据 |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + "," + |
| | | "'" + liveLocation.getLocation() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | //更新 |
| | |
| | | ",location = " + "'" + liveLocation.getLocation() + "'" + |
| | | " " + "where id = " + "'" + liveLocation.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(locus.getRecordTime()) + "'" + "," + |
| | | "'" + locus.getLongitude() + "'" + "," + |
| | | "'" + locus.getLatitude() + "'" + ")"; |
| | | myAsyncService.FTP(s2); |
| | | myAsyncService.dataSync(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | |
| | | if (save1) { |
| | |
| | | } |
| | | } |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | deletescsv(substring); |
| | | } |
| | | deletescsv(substring); |
| | |
| | | "'" + member.getCreditcode() + "'" + "," + |
| | | "'" + member.getDeptId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(save); |
| | | } |
| | |
| | | ",dept_id = " + "'" + member.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + member.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | |
| | | list.forEach(id -> { |
| | | String s1 = "delete from sys_member where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(memberService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd").format(performance.getTime()) + "'" + "," + |
| | | "'" + performance.getScore() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.status(save); |
| | | } |
| | | |
| | |
| | | ",score = " + "'" + performance.getScore() + "'" + |
| | | " " + "where id = " + "'" + performance.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | return R.success("许可提交成功"); |
| | | } |
| | | |
| | |
| | | "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'" |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | //返回 |
| | | return R.data(permit); |
| | |
| | | "," + "'" + information.getContacts() + "'" + |
| | | "," + "'" + information.getContactscell() + "'" + |
| | | "," + "'" + information.getCreateUserId() + "'" + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | String ss = "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + dept.getId() + "'" + "," + "'" + dept.getParentId() + "'" + "," |
| | | + "'" + dept.getTenantId() + "'" + |
| | | "," + "'" + information.getEnterprisename() + "'" + |
| | |
| | | //把附件添加单位id |
| | | String s1 = "update sys_permit set type = " + "'" + 0 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | recordService.removeByIds(Func.toLongList(id)); |
| | | String s1 = "delete from sys_record where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | record.setStorage("1"); |
| | | record.setType("2"); |
| | |
| | | "," + "'" + record.getStorage() + "'" + |
| | | "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOvertime()) + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | "," + "'" + information.getContacts() + "'" + |
| | | "," + "'" + information.getContactscell() + "'" + |
| | | "," + "'" + information.getCreateUserId() + "'" + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | String ss = "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + dept.getId() + "'" + "," + "'" + dept.getParentId() + "'" + "," |
| | | + "'" + dept.getTenantId() + "'" + |
| | | "," + "'" + information.getEnterprisename() + "'" + |
| | |
| | | ",stime = " + "'" + record.getStime() + "'" + |
| | | ",xtime = " + "'" + record.getXtime() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | | ",papprove = " + "'" + record.getPapprove() + "'" + |
| | |
| | | ",stime = " + "'" + record.getStime() + "'" + |
| | | ",xtime = " + "'" + record.getXtime() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(recordService.saveOrUpdate(record)); |
| | | } |
| | |
| | | recordService.removeByIds(Func.toLongList(id)); |
| | | String s1 = "delete from sys_record where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | record.setStorage("1"); |
| | | record.setType("2"); |
| | |
| | | "," + "'" + record.getChangecontactscell() + "'" + |
| | | ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | ",representativecell = " + "'" + information1.getRepresentativecell() + "'" + |
| | | " " + "where id = " + "'" + information1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }else { |
| | | //按组织机构查询 |
| | | Information information2 = new Information(); |
| | |
| | | ",representativecell = " + "'" + information1.getRepresentativecell() + "'" + |
| | | " " + "where id = " + "'" + information1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }else { |
| | | //设置未审核不通过 |
| | | record.setType("1"); |
| | |
| | | ",approve = " + "'" + record.getApprove() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | throw new ServiceException("当前公司单位未保安服务系统存在,请先注册!"); |
| | | } |
| | | } |
| | |
| | | ",approve = " + "'" + record.getApprove() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | //返回数据 |
| | | return R.status(status); |
| | |
| | | String s1 = "update sys_recordk set type = " + "'" + 0 + "'" + ",approve = " + "'" + recordk.getApprove() + "'" + |
| | | " " + "where id = " + "'" + recordk.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getRoleId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | //内网同步 |
| | | String s1 = "delete from blade_attach where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(attachService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | |
| | | in, in.available(), -1) |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | // InputStream inputStream = file.getInputStream(); |
| | | // FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName; |
| | | //数据封装 |
| | |
| | | in, in.available(), -1) |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | // InputStream inputStream = file.getInputStream(); |
| | | // FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName; |
| | | return R.data(urls); |
| | |
| | | in, in.available(), -1) |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | // InputStream inputStream = file.getInputStream(); |
| | | // FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName; |
| | | //数据封装 |
| | |
| | | |
| | | //内网数据推送 |
| | | //数据推送 |
| | | String s = "update blade_user set avatar = " + "'" + inUrl + "'" + "where id = " + "'" + user.getId() + "'"; |
| | | String s = "update blade_user set avatar = " + "'" + inUrl + |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + |
| | | "'" + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | // InputStream inputStream = multipartFile.getInputStream(); |
| | | // FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | } |
| | | } |
| | |
| | | "," + "'" + examPayment.getPaymentStatus() + "'" + |
| | | "," +"'" + inUrl + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | // InputStream inputStream = multipartFile.getInputStream(); |
| | | // FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | } |
| | | } |
| | |
| | | .build()); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | // InputStream inputStream = file.getInputStream(); |
| | | // FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName; |
| | | //数据封装 |
| | |
| | | s1 += ")"; |
| | | } |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return attach.getId(); |
| | | } |
| | | |
| | |
| | | + revoke.getType() + "'" + "," + "'" + revoke.getDeptid() + "'" + "," + "'" + revoke.getPtype() + "'" + "," + |
| | | "'" + revoke.getRepresentativecell() + "'" + "," + "'" + revoke.getContacts() + "'" + "," + "'" + revoke.getContactscell() + "'" + "," + |
| | | "'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" + "," + "'" + revoke.getCardid() + "'" + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | ",securitynumber = " + "'" + user.getSecuritynumber() + "'" + |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:dd").format(user.getUpdateTime()) + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | "'" + seinspect.getJurisdiction() + "'" + "," + |
| | | "'" + seinspect.getSecurityId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | "'" + shareholder.getCreditcode() + "'" + "," + |
| | | "'" + shareholder.getDeptId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | String s1 = |
| | | "insert into sys_shareholder(id,shareholder,shareholdingratio,capital,capitalTime,cardid,cell,creditCode,dept_id) " + |
| | |
| | | "'" + shareholder.getCreditcode() + "'" + "," + |
| | | "'" + shareholder.getDeptId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(save); |
| | | } |
| | |
| | | ",dept_id = " + "'" + shareholder.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //内网同步 |
| | | String s1 = "update sys_shareholder set shareholder = " + "'" + shareholder.getShareholder() + "'" + |
| | |
| | | ",dept_id = " + "'" + shareholder.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | |
| | | list.forEach(id -> { |
| | | String s1 = "delete from sys_shareholder where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(shareholderService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | + ",is_deleted = " + "'" + dept.getIsDeleted() + "'" |
| | | + " " + "where id = " + "'" + dept.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | // String id = kv.get("id").toString(); |
| | | // information.setDepartmentid(id); |
| | |
| | | //内网同步 |
| | | String s1 = "update blade_dept set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(deptService.removeDept(ids)); |
| | | } |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getJurisdiction() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } else { |
| | | //修改 |
| | |
| | | + ",cardid = " + "'" + user.getCardid() + "'" |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | |
| | |
| | | "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //新增 |
| | | if (null != user.getRtime()) { |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | |
| | |
| | | //内网更新 |
| | | String s1 = |
| | | "update blade_user set status = " + "'" + user.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | |
| | | return R.success("修改成功"); |
| | | } |
| | | } |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | String s1 = |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | if (!states) { |
| | | return R.data(201,null,"保安证编号不匹配,请核实!也可通过提供保安证件信息提交核实申请!"); |
| | |
| | | + ",cell = " + "'" + user.getCell() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | "update sys_accreditation_records set status = " + "'" + accreditationRecords1.getStatus() + "'" + |
| | | " " + "where id = " + "'" + accreditationRecords1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //返回 |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | //qfqk 同步 |
| | | myAsyncService.deleteUserByQfqk(user1); |
| | | //内网同步 |
| | | String s1 = "update blade_user set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | String s1 = "update blade_user set is_deleted = 1" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(userService.removeUser(ids)); |
| | | } |
| | |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" + |
| | | " where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | |
| | | //人员离职后修改派遣记录,修改从业记录 |
| | | updateUserDispatcherExp(user2); |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | } |
| | | |
| | |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //新增 |
| | | if (null != user.getRtime()) { |
| | |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | |
| | |
| | | package org.springblade.modules.system.service; |
| | | |
| | | import net.sf.json.JSONObject; |
| | | import org.springblade.common.config.DataSyncConfig; |
| | | import org.springblade.common.utils.HttpClientUtils; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.dataSync.MysqlCenlint; |
| | | import org.springblade.modules.system.dto.UserDTO; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springframework.scheduling.annotation.Async; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 数据同步 |
| | | * @param sql |
| | | */ |
| | | @Async |
| | | public void dataSync(String sql) { |
| | | //判断同步类型 |
| | | //sql 直连处理 |
| | | if (DataSyncConfig.type.equals("sql")) { |
| | | sqlDataHandler(sql); |
| | | } |
| | | |
| | | //ftp 连接同步 |
| | | if (DataSyncConfig.type.equals("ftp")){ |
| | | FTP(sql); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * sql 直连处理 |
| | | * @param sql sql |
| | | */ |
| | | @Async |
| | | public void sqlDataHandler(String sql) { |
| | | //以逗号分割 |
| | | String[] split = sql.split(";"); |
| | | if (null!=split && split.length>0) { |
| | | for (String sqls : split) { |
| | | //判断是否是新增,删除,修改 |
| | | String substring = sqls.substring(0, 2); |
| | | //新增 |
| | | if (substring.equals("in")) { |
| | | //运行sql语句 |
| | | MysqlCenlint.inster(sqls); |
| | | } |
| | | //修改 |
| | | else if (substring.equals("up")) { |
| | | MysqlCenlint.update(sqls); |
| | | } |
| | | //删除 |
| | | else { |
| | | MysqlCenlint.delete(sqls); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" |
| | | + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | return b; |
| | | } |
| | | |
| | |
| | | "," + "'" + user.getJurisdiction() + "'" |
| | | + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | }else { |
| | | //匹配组织机构是否一致,如果不一致 |
| | | if(!user2.getDeptId().equals(user.getDeptId())){ |
| | |
| | | + ",cardid = " + "'" + user2.getCardid() + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | }); |
| | |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }else { |
| | | status.set(false); |
| | | //加入集合 |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | else { |
| | | //匹配组织机构是否一致,如果不一致 |
| | |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }else { |
| | | status.set(false); |
| | | //加入集合 |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | }); |
| | |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | "'" + talk.getDeptid() + "'" + "," + |
| | | "'" + talk.getImgurl() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.success("新增成功"); |
| | | } |
| | |
| | | ",imgurl = " + "'" + talk.getImgurl() + "'" + |
| | | " " + "where id = " + "'" + talk.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_talk where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(talkService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | + "," +"'" + trainingRegistration.getAuditStatus() + "'" + ");" + |
| | | "update blade_user set is_train = " + user1.getIsTrain() + " " +"where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(sql); |
| | | myAsyncService.FTP(sql); |
| | | myAsyncService.dataSync(sql); |
| | | } |
| | | |
| | | |
| | |
| | | " " +"where id = " + "'" + trainingRegistration.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " +"where id = " + "'" + user.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | /** |
| | |
| | | "," + "'" + creatorTimeFormat +"'" + |
| | | "," +"'" + examPaper.getAuditStatus() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | |
| | | //修改报名信息 |
| | |
| | | + ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "," + "'" + creatorTimeFormat +"'" + |
| | | "," +"'" + examPaper.getAuditStatus() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | //修改报名信息 |
| | | list.forEach(id ->{ |
| | |
| | | + ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | }); |
| | |
| | | "update sys_training_registration set vip_status = " + "'" + trainingRegistration.getVipStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //更新并返回数据 |
| | | return R.data(trainingRegistrationService.updateById(trainingRegistration)); |
| | | } |
| | |
| | | "update sys_training_registration set vip_status = " + "'" + registration.getVipStatus() + "'" |
| | | + " " + "where id = " + "'" + registration.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | //更新 |
| | | trainingRegistrationService.updateById(registration); |
| | | } |
| | |
| | | + "," +"'" + trainingRegistration.getAuditStatus() + "'" + ");" + |
| | | "update blade_user set is_train = " + user1.getIsTrain() + " " +"where id = " + "'" + user1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | |
| | | |
| | |
| | | + "'" + examScore.getApplyId() + "'" + "," |
| | | + "'" + examScore.getExamId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | ",qualified = " + "'" + examScore1.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | }); |
| | | }else { |
| | | //数据同步 |
| | |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + |
| | | " " + "where id = " + "'" + trainingRegistration1.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "'" + workReport.getCategory() + "'" + "," + |
| | | "'" + workReport.getUserId() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } else { |
| | | workReport.setReplyDeptIds(getReplyDeptIds(workReport.getReceivedIds())); |
| | |
| | | ",user_id = " + "'" + workReport.getUserId() + "'" + |
| | | " " + "where id = " + "'" + workReport.getId() + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | //内网同步 |
| | | String s1 = "delete from sys_work_report where id = " + "'" + id + "'"; |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(workReportService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | "," + "'" + user.getExaminationType() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | myAsyncService.dataSync(s); |
| | | |
| | | } |
| | | return R.status(zcService.updateById(zc)); |
| | |
| | | |
| | | datasource: |
| | | # MySql |
| | | url: jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | url: jdbc:mysql://localhost:3306/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: ZHba@0112 |
| | | password: NCzhba@2022 |
| | | |
| | | # PostgreSQL |
| | | #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot |
| | |
| | | # qfqkBaseApiUrl: http://61.131.136.25:2082/api |
| | | qfqkBaseApiUrl: http://localhost:83 |
| | | |
| | | # 数据同步配置 |
| | | data: |
| | | sync: |
| | | type: sql |
| | | driver: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://localhost:3306/zhba?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: NCzhba@2022 |
| | | |
| | | #第三方登陆 |
| | | social: |
| | | enabled: true |
| | |
| | | |
| | | #ftp 设置 |
| | | ftp: |
| | | sqlConnect: jdbc:mysql://localhost:3306/zhbaw-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | sqlConnect: jdbc:mysql://192.168.0.126:3306/zhbaw-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | ftpHost: 117.40.91.118 |
| | | ftpPort: 21 |
| | | ftpUserName: zhbain |
| | |
| | | qfqkBaseApiUrl: http://192.168.0.198:83 |
| | | # qfqkBaseApiUrl : http://61.131.136.25:2082/api |
| | | |
| | | # 数据同步配置 |
| | | data: |
| | | sync: |
| | | type: sql |
| | | driver: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.0.126:3306/zhba-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: NCzhba@2022 |
| | | |
| | | #第三方登陆 |
| | | social: |
| | | enabled: true |