| | |
| | | import java.sql.DriverManager; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.SQLException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Component |
| | |
| | | public static void inster(String sql) { |
| | | sqlConnect(sql,2); |
| | | try { |
| | | Thread.sleep(300); |
| | | Thread.sleep(500); |
| | | //对比 sql 字符串,如果是是往用户表里插入保安员数据,则调用公安审查接口 |
| | | String insertUserSql = "insert into blade_user"; |
| | | if (sql.contains(insertUserSql)){ |
| | |
| | | && res.getJSONObject(i).get("zdrylbjh").toString() != "" |
| | | && res.getJSONObject(i).get("zdrylbjh").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("zdrylbjh").toString()); |
| | | // user.setExaminationMx(res.getJSONObject(i).get("zdrylbjh").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | //同步内网 |
| | | String sql = "update blade_user set examination_type = " + user.getExaminationType() + " " |
| | | + ",examination_mx = " + "'" + res.getJSONObject(i).get("zdrylbjh").toString() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | update(sql); |
| | | 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()); |
| | | // user.setExaminationMx(res.getJSONObject(i).get("zdryxlmc").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | //同步内网 |
| | | String sql = "update blade_user set examination_type = " + user.getExaminationType() + " " |
| | | + ",examination_mx = " + "'" + res.getJSONObject(i).get("zdryxlmc").toString() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | update(sql); |
| | | 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()); |
| | | // user.setExaminationMx(res.getJSONObject(i).get("ztrylx").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | //同步内网 |
| | | String sql = "update blade_user set examination_type = " + user.getExaminationType() + " " |
| | | + ",examination_mx = " + "'" + res.getJSONObject(i).get("ztrylx").toString() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | update(sql); |
| | | break; |
| | | } |
| | | // if (res.getJSONObject(i).get("ajlbmc").toString() != null |