BusinessProductionPerformanceMapper.xml 1.2 KB

12345678910111213141516171819202122
  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.dayou.mapper.BusinessProductionPerformanceMapper">
  4. <select id="getMajorDetail" parameterType="com.dayou.vo.BusinessProductionPerformanceVO" resultType="com.dayou.entity.BusinessProductionPerformance">
  5. select bpp.*,
  6. ( CASE mp.production WHEN 'STATEMENT' THEN '价值意见书' WHEN 'REPORT' THEN '报告' ELSE '复评函' END ) AS productionType,
  7. u.NAME AS principal ,
  8. mp.id as pId,
  9. mp.name as productionName from major_production mp left join
  10. (select * from business_production_performance where deleted = 0
  11. <if test="performance!=null and performance.checkLoop!=null and performance.checkLoop!='' ">
  12. and check_loop = #{performance.checkLoop}
  13. </if>
  14. ) bpp
  15. on mp.id = bpp.production_id
  16. left join major m on m.id = mp.major_id
  17. left join user u on u.id = m.principal_id
  18. where mp.deleted = 0 and m.deleted = 0 and m.id = #{performance.majorId} and mp.report_no = #{performance.productionNo}
  19. </select>
  20. </mapper>