wangzhinan 1 місяць тому
батько
коміт
222d1615c0

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

@ -17,6 +17,8 @@ public interface PrescriptionInfoDao extends PagingAndSortingRepository<WlyyPres
    @Query("select a from WlyyPrescriptionInfoDO a where a.prescriptionId = ?1 and a.del=?2 ")
    List<WlyyPrescriptionInfoDO> findByPrescriptionId(String prescriptionId,Integer del);
    List<WlyyPrescriptionInfoDO> findByPrescriptionIdAndDel(String prescriptionId, Integer del);
    List<WlyyPrescriptionInfoDO> queryAllByPrescriptionIdInAndDel(Set ids,Integer del);

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

@ -2099,12 +2099,15 @@ public class HcyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        String registerNo = outpatientDO.getRegisterNo();
        List<WlyyPrescriptionExpressageDO> prescriptionExpressageDOS = prescriptionExpressageDao.findByOutpatientId(outpatientId);
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findByRealOrder(realorder);
        List<WlyyPrescriptionInfoDO> infoDOS= prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1);
        System.out.println("111111111111111111"+wlyyPrescriptionDO.getId());
        String sql = "select * from wlyy_prescription_info a where a.prescription_id = '"+wlyyPrescriptionDO.getId()+"' and a.del=1";
        List<Map<String,Object>> mapList = jdbcTemplate.queryForList(sql);
        System.out.println("222222222222222222"+mapList.size());
        WlyyPrescriptionExpressageDO expressageDO = new WlyyPrescriptionExpressageDO();
        if (prescriptionExpressageDOS!=null&&prescriptionExpressageDOS.size()!=0){
            expressageDO = prescriptionExpressageDOS.get(0);
        }
        if (expressageDO!=null&&infoDOS!=null&&infoDOS.size()!=0){
        if (expressageDO!=null&&mapList!=null&&mapList.size()!=0){
            if (expressageDO.getOneselfPickupFlg()==0){
                WlyyHospitalSysDictDO hospitalSysDictDO = wlyyHospitalSysDictDao.findById("sendDrugsMessage");
                String content = "患者"+outpatientDO.getPatientName()+"的处方药品已下单,需要快递配送,请及时登录系统进行查看处理!";