|
@ -3,8 +3,8 @@ package com.yihu.jw.hospital.prescription.service.entrance;
|
|
|
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.entity.hospital.mapping.HospitalDeptMappingDO;
|
|
|
import com.yihu.jw.hospital.mapping.dao.HospitalDeptMappingDao;
|
|
|
import com.yihu.jw.dict.dao.DictHospitalDeptDao;
|
|
|
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
|
|
@ -69,7 +69,7 @@ public class EntranceService {
|
|
|
@Value("${hospital.TargetSysCode}")
|
|
|
private String targetSysCode;
|
|
|
@Autowired
|
|
|
private HospitalDeptMappingDao hospitalDeptMappingDao;
|
|
|
private DictHospitalDeptDao DictHospitalDeptDao;
|
|
|
|
|
|
/**
|
|
|
* 获取本地示例返参
|
|
@ -698,7 +698,7 @@ public class EntranceService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
@org.springframework.transaction.annotation.Transactional(rollbackFor = Exception.class)
|
|
|
public List<HospitalDeptMappingDO> MS02001(boolean demoFlag) throws Exception {
|
|
|
public List<DictHospitalDeptDO> MS02001(boolean demoFlag) throws Exception {
|
|
|
String fid=MS02001;
|
|
|
String resp="";
|
|
|
if (demoFlag) {
|
|
@ -716,14 +716,19 @@ public class EntranceService {
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
}
|
|
|
JSONArray jsonArray= ConvertUtil.convertListEnvelopInBody(resp);
|
|
|
List<HospitalDeptMappingDO> hospitalDeptMappingDOS=new ArrayList<>();
|
|
|
HospitalDeptMappingDO hdmDo;
|
|
|
List<DictHospitalDeptDO> hospitalDeptMappingDOS=new ArrayList<>();
|
|
|
DictHospitalDeptDO hdmDo;
|
|
|
String orgCode="350211A1002";
|
|
|
//删除旧数据
|
|
|
hospitalDeptMappingDao.deleteBySource("1");
|
|
|
DictHospitalDeptDao.deleteBySource(orgCode);
|
|
|
for(Object object:jsonArray){
|
|
|
hdmDo=new HospitalDeptMappingDO();
|
|
|
hdmDo=new DictHospitalDeptDO();
|
|
|
net.sf.json.JSONObject jsonObjectBody=(net.sf.json.JSONObject)object;
|
|
|
hdmDo.setSerialNo(null==jsonObjectBody.get("Serial_No")?"":jsonObjectBody.get("Serial_No").toString());
|
|
|
hdmDo.setOrgCode(orgCode);
|
|
|
hdmDo.setCode(null==jsonObjectBody.get("Dept_Code")?"":jsonObjectBody.get("Dept_Code").toString());
|
|
|
hdmDo.setName(null==jsonObjectBody.get("Dept_Name")?"":jsonObjectBody.get("Dept_Name").toString());
|
|
|
hdmDo.setDeptTypeCode(null==jsonObjectBody.get("Dept_Type_Code")?"":jsonObjectBody.get("Dept_Type_Code").toString());
|
|
|
/* hdmDo.setSerialNo(null==jsonObjectBody.get("Serial_No")?"":jsonObjectBody.get("Serial_No").toString());
|
|
|
hdmDo.setDeptCode(null==jsonObjectBody.get("Dept_Code")?"":jsonObjectBody.get("Dept_Code").toString());
|
|
|
hdmDo.setDeptName(null==jsonObjectBody.get("Dept_Name")?"":jsonObjectBody.get("Dept_Name").toString());
|
|
|
hdmDo.setDeptAlias(null==jsonObjectBody.get("Dept_Alias")?"":jsonObjectBody.get("Dept_Alias").toString());
|
|
@ -736,7 +741,6 @@ public class EntranceService {
|
|
|
hdmDo.setInputCode(null==jsonObjectBody.get("Input_Code")?"":jsonObjectBody.get("Input_Code").toString());
|
|
|
hdmDo.setPinyinCode(null==jsonObjectBody.get("Pinyin_Code")?"":jsonObjectBody.get("Pinyin_Code").toString());
|
|
|
hdmDo.setWubiCode(null==jsonObjectBody.get("Wubi_Code")?"":jsonObjectBody.get("Wubi_Code").toString());
|
|
|
hdmDo.setDeptTypeCode(null==jsonObjectBody.get("Dept_Type_Code")?"":jsonObjectBody.get("Dept_Type_Code").toString());
|
|
|
hdmDo.setLocation(null==jsonObjectBody.get("Location")?"":jsonObjectBody.get("Location").toString());
|
|
|
hdmDo.setDisplaySequence(null==jsonObjectBody.get("Display_Sequence")?"":jsonObjectBody.get("Display_Sequence").toString());
|
|
|
hdmDo.setOpenBedNum(null==jsonObjectBody.get("Open_Bed_Num")?"":jsonObjectBody.get("Open_Bed_Num").toString());
|
|
@ -749,11 +753,12 @@ public class EntranceService {
|
|
|
hdmDo.setDeptZipCode(null==jsonObjectBody.get("Dept_Zip_Code")?"":jsonObjectBody.get("Dept_Zip_Code").toString());
|
|
|
hdmDo.setDeDlid(null==jsonObjectBody.get("De_Dlid")?"":jsonObjectBody.get("De_Dlid").toString());
|
|
|
hdmDo.setDeLcid(null==jsonObjectBody.get("De_Lcid")?"":jsonObjectBody.get("De_Lcid").toString());
|
|
|
hdmDo.setSource("1");
|
|
|
hdmDo.setSource("1");*/
|
|
|
hdmDo.setCreateTime(new Date());
|
|
|
hospitalDeptMappingDOS.add(hdmDo);
|
|
|
}
|
|
|
hospitalDeptMappingDao.save(hospitalDeptMappingDOS);
|
|
|
DictHospitalDeptDao.save(hospitalDeptMappingDOS);
|
|
|
// hospitalDeptMappingDao.save(hospitalDeptMappingDOS);
|
|
|
return hospitalDeptMappingDOS;
|
|
|
}
|
|
|
|