12345678910111213141516171819202122 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.dayou.mapper.BusinessProductionPerformanceMapper">
- <select id="getMajorDetail" parameterType="com.dayou.vo.BusinessProductionPerformanceVO" resultType="com.dayou.entity.BusinessProductionPerformance">
- select bpp.*,
- ( CASE mp.production WHEN 'STATEMENT' THEN '价值意见书' WHEN 'REPORT' THEN '报告' ELSE '复评函' END ) AS productionType,
- u.NAME AS principal ,
- mp.id as pId,
- mp.name as productionName from major_production mp left join
- (select * from business_production_performance where deleted = 0
- <if test="performance!=null and performance.checkLoop!=null and performance.checkLoop!='' ">
- and check_loop = #{performance.checkLoop}
- </if>
- ) bpp
- on mp.id = bpp.production_id
- left join major m on m.id = mp.major_id
- left join user u on u.id = m.principal_id
- where mp.deleted = 0 and m.deleted = 0 and m.id = #{performance.majorId} and mp.report_no = #{performance.productionNo}
- </select>
- </mapper>
|