ResponsibilityDepartmentMapper.xml 1.3 KB

123456789101112131415161718192021222324
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.imed.costaccount.mapper.ResponsibilityDepartmentMapper">
  4. <!-- 可根据自己的需求,是否要使用 -->
  5. <resultMap type="com.imed.costaccount.model.ResponsibilityDepartment" id="responsibilityDepartmentMap">
  6. <result property="id" column="id" jdbcType="INTEGER"/>
  7. <result property="responsibilityId" column="responsibility_id" jdbcType="INTEGER"/>
  8. <result property="departmentId" column="department_id" jdbcType="INTEGER"/>
  9. <result property="hospId" column="hosp_id" jdbcType="INTEGER"/>
  10. <result property="createTime" column="create_time" jdbcType="BIGINT"/>
  11. <result property="deleteTime" column="delete_time" jdbcType="BIGINT"/>
  12. </resultMap>
  13. <select id="getDepartByCenterId" resultType="com.imed.costaccount.model.vo.DepartVO">
  14. select sd.id as departmentId,concat(sd.department_name,sd.department_code) as departmentName
  15. from cost_responsibility_department crd left join sys_department sd on sd.id = crd.department_id
  16. where crd.responsibility_id = #{responsibilityId} and crd.delete_time = 0 and sd.delete_time = 0
  17. </select>
  18. </mapper>