Pārlūkot izejas kodu

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangjun 4 gadi atpakaļ
vecāks
revīzija
c7d458e064

+ 10 - 8
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java

@ -64,7 +64,7 @@ public class TnyyEntranceService {
    private DoctorMappingDao doctorMappingDao;
    @Autowired
    private YkDictIcd10Dao ykDictIcd10Dao;
    private final static String orgCode ="350211A5004";
    private final static String orgCode ="350211A1002";
    @Autowired
    private PatientMappingDao patientMappingDao;
@ -73,7 +73,7 @@ public class TnyyEntranceService {
    //同步科室
    public String updateTnyyDept() throws Exception {
        String sql = "select KSDM,KSMC,PYDM,PLSX,JGBM from GY_KSDM ";
        String sql = "select KSDM,KSMC,PYDM,PLSX,JGBM from GY_KSDM  ";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("updateTnyyDept:"+sql);
@ -90,7 +90,7 @@ public class TnyyEntranceService {
                String ksdm = deptObj.getString("KSDM");
                String jgbm = deptObj.getString("JGBM");
                String ksmc = deptObj.getString("KSMC");
                List<DictHospitalDeptDO> list = hospitalDeptDao.findByOrgCodeAndCode(jgbm,ksdm);
                List<DictHospitalDeptDO> list = hospitalDeptDao.findByOrgCodeAndCode(orgCode,ksdm);
                if (list!=null&&list.size()!=0){
                    DictHospitalDeptDO dictHospitalDeptDO = list.get(0);
                    dictHospitalDeptDO.setCode(ksdm);
@ -114,7 +114,7 @@ public class TnyyEntranceService {
    //更新泰安医生信息
    public String updateTnyyDoctor(String idCard)throws Exception{
        String sql ="select sfzh,LXDH,YGDM,KSDM,YGXM,YGXB,CSNY,YSJJ from GY_YGDM where ZFPB=1 and sfzh is not null ";
        String sql ="select sfzh,LXDH,YGDM,KSDM,YGXM,YGXB,CSNY,YSJJ from GY_YGDM where ZFPB=0 and sfzh is not null and len(ygbh) =3 and ksyq >0 and ksdm <> '2118' ";
        if (StringUtils.isNoneBlank(idCard)){
            sql +=" and sfzh ='"+idCard+"' ";
        }
@ -142,16 +142,17 @@ public class TnyyEntranceService {
                            BaseDoctorDO doctor = doctorDOs.get(0);
                            String salt = randomString(5);
                            /*String salt = randomString(5);
                            String pw = idcard.substring(idcard.length() - 6);
                            doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                            doctor.setSalt(salt);
                            doctor.setSalt(salt);*/
                            /*doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
                            doctor.setJobTitleName(doctorJson.getString("jobTitleName"));*/
//                            doctor.setExpertise(doctorJson.getString("expertise"));
//                            doctor.setIntroduce(doctorJson.getString("introduce"));
//                            doctor.setMobile(doctorJson.getString("mobile"));
                            doctor.setMobile(doctorJson.getString("LXDH"));
                            BaseDoctorDO temp = baseDoctorDao.save(doctor);
@ -173,6 +174,7 @@ public class TnyyEntranceService {
                            doctor.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard)));
                            doctor.setBirthday(IdCardUtil.getBirthdayForIdcard(idcard));
                            doctor.setMobile(doctorJson.getString("LXDH"));
                            doctor.setProvinceCode("370000");
                            doctor.setProvinceName("山东省");
@ -202,7 +204,7 @@ public class TnyyEntranceService {
                            BaseDoctorHospitalDO hospitalDO = new BaseDoctorHospitalDO();
                            hospitalDO.setDoctorCode(temp.getId());
                            hospitalDO.setOrgCode(orgCode);
                            hospitalDO.setOrgName("泰安中医院");
                            hospitalDO.setOrgName("泰安市中医医院");
                            hospitalDO.setDeptCode(doctorJson.getString("KSDM"));
                            hospitalDO.setDel("1");
                            baseDoctorHospitalDao.save(hospitalDO);
@ -220,7 +222,7 @@ public class TnyyEntranceService {
                            mappingDO.setDoctorName(temp.getName());
                            mappingDO.setOrgCode(orgCode);
                            mappingDO.setOrgName("泰安中医院");
                            mappingDO.setOrgName("泰安市中医医院");
                            mappingDO.setMappingCode(doctorJson.getString("YGDM"));
                            mappingDO.setMappingName(temp.getName());