|
@@ -65,7 +65,7 @@ public class MoveYmjzDataController {
|
|
|
List<JSONObject> ymjzList = mapper.selectAll();
|
|
|
// List<JSONObject> idCardUserNameList = mapper.listVacc();
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
- for (int i = 0; i < ymjzList.size(); i++) {
|
|
|
+ for (int i = 0; i < 30; i++) {
|
|
|
JSONObject ymjz = ymjzList.get(i);
|
|
|
String 受种者编码 = ymjz.getString("受种者编码");
|
|
|
String 受种者姓名 = ymjz.getString("受种者姓名");
|
|
@@ -95,41 +95,41 @@ public class MoveYmjzDataController {
|
|
|
, maxId, 受种者姓名, 受种者性别, ymjz.getString("身份证")
|
|
|
, 电话号码, "是", 生产厂家, 接种针次, 接种日期
|
|
|
, 接种单位, "是", progress, "否"
|
|
|
- , 受种者编码, 出生日期, 工作单位, 人群分类, 生产厂家, null, 1, 2
|
|
|
+ , 受种者编码, 出生日期, 工作单位, 人群分类, 生产厂家, 0, 1, 2
|
|
|
, i);
|
|
|
stringBuilder.append(insert);
|
|
|
System.err.println("count: " + i + ", " + insert);
|
|
|
} else {
|
|
|
- idCard = info.getIdCard();
|
|
|
- Integer age = 0;
|
|
|
- try {
|
|
|
- age = VaccineInfoServiceImpl.getAge(info.getIdCard());
|
|
|
- } catch (Exception e) {
|
|
|
- age = null;
|
|
|
- }
|
|
|
- VaccineInfoServiceImpl.shouldSlow(info);
|
|
|
- String update = String.format("UPDATE vaccine_info " +
|
|
|
- "set code = '%s', crowd_classification = '%s', vaccine_name = '%s', manufacturer = '%s'" +
|
|
|
- ", jici = '%s', vaccination_time = '%s', age = '%s', birthday = '%s', progress = '%s'" +
|
|
|
- ", dept_id = '%s', `is_vaccination` = '是', `should_be` = '%s', `should_slow` = '%s' " +
|
|
|
- "where code = '%s' or (id_card like '%s' and user_name like '%s' ); -- %s \r\n"
|
|
|
- , 受种者编码, 人群分类, 生产厂家, 生产厂家
|
|
|
- , 接种针次, 接种日期, age, 出生日期, progress
|
|
|
- , info.getDeptId(), Strings.nullToEmpty(info.getShouldBe()), Strings.nullToEmpty(info.getShouldSlow()),
|
|
|
- 受种者编码, "%" + split[1] + "%", "%" + 受种者姓名 + "%",i);
|
|
|
- stringBuilder.append(update);
|
|
|
- System.err.println("count: " + i + ", " + update);
|
|
|
+// idCard = info.getIdCard();
|
|
|
+// Integer age = 0;
|
|
|
+// try {
|
|
|
+// age = VaccineInfoServiceImpl.getAge(info.getIdCard());
|
|
|
+// } catch (Exception e) {
|
|
|
+// age = null;
|
|
|
+// }
|
|
|
+// VaccineInfoServiceImpl.shouldSlow(info);
|
|
|
+// String update = String.format("UPDATE vaccine_info " +
|
|
|
+// "set code = '%s', crowd_classification = '%s', vaccine_name = '%s', manufacturer = '%s'" +
|
|
|
+// ", jici = '%s', vaccination_time = '%s', age = '%s', birthday = '%s', progress = '%s'" +
|
|
|
+// ", dept_id = '%s', `is_vaccination` = '是', `should_be` = '%s', `should_slow` = '%s' " +
|
|
|
+// "where code = '%s' or (id_card like '%s' and user_name like '%s' ); -- %s \r\n"
|
|
|
+// , 受种者编码, 人群分类, 生产厂家, 生产厂家
|
|
|
+// , 接种针次, 接种日期, age, 出生日期, progress
|
|
|
+// , info.getDeptId(), Strings.nullToEmpty(info.getShouldBe()), Strings.nullToEmpty(info.getShouldSlow()),
|
|
|
+// 受种者编码, "%" + split[1] + "%", "%" + 受种者姓名 + "%",i);
|
|
|
+// stringBuilder.append(update);
|
|
|
+// System.err.println("count: " + i + ", " + update);
|
|
|
}
|
|
|
|
|
|
- Long maxId = IdUtils.getMaxId("vaccine_info_user", "id");
|
|
|
- String userInsert = String.format("insert into vaccine_info_user (id, id_card, vaccine_name, jici, vaccination_time, vaccination_place) " +
|
|
|
- "values('%s', '%s', '%s', '%s', '%s', '%s');\r\n", maxId, idCard, 生产厂家, 接种针次, 接种日期, 接种单位);
|
|
|
- stringBuilder.append(userInsert);
|
|
|
- System.err.println("vaccine_info_user count: " + i + ", " + userInsert);
|
|
|
+// Long maxId = IdUtils.getMaxId("vaccine_info_user", "id");
|
|
|
+// String userInsert = String.format("insert into vaccine_info_user (id, id_card, vaccine_name, jici, vaccination_time, vaccination_place) " +
|
|
|
+// "values('%s', '%s', '%s', '%s', '%s', '%s');\r\n", maxId, idCard, 生产厂家, 接种针次, 接种日期, 接种单位);
|
|
|
+// stringBuilder.append(userInsert);
|
|
|
+// System.err.println("vaccine_info_user count: " + i + ", " + userInsert);
|
|
|
}
|
|
|
|
|
|
// File file = new File("F:\\desk\\ymjz\\jmjl2021-09-18.sql");
|
|
|
- File file = new File("/usr/local/sql/jmjl2021-09-18.sql");
|
|
|
+ File file = new File("/usr/local/sql/jmjl2021-09-18-1.sql");
|
|
|
if (!file.exists()) {
|
|
|
file.createNewFile();
|
|
|
}
|