BusinessProductionPerformanceMapper.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132
  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,
  10. mp.is_record from major_production mp left join
  11. (select * from business_production_performance where deleted = 0
  12. <if test="performance!=null and performance.checkLoop!=null and performance.checkLoop!='' ">
  13. and check_loop = #{performance.checkLoop}
  14. </if>
  15. ) bpp
  16. on mp.id = bpp.production_id
  17. left join major m on m.id = mp.major_id
  18. left join user u on u.id = m.principal_id
  19. where mp.deleted = 0 and m.deleted = 0 and m.id = #{performance.majorId} and mp.report_no = #{performance.productionNo}
  20. </select>
  21. <!--根据业务类型,产品id及checkLoop获取质检信息-->
  22. <select id="getProductionPerformance" resultType="com.dayou.entity.BusinessProductionPerformance">
  23. SELECT id, fatal_mistake, hard_mistake, normal_mistake, service_attitude, reason
  24. FROM business_production_performance
  25. WHERE production_id = #{dto.productionId}
  26. AND check_loop = #{dto.CheckLoop}
  27. AND business_type = #{dto.BusinessType}
  28. </select>
  29. </mapper>