|
@ -78,6 +78,7 @@ public class ZyDictJob implements Job {
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_subject_class_dict() {
|
|
|
logger.info("synchronized zy_iv_subject_class_dict start");
|
|
|
String dictName = this.IV_SUBJECT_CLASS_DICT;
|
|
|
List<ZyIvSubjectClassDict> zyIvSubjectClassDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -87,11 +88,13 @@ public class ZyDictJob implements Job {
|
|
|
zyIvSubjectClassDictDao.deleteAll();
|
|
|
//新增数据
|
|
|
zyIvSubjectClassDictDao.save(zyIvSubjectClassDicts);
|
|
|
logger.info("synchronized zy_iv_subject_class_dict end");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_staff_reg_type_allot_dict() {
|
|
|
logger.info("synchronized zy_iv_staff_reg_type_allot_dict start");
|
|
|
String dictName = this.IV_STAFF_REG_TYPE_ALLOT_DICT;
|
|
|
List<ZyIvStaffRegTypeAllotDict> zyIvStaffRegTypeAllotDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -101,10 +104,12 @@ public class ZyDictJob implements Job {
|
|
|
zyIvStaffRegTypeAllotDictDao.deleteAll();
|
|
|
//新增数据
|
|
|
zyIvStaffRegTypeAllotDictDao.save(zyIvStaffRegTypeAllotDicts);
|
|
|
logger.info("synchronized zy_iv_staff_reg_type_allot_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZ_iv_staff_dict() {
|
|
|
logger.info("synchronized zy_iv_staff_dict start");
|
|
|
String dictName = this.IV_STAFF_DICT;
|
|
|
List<ZyIvStaffDict> zyIvStaffDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -113,10 +118,12 @@ public class ZyDictJob implements Job {
|
|
|
zyIvStaffDictDao.deleteAll();
|
|
|
//新增数据
|
|
|
zyIvStaffDictDao.save(zyIvStaffDicts);
|
|
|
logger.info("synchronized zy_iv_staff_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_physic_dict() {
|
|
|
logger.info("synchronized zy_iv_physic_dict start");
|
|
|
String dictName = this.IV_PHYSIC_DICT;
|
|
|
List<ZyIvPhysicDict> zyIvPhysicDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -126,10 +133,12 @@ public class ZyDictJob implements Job {
|
|
|
zyIvPhysicDictDao.deleteAll();
|
|
|
//新增数据
|
|
|
zyIvPhysicDictDao.save(zyIvPhysicDicts);
|
|
|
logger.info("synchronized zy_iv_physic_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_org_physic_allot_dict() {
|
|
|
logger.info("synchronized zy_iv_org_physic_allot_dict start");
|
|
|
String dictName = this.IV_ORG_PHYSIC_ALLOT_DICT;
|
|
|
List<ZyIvOrgPhysicAllotDict> zyIvOrgPhysicAllotDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -140,10 +149,12 @@ public class ZyDictJob implements Job {
|
|
|
//新增数据
|
|
|
zyIvOrgPhysicAllotDictDao.save(zyIvOrgPhysicAllotDicts);
|
|
|
}
|
|
|
logger.info("synchronized zy_iv_org_physic_allot_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_diagnose_class_dict() {
|
|
|
logger.info("synchronized zy_iv_diagnose_class_dict start");
|
|
|
String dictName = this.IV_DIAGNOSE_CLASS_DICT;
|
|
|
List<ZyIvDiagnoseClassDict> zIvDiagnoseClassDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -154,10 +165,12 @@ public class ZyDictJob implements Job {
|
|
|
//新增数据
|
|
|
zyIvDiagnoseClassDictDao.save(zIvDiagnoseClassDicts);
|
|
|
}
|
|
|
logger.info("synchronized zy_iv_diagnose_class_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_dept_staff_allot_dict() {
|
|
|
private void synchronizeZy_iv_dept_staff_allot_dict() {
|
|
|
logger.info("synchronized zy_iv_dept_staff_allot_dict start");
|
|
|
String dictName = this.IV_DEPT_STAFF_ALLOT_DICT;
|
|
|
List<ZyIvDeptStaffAllotDict> syIvDeptStaffAllotDictz = new ArrayList<>();
|
|
|
//得到list
|
|
@ -169,10 +182,12 @@ public class ZyDictJob implements Job {
|
|
|
//新增数据
|
|
|
zyIvDeptStaffAllotDictDao.save(syIvDeptStaffAllotDictz);
|
|
|
}
|
|
|
logger.info("synchronized zy_iv_dept_staff_allot_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZyCommonDict() {
|
|
|
logger.info("synchronized zy_common_dict start");
|
|
|
String[] dictNames = new String[]{
|
|
|
this.IV_PHYSIC_FORM_DICT, this.IV_PHYSIC_INJECT_PLACE_DICT, this.IV_PHYSIC_SKIN_TEST_DICT,
|
|
|
this.IV_RATE_TYPE_DICT, this.IV_RECIPE_FREQUENCY_DICT, this.IV_RECIPE_USAGE_DICT,
|
|
@ -191,7 +206,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
if (returnJson.containsKey("data")) {
|
|
|
JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
|
|
|
if(dataJSONArray.size()==0){
|
|
|
if (dataJSONArray.size() == 0) {
|
|
|
throw new Exception("zy dict error data size 0");
|
|
|
}
|
|
|
ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(dataJSONArray, ZyCommonDict.class);
|
|
@ -216,10 +231,13 @@ public class ZyDictJob implements Job {
|
|
|
zyCommonDictDao.save(zyCommonDictz);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
logger.info("synchronized zy_common_dict end");
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_dept_dict() {
|
|
|
private void synchronizeZy_iv_dept_dict() {
|
|
|
logger.info("synchronized zy_iv_dept_dict start");
|
|
|
String dictName = this.IV_DEPT_DICT;
|
|
|
List<ZyIvDeptDict> zyIvDeptDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -230,6 +248,7 @@ public class ZyDictJob implements Job {
|
|
|
//新增数据
|
|
|
zyIvDeptDictDao.save(zyIvDeptDicts);
|
|
|
}
|
|
|
logger.info("synchronized zy_iv_dept_dict end");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -250,7 +269,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
if (returnJson.containsKey("data")) {
|
|
|
JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
|
|
|
if(dataJSONArray.size()==0){
|
|
|
if (dataJSONArray.size() == 0) {
|
|
|
throw new Exception("zy dict error data size 0");
|
|
|
}
|
|
|
tList.addAll(Arrays.asList(JSONArray.toArray(dataJSONArray, clazz)));
|