|
@@ -6,9 +6,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap type="cn.ezhizao.project.business.domain.BizProductionPlanDetail" id="BizProductionPlanDetailResult">
|
|
|
<id column="id" property="id" />
|
|
|
+ <result column="requisition_department_id" property="requisitionDepartmentId"/>
|
|
|
+ <association property="requisitionDepartmentName" javaType="java.lang.String" column="requisition_department_id" select="getRequisitionDepartmentName"/>
|
|
|
+ <association property="pickUpQuantity" javaType="java.lang.String" column="id" select="getPickUpQuantity"/>
|
|
|
+ <association property="lotTotalNumber" javaType="java.lang.String" column="id" select="getLotTotalNumber"/>
|
|
|
</resultMap>
|
|
|
+ <select id="getRequisitionDepartmentName" resultType="java.lang.String">
|
|
|
+ select dept_name from sys_dept where dept_id = #{requisitionDepartmentId}
|
|
|
+ </select>
|
|
|
+ <select id="getPickUpQuantity" resultType="java.lang.Double" >
|
|
|
+ SELECT sum(production_quantity) as pickUpQuantity from biz_production_plan_detail_sub_detail where production_plan_detail_id = #{id} and deleted = 0
|
|
|
+ </select>
|
|
|
|
|
|
-
|
|
|
+ <select id="getLotTotalNumber" resultType="java.lang.Double" >
|
|
|
+ SELECT sum(lot_number) as lotTotalNumber from biz_production_plan_detail_sub_detail where production_plan_detail_id = #{id} and deleted = 0
|
|
|
+ </select>
|
|
|
<select id="getList" parameterType="BizProductionPlanDetail" resultMap="BizProductionPlanDetailResult">
|
|
|
SELECT * FROM biz_production_plan_detail
|
|
|
<trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|