Bill.sql.xml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <das-client>
  3. <Sqls>
  4. <!--查询记录数-->
  5. <Sql name="queryBillCountByCondition">
  6. SELECT count (*) from DC_Bill a
  7. left join DC_doctorService_type b on a.serviceId = b.typeId
  8. left join sys_org_account c on a.doctorUid = c.resId and c.roleId =4
  9. where a.state =1 and b.state =1 and c.status =1 @condition
  10. </Sql>
  11. <!--根据条件分页查询记录 -->
  12. <Sql name="queryBillListByCondition">
  13. <![CDATA[
  14. SELECT * from (SELECT ROW_NUMBER() OVER( order by billWaterId desc) rowId,billWaterId,loginId,doctorName,hospitalName,
  15. (case when serviceId > 0 then 1 else 2 end) isIncome,b.typeName,insertime,a.doctorPrice,currentBalance
  16. from DC_Bill a
  17. left join DC_doctorService_type b on a.serviceId = b.typeId
  18. left join sys_org_account c on a.doctorUid = c.resId and c.roleId =4
  19. where a.state =1 and b.state =1 and c.status =1
  20. @condition ) as a where 1=1 @page
  21. ]]>
  22. </Sql>
  23. <!-- 查询医生服务类型下拉框-->
  24. <Sql name="queryDoctorServiceTyepCom">
  25. select typeId,typeName from DC_doctorService_type where state =1 order by typeId
  26. </Sql>
  27. </Sqls>
  28. </das-client>