ProcurementPlanReplenishLineMapper.xml
3.23 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?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.lframework.xingyun.sc.procurement.mappers.replenish.ProcurementPlanReplenishLineMapper">
<resultMap id="ProcurementPlanReplenishLine" type="com.lframework.xingyun.sc.procurement.entity.replenish.ProcurementPlanReplenishLine">
<id column="id" property="id"/>
<result column="procurement_plan_replenish_id" property="procurementPlanReplenishId"/>
<result column="product_id" property="productId"/>
<result column="product_name" property="productName"/>
<result column="material_type" property="materialType"/>
<result column="quantity" property="quantity"/>
<result column="actual_purchase_price" property="actualPurchasePrice"/>
<result column="including_shipping_price" property="includingShippingPrice"/>
<result column="price_list_prices" property="priceListPrices"/>
<result column="coordination_range" property="coordinationRange"/>
<result column="estimated_loss" property="estimatedLoss"/>
<result column="application_attrition" property="applicationAttrition"/>
<result column="paint_damage_ratio" property="paintDamageRatio"/>
<result column="workshop_id" property="workshopId"/>
<result column="workshop_name" property="workshopName"/>
<result column="item_id" property="itemId"/>
<result column="create_by_id" property="createById"/>
<result column="create_by" property="createBy"/>
<result column="update_by_id" property="updateById"/>
<result column="update_by" property="updateBy"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="ProcurementPlanReplenishLine_sql">
SELECT
pprl.id,
pprl.procurement_plan_replenish_id,
pprl.product_id,
br.product_name,
pprl.material_type,
pprl.quantity,
pprl.actual_purchase_price,
pprl.including_shipping_price,
pprl.price_list_prices,
pprl.coordination_range,
pprl.estimated_loss,
pprl.application_attrition,
pprl.paint_damage_ratio,
pprl.workshop_id,
ws.name AS workshop_name,
pprl.item_id,
pprl.create_by_id,
pprl.create_by,
pprl.update_by_id,
pprl.update_by,
pprl.create_time,
pprl.update_time
FROM procurement_plan_replenish_line AS pprl
LEFT JOIN base_data_breed_relationship br ON br.id = pprl.product_id
LEFT JOIN base_data_workshop AS ws ON ws.id = pprl.workshop_id
</sql>
<select id="getByProcurementPlanReplenishId" resultMap="ProcurementPlanReplenishLine">
<include refid="ProcurementPlanReplenishLine_sql"/>
WHERE pprl.procurement_plan_replenish_id = #{mainId}
ORDER BY pprl.create_time ASC
</select>
<delete id="delByProcurementPlanReplenishId">
DELETE FROM procurement_plan_replenish_line WHERE procurement_plan_replenish_id = #{mainId}
</delete>
</mapper>