|
@@ -94,6 +94,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="studyCount" column="study_count"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo" id="ExamNumberGoodsVoResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="examNumberId" column="exam_number_id"/>
|
|
|
+ <result property="goodsId" column="goods_id"/>
|
|
|
+ <result property="goodsName" column="goods_name"/>
|
|
|
+ <result property="code" column="code"/>
|
|
|
+ <result property="standPrice" column="stand_price"/>
|
|
|
+ <result property="goodsStatus" column="goods_status"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.goods.bo.GoodsQueryBo" resultMap="GoodsResultVo">
|
|
|
SELECT
|
|
|
g.*,
|
|
@@ -182,4 +192,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
WHERE
|
|
|
g.goods_id = #{goodsId}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="listGoods" parameterType="com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo" resultMap="ExamNumberGoodsVoResult">
|
|
|
+ SELECT
|
|
|
+ goods_id,
|
|
|
+ goods_name,
|
|
|
+ CODE,
|
|
|
+ stand_price,
|
|
|
+ <if test="filtration != null and filtration == 1">
|
|
|
+ (case WHEN (SELECT COUNT(gs.goods_id) FROM goods gs where 1=1 and gs.make_goods_id = g.goods_id and gs.status =1 and gs.goods_type =4) >0 then 0 ELSE 1 end) as goods_status
|
|
|
+ </if>
|
|
|
+ <if test="filtration != null and filtration == 2">
|
|
|
+ (case WHEN (SELECT COUNT(gs.goods_id) FROM goods gs where 1=1 and gs.make_goods_id = g.goods_id and gs.status =1 and gs.goods_type =3) >0 then 0 ELSE 1 end) as goods_statuss
|
|
|
+ </if>
|
|
|
+ FROM
|
|
|
+ goods g
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ and g.status in(1)
|
|
|
+ and g.goods_type=1
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
+ and g.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="goodsId != null and goodsId != ''">
|
|
|
+ and g.goods_id = #{goodsId}
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null and projectId != ''">
|
|
|
+ and g.project_id = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="goodsType != null and goodsType != ''">
|
|
|
+ and g.goods_type = #{goodsType}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|