ScoreSupplierV2Mapper.xml 2.0 KB
Newer Older
苗卫卫 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<?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.boco.nbd.wios.score.mapper.def.ScoreSupplierV2Mapper">

    <select id="queryScoreItem" resultType="com.boco.nbd.wios.score.entity.bo.ScoreItemBO">
        select a.final_score,b.appraisal_id from t_score_supplier_item a
            inner join t_score_config_v2 b on a.score_config_id=b.id
        where a.score_supplier_id= #{scoreSupplierId}
    </select>

    <select id="queryScoreSupplier" resultType="com.boco.nbd.wios.score.entity.po.ScoreSupplierPO">
        select a.*,(select group_concat(distinct appraisal_user)
        from t_supplier_user_config b where b.supplier_config_id=a.supplier_config_id) appraisal_user
        from t_score_supplier_v2 a
        where 1=1
        <if test="supplierId !=null">
            and a.supplier_id= #{supplierId}
        </if>
        <if test="month!='' and month!=null">
            and a.month = #{month}
        </if>
        order by create_time desc
    </select>

    <select id="getScoreSupplierItem" resultType="com.boco.nbd.wios.score.entity.bo.ScoreSupplierItemBO">
        select a.id,
               a.score_supplier_id,
               a.score_config_id,
               b.score_item,
               b.total_score,
               b.appraisal_department_id,
               b.appraisal_id,
               b.appraisal_describe,
               b.appraisal_target,
               b.appraisal_algorithm,
               b.appraisal_department,
               b.weight,
               b.score_weight,
               a.description,
               a.final_score,
               c.appraisal_user
        from t_score_supplier_item a
                 inner join t_score_config_v2 b on a.score_config_id = b.id
                 left join t_supplier_user_config c on c.supplier_config_id = #{supplierConfigId}
            and c.appraisal_department_id = b.appraisal_department_id
        where a.score_supplier_id = #{scoreSupplierId}
    </select>
</mapper>