Mybatis对象传递参数无法查询出结果,而plsql可以查询出来之我的SB错误

整整耽误我一天时间,mmd,总结下来以儆效尤

sql:

Preparing: select * from(select t.*, n.patient_status_name patientStatusName, p.name patientName,sd.name doctorName, ncd.nursing_class_name nursingClassName, p.date_of_birth dateOfBirth, p.sex sex, p.name_phonetic namePhonetic,p.identity identity, p.charge_type chargeType, p.inp_no inpNo, pv.dept_admission_to deptAdmissionTo, pv.dept_discharge_from deptDischargeFrom, pv.discharge_date_time dischargeDateTime from INPADM.Pats_In_Hospital t inner join MEDREC.PAT_MASTER_INDEX p on t.patient_id = p.patient_id left join COMM.Patient_Status_Dict n on T.PATIENT_CONDITION = n.PATIENT_STATUS_CODE left join MEDREC.pat_visit pv on t.patient_id = pv.patient_id left join COMM.staff_dict sd on t.DOCTOR_IN_CHARGE = sd.USER_NAME left join nursing_class_dict ncd on t.nursing_class = ncd.nursing_class_code where (t.patient_id in (select cdm.patient_id from cpr.cooperate_doctor_master cdm where (1=1 and cdm.cooperate_doctor = ? or (select count(*) from staff_vs_group where staff_vs_group.emp_no = (select emp_no from staff_dict where 1=1 and user_name = ? ) and group_code = cdm.cooperate_dept_code and group_class = '病区医生') > 0) and cdm.cooperate_status = '0')) or ( pv.discharge_date_time is null and 1=1 and t.dept_code = ? )) mm 

参数:

==> Parameters: 2016468(String), 2016468(String), '01040131'(String)

plsql把参数赋值给占位符,可以查询出结果

但是mybatis结果是:<==      Total: 0

各种找原因,各种实验但是我TMD万万没有想到竟然是第三个参数:'01040131'(String)

看到什么了吗?

MD!  当然是  '01040131'(String)  这个傻逼一样的引号,fuck!!!!!!

展开阅读全文

没有更多推荐了,返回首页