|
@@ -100,36 +100,36 @@ public class MoveYmjzDataController {
|
|
|
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-1.sql");
|
|
|
+ File file = new File("/usr/local/sql/jmjl2021-09-24.sql");
|
|
|
if (!file.exists()) {
|
|
|
file.createNewFile();
|
|
|
}
|