| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package thyyxxk.webserver.dao.his.medicine;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import thyyxxk.webserver.entity.medicine.YpZdDictVo;
- import thyyxxk.webserver.entity.medicine.vo.YpCodgVo;
- import java.util.List;
- import java.util.Map;
- @Mapper
- public interface YpCodgMatchDao {
- @Select("<script> " +
- " select distinct rtrim(mz.patient_id) as patientId, rtrim(mz.patient_id) as patNo, mz.times, " +
- " mz.receipt_no as receiptNo, mz.order_no as orderNo, mz.real_no as realNo, " +
- " mz.name, mz.charge_date as chargeDate, mz.confirm_flag as confirmFlag, " +
- " mz.warn_dept as warnDept, rtrim(mz.serial_no) as serialNo, mz.print_flag as printFlag, " +
- " mz.group_no as groupNo, rtrim(c.name) as deptName, yp.drug_flag as drugFlag," +
- " isnull(si.setl_id, '') as setlId, isnull(si.mdtrt_id, '') as mdtrtId " +
- " from mz_charge_detail as mz with(nolock) " +
- " left join zd_unit_code as c on mz.warn_dept = c.code " +
- " inner join yp_zd_dict as yp with(nolock) on mz.charge_item_code = yp.code and mz.serial = yp.serial " +
- " left join t_si_setlinfo as si on mz.patient_id = si.pat_no and mz.times = si.times " +
- " where mz.pay_mark = '0' " +
- " and mz.serial_no > 0 " +
- " and isnull(mz.confirm_zs, '') <> '1' " +
- " and mz.group_no = #{vo.groupNo} " +
- "<if test=\" vo.startTime != null and vo.startTime != '' \">" +
- " and mz.charge_date >= #{vo.startTime} " +
- "</if>" +
- "<if test=\" vo.endTime != null and vo.endTime != '' \">" +
- " and mz.charge_date <= #{vo.endTime} " +
- "</if>" +
- "<if test=\" vo.patName != null and vo.patName != '' \">" +
- " and mz.name like ('%' + #{vo.patName} + '%') " +
- "</if>" +
- "<if test=\" vo.patNo != null and vo.patNo != '' \">" +
- " and mz.patient_id = #{vo.patNo} " +
- "</if>" +
- "<if test=\" vo.confirmFlag != null and vo.confirmFlag != '' \">" +
- " and mz.confirm_flag = #{vo.confirmFlag} " +
- "</if>" +
- "<if test=\" vo.dept != null and vo.dept != '' \">" +
- " and isnull(mz.warn_dept, '') = #{vo.dept} " +
- "</if>" +
- " order by charge_date desc " +
- "</script>")
- List<Map<String, Object>> selectMzChargePrescription(@Param("vo") YpCodgVo vo);
- @Select("<script> " +
- " select rtrim(mz.patient_id) as patientId, mz.times, mz.item_no as itemNo, " +
- " mz.receipt_no as receiptNo, mz.order_no as orderNo, mz.real_no as realNo, " +
- " mz.name, mz.charge_date as chargeDate, mz.confirm_flag as confirmFlag, mz.group_no as groupNo, " +
- " mz.warn_dept as warnDept, rtrim(mz.serial_no) as serialNo, mz.print_flag as printFlag, " +
- " mz.quantity, mz.supply_code as supplyCode, mz.manu_no as manuNo, rtrim(mz.charge_item_code) as chargeCode, " +
- " rtrim(c.name) as deptName, yp.drug_flag as drugFlag, yp.name as chargeName, yp.location, yp.retprice, " +
- " rtrim(yp.specification) as specification, rtrim(cj.name) as factory, mz.serial, '0' as trdnFlag " +
- " from mz_charge_detail as mz with(nolock) " +
- " left join zd_unit_code as c on mz.warn_dept = c.code " +
- " inner join yp_zd_dict as yp with(nolock) on mz.charge_item_code = yp.code and mz.serial = yp.serial " +
- " inner join yp_zd_manufactory as cj on yp.manu_code = cj.code " +
- " where mz.pay_mark = '0' " +
- " and mz.patient_id = #{vo.patNo} " +
- " and mz.times = #{vo.times} " +
- " and mz.receipt_no = #{vo.receiptNo} " +
- " and mz.order_no = #{vo.orderNo} " +
- " and mz.real_no = #{vo.realNo} " +
- " and mz.group_no = #{vo.groupNo} " +
- " order by mz.charge_date desc " +
- "</script>")
- List<Map<String, Object>> selectMzCfDetail(@Param("vo") YpCodgVo vo);
- @Select(" select name from sys_parameters where code = 'classCodeFskYp' ")
- String selectFskYpClassCode();
- @Select(" select name from sys_parameters where code = 'deptCodeXts' ")
- String selectXtsDeptCode();
- @Select(" select name from sys_parameters where code = 'isOpenTaoBaoMatch' ")
- String selectIsOpenTb();
- @Select(" select * from yp_zd_dict where code = #{code} and serial = #{serial} ")
- YpZdDictVo selectYpZdDictByCode(@Param("code") String code, @Param("serial") String serial);
- }
|