|
@ -77,7 +77,7 @@ public class ZyDictJob implements Job {
|
|
|
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_subject_class_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_subject_class_dict() {
|
|
|
String dictName = this.IV_SUBJECT_CLASS_DICT;
|
|
|
List<ZyIvSubjectClassDict> zyIvSubjectClassDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -91,7 +91,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_staff_reg_type_allot_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_staff_reg_type_allot_dict() {
|
|
|
String dictName = this.IV_STAFF_REG_TYPE_ALLOT_DICT;
|
|
|
List<ZyIvStaffRegTypeAllotDict> zyIvStaffRegTypeAllotDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -104,7 +104,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZ_iv_staff_dict() throws Exception {
|
|
|
private void synchronizeZ_iv_staff_dict() {
|
|
|
String dictName = this.IV_STAFF_DICT;
|
|
|
List<ZyIvStaffDict> zyIvStaffDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -116,7 +116,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_physic_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_physic_dict() {
|
|
|
String dictName = this.IV_PHYSIC_DICT;
|
|
|
List<ZyIvPhysicDict> zyIvPhysicDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -129,7 +129,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_org_physic_allot_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_org_physic_allot_dict() {
|
|
|
String dictName = this.IV_ORG_PHYSIC_ALLOT_DICT;
|
|
|
List<ZyIvOrgPhysicAllotDict> zyIvOrgPhysicAllotDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -143,7 +143,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_diagnose_class_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_diagnose_class_dict() {
|
|
|
String dictName = this.IV_DIAGNOSE_CLASS_DICT;
|
|
|
List<ZyIvDiagnoseClassDict> zIvDiagnoseClassDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -157,7 +157,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_dept_staff_allot_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_dept_staff_allot_dict() {
|
|
|
String dictName = this.IV_DEPT_STAFF_ALLOT_DICT;
|
|
|
List<ZyIvDeptStaffAllotDict> syIvDeptStaffAllotDictz = new ArrayList<>();
|
|
|
//得到list
|
|
@ -172,7 +172,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZyCommonDict() throws Exception {
|
|
|
private void synchronizeZyCommonDict() {
|
|
|
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,6 +191,9 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
if (returnJson.containsKey("data")) {
|
|
|
JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
|
|
|
if(dataJSONArray.size()==0){
|
|
|
throw new Exception("zy dict error data size 0");
|
|
|
}
|
|
|
ZyCommonDict[] zyCommonDictArrays = (ZyCommonDict[]) JSONArray.toArray(dataJSONArray, ZyCommonDict.class);
|
|
|
zyCommonDictz.addAll(Arrays.asList(zyCommonDictArrays));
|
|
|
} else {
|
|
@ -216,7 +219,7 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
private void synchronizeZy_iv_dept_dict() throws Exception {
|
|
|
private void synchronizeZy_iv_dept_dict() {
|
|
|
String dictName = this.IV_DEPT_DICT;
|
|
|
List<ZyIvDeptDict> zyIvDeptDicts = new ArrayList<>();
|
|
|
//得到list
|
|
@ -237,7 +240,6 @@ public class ZyDictJob implements Job {
|
|
|
* @param dictName 字典名称
|
|
|
*/
|
|
|
private void commonGetOneDict(List tList, Class clazz, String dictName) {
|
|
|
|
|
|
String json = null;
|
|
|
try {
|
|
|
//调用智业的接口得到字典
|
|
@ -248,6 +250,9 @@ public class ZyDictJob implements Job {
|
|
|
}
|
|
|
if (returnJson.containsKey("data")) {
|
|
|
JSONArray dataJSONArray = returnJson.getJSONObject("data").getJSONArray("returnData");
|
|
|
if(dataJSONArray.size()==0){
|
|
|
throw new Exception("zy dict error data size 0");
|
|
|
}
|
|
|
tList.addAll(Arrays.asList(JSONArray.toArray(dataJSONArray, clazz)));
|
|
|
} else {
|
|
|
throw new Exception("zy dict error no contain data");
|