Browse Source

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

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/hospital/prescription/WlyyPrescriptionExpressageLogDO.java
wangzhinan 4 years ago
parent
commit
eb84cde666

+ 11 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/doctor/dao/service/BaseDoctorBGService.java

@ -114,7 +114,11 @@ public class BaseDoctorBGService extends BaseJpaService<BaseDoctorBackgroundDO,
            List<Map<String,Object>> maps = jdbcTemplate.queryForList(sql);
            Integer isSort=0;
            if (maps!=null&&maps.size()!=0){
                isSort = Integer.parseInt(maps.get(0).get("total").toString())+1;
                if (maps.get(0).get("total")!=null){
                    isSort = Integer.parseInt(maps.get(0).get("total").toString())+1;
                }else {
                    isSort=isSort+1;
                }
            }else {
                isSort=isSort+1;
            }
@ -139,7 +143,12 @@ public class BaseDoctorBGService extends BaseJpaService<BaseDoctorBackgroundDO,
        List<Map<String,Object>> maps = jdbcTemplate.queryForList(sql);
        Integer isSort=0;
        if (maps!=null&&maps.size()!=0){
            isSort = Integer.parseInt(maps.get(0).get("total").toString())+1;
            if (maps.get(0).get("total")!=null){
                isSort = Integer.parseInt(maps.get(0).get("total").toString())+1;
            }else {
                isSort=isSort+1;
            }
        }else {
            isSort=isSort+1;
        }

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

@ -846,12 +846,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        WlyyPrescriptionExpressageDO previous = checkOutPatientPre(outpatientDO.getPatient());
        //2.物流信息
        WlyyPrescriptionExpressageDO expressageDO = objectMapper.readValue(expressageJson, WlyyPrescriptionExpressageDO.class);
        if (null!=previous&&previous.getOneselfPickupFlg()!=expressageDO.getOneselfPickupFlg()){
      /*  if (null!=previous&&previous.getOneselfPickupFlg()!=expressageDO.getOneselfPickupFlg()){
            outpatientDao.delete(outpatient.getId());
            businessOrderDao.delete(businessOrderDO.getId());
            patientRegisterTimeDao.delete(wlyyPatientRegisterTimeDO.getId());
            throw new Exception("您今日发起过复诊,不允许更改取药方式");
        }
        }*/
        if (0==expressageDO.getOneselfPickupFlg()){
            /*if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
                String drugCode= expressageDO.getHospitalCode()==null?"5550":expressageDO.getHospitalCode();
@ -909,15 +908,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        sql +=" and t.outpatient_type = 1  order by t.create_time desc";
        System.out.println(sql);
        List<Map<String,Object>> listPrescript = hibenateUtils.createSQLQuery(sql);
        String outPatientId="";
        if (listPrescript.size()>1){
            Map<String,Object> mapPrescript = listPrescript.get(0);
            outPatientId = mapPrescript.get("id").toString();
        }
        List<WlyyPrescriptionExpressageDO> list =  prescriptionExpressageDao.findByOutpatientId(outPatientId);
        WlyyPrescriptionExpressageDO wlyyPrescriptionExpressageDO = new WlyyPrescriptionExpressageDO();
        if(list.size()>0){
             wlyyPrescriptionExpressageDO = list.get(0);
        if (listPrescript!=null&&listPrescript.size()>=1){
            Map<String,Object> mapPrescript = listPrescript.get(0);
            String outPatientId = mapPrescript.get("id").toString();
            List<WlyyPrescriptionExpressageDO> list =  prescriptionExpressageDao.findByOutpatientId(outPatientId);
            if(list!=null&&list.size()!=0){
                wlyyPrescriptionExpressageDO = list.get(0);
            }
        }
        return wlyyPrescriptionExpressageDO;
    }