Browse Source

修改bug

wangzhinan 5 months ago
parent
commit
5f4ec7d0e8

+ 1 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java

@ -1849,7 +1849,6 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                                    medicalMxDO.setItemCode(dobject.getString("MED_LIST_CODG"));
                                    medicalMxDO.setPrescriptionCode(dobject.getString(""));
                                    medicalMxDO.setChargeUnit(dobject.getString("PRCUNT"));
                                    medicalMxDO.setSpecificationType(dobject.getString(""));
                                    medicalMxDO.setAmount(dobject.getString("CNT"));
                                    medicalMxDO.setPrice(dobject.getString("PRIC"));
                                    medicalMxDO.setPrescriptionCode(dobject.getString("RXNO"));
@ -2124,7 +2123,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                }
                try {
                    logger.info("=================电子发票开具开始=================");
                   /* hcyyEntranceService.OutpatientInvoicing(ylzMedicalRelationDO.getHisBillSerial(),"lb");*/
//                  hcyyEntranceService.OutpatientInvoicing(ylzMedicalRelationDO.getHisBillSerial(),"lb");
                    logger.info("=================电子发票开具结束=================");
                }catch (Exception e){
                    e.printStackTrace();

+ 15 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -4659,7 +4659,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        rs.put("is_prescribe",0);
                    }
                }else {
                    String isPrescribe =healthCareService.doctorAuthentication(doctorDO.getId());
                    String isPrescribe =healthCareNewService.doctorAuthentication(doctorDO.getId());
                    if (StringUtils.isNoneBlank(isPrescribe)){
                        rs.put("is_prescribe", isPrescribe);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                    }else {
@ -5137,8 +5137,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    }else {
                        rs.put("is_prescribe",0);
                    }
                }else {
                }else if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                    rs.put("is_prescribe", healthCareService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                }else {
                    rs.put("is_prescribe", healthCareNewService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                }
            }else{
                rs.put("is_prescribe", 0);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
@ -7961,7 +7963,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }else {
                }else if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                    String result = healthCareService.authorized(basePatientDO.getId());
                    com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")){
@ -7971,6 +7973,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }else {
                    String result = healthCareNewService.authorized(basePatientDO.getId());
                    com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")){
                        com.alibaba.fastjson.JSONObject encryptData = object.getJSONObject("encrypt_data");
                        String state = encryptData.getString("state");
                        String auth_date = encryptData.getString("auth_date");
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }
            }catch (Exception e){
                e.printStackTrace();

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -425,6 +425,7 @@ public class DsyyEntranceService {
                            String pw = idcard.substring(idcard.length() - 6);
                            doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                            doctor.setSalt(salt);
                            doctor.setAtddrNo(doctorJson.getString("countryCode"));
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
                            doctor.setJobTitleName(doctorJson.getString("jobTitleName"));
@ -493,6 +494,7 @@ public class DsyyEntranceService {
                            doctor.setDel("1");
                            doctor.setEnabled(1);
                            doctor.setLocked(0);
                            doctor.setAtddrNo(doctorJson.getString("countryCode"));
                            doctor.setCreateTime(new Date());
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));

+ 14 - 1
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -8,6 +8,7 @@ import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.prescription.WlyyInspectionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.healthCare.service.HealthCareNewService;
import com.yihu.jw.healthCare.service.HealthCareService;
import com.yihu.jw.hospital.jw.JwArchiveRecordBaseService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
@ -80,6 +81,8 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
    @Autowired
    private HealthCareService healthCareService;
    @Autowired
    private HealthCareNewService healthCareNewService;
    @Autowired
    private BasePatientDao patientDao;
    @Autowired
    private PrescriptionDao prescriptionDao;
@ -424,7 +427,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
                    basePatientDO.setMedicalState(state);
                    basePatientDO = basePatientDao.save(basePatientDO);
                }
            } else {
            } else if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                String result = healthCareService.authorized(basePatientDO.getId());
                JSONObject object = JSONObject.parseObject(result);
                if (object.getString("flag").equalsIgnoreCase("1")) {
@ -434,6 +437,16 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
                    basePatientDO.setMedicalState(state);
                    basePatientDO = basePatientDao.save(basePatientDO);
                }
            }else {
                String result = healthCareNewService.authorized(basePatientDO.getId());
                JSONObject object = JSONObject.parseObject(result);
                if (object.getString("flag").equalsIgnoreCase("1")) {
                    JSONObject encryptData = object.getJSONObject("encrypt_data");
                    String state = encryptData.getString("state");
                    String auth_date = encryptData.getString("auth_date");
                    basePatientDO.setMedicalState(state);
                    basePatientDO = basePatientDao.save(basePatientDO);
                }
            }
        }
        return basePatientDO;