提交 | 用户 | 时间
|
1ac2bc
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
懒 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
3 |
<mapper namespace="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.mapper.SalesOrderChildMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.entity.SalesOrderChild"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="sales_order_code" property="salesOrderCode" /> |
|
9 |
<result column="customer_no" property="customerNo" /> |
|
10 |
<result column="cargo_no" property="cargoNo" /> |
|
11 |
<result column="product_code" property="productCode" /> |
|
12 |
<result column="product_name" property="productName" /> |
|
13 |
<result column="plan_number" property="planNumber" /> |
|
14 |
<result column="plan_start_time" property="planStartTime" /> |
|
15 |
<result column="plan_end_time" property="planEndTime" /> |
|
16 |
<result column="workshop_code" property="workshopCode" /> |
|
17 |
<result column="line_code" property="lineCode" /> |
|
18 |
<result column="delivery_time" property="deliveryTime" /> |
|
19 |
<result column="create_user" property="createUser" /> |
|
20 |
<result column="create_time" property="createTime" /> |
|
21 |
</resultMap> |
|
22 |
|
|
23 |
<!-- 通用查询结果列 --> |
|
24 |
<sql id="Base_Column_List"> |
|
25 |
id AS "id", sales_order_code AS "salesOrderCode", customer_no AS "customerNo", cargo_no AS "cargoNo", product_code AS "productCode", product_name AS "productName", plan_number AS "planNumber", plan_start_time AS "planStartTime", plan_end_time AS "planEndTime", workshop_code AS "workshopCode", line_code AS "lineCode", delivery_time AS "deliveryTime", create_user AS "createUser", create_time AS "createTime" |
|
26 |
</sql> |
|
27 |
|
|
28 |
|
|
29 |
<select id="customList" resultType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.result.SalesOrderChildResult" parameterType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.params.SalesOrderChildParam"> |
|
30 |
select |
|
31 |
<include refid="Base_Column_List"/> |
|
32 |
from pm_sales_order_child where 1 = 1 |
|
33 |
<if test="paramCondition.salesOrderCode != null and paramCondition.salesOrderCode != ''"> |
|
34 |
and sales_order_code like CONCAT('%',#{paramCondition.salesOrderCode},'%') |
|
35 |
</if> |
|
36 |
<if test="paramCondition.customerNo != null and paramCondition.customerNo != ''"> |
|
37 |
and customer_no like CONCAT('%',#{paramCondition.customerNo},'%') |
|
38 |
</if> |
|
39 |
<if test="paramCondition.cargoNo != null and paramCondition.cargoNo != ''"> |
|
40 |
and cargo_no like CONCAT('%',#{paramCondition.cargoNo},'%') |
|
41 |
</if> |
|
42 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
43 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
44 |
</if> |
|
45 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
46 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
47 |
</if> |
|
48 |
<if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> |
|
49 |
and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') |
|
50 |
</if> |
|
51 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
52 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
53 |
</if> |
|
54 |
</select> |
|
55 |
|
|
56 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.params.SalesOrderChildParam"> |
|
57 |
select |
|
58 |
<include refid="Base_Column_List"/> |
|
59 |
from pm_sales_order_child where 1 = 1 |
|
60 |
<if test="paramCondition.salesOrderCode != null and paramCondition.salesOrderCode != ''"> |
|
61 |
and sales_order_code like CONCAT('%',#{paramCondition.salesOrderCode},'%') |
|
62 |
</if> |
|
63 |
<if test="paramCondition.customerNo != null and paramCondition.customerNo != ''"> |
|
64 |
and customer_no like CONCAT('%',#{paramCondition.customerNo},'%') |
|
65 |
</if> |
|
66 |
<if test="paramCondition.cargoNo != null and paramCondition.cargoNo != ''"> |
|
67 |
and cargo_no like CONCAT('%',#{paramCondition.cargoNo},'%') |
|
68 |
</if> |
|
69 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
70 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
71 |
</if> |
|
72 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
73 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
74 |
</if> |
|
75 |
<if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> |
|
76 |
and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') |
|
77 |
</if> |
|
78 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
79 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
80 |
</if> |
|
81 |
</select> |
|
82 |
|
|
83 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.result.SalesOrderChildResult" parameterType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.params.SalesOrderChildParam"> |
|
84 |
select |
|
85 |
<include refid="Base_Column_List"/> |
|
86 |
from pm_sales_order_child where 1 = 1 |
|
87 |
<if test="paramCondition.salesOrderCode != null and paramCondition.salesOrderCode != ''"> |
|
88 |
and sales_order_code like CONCAT('%',#{paramCondition.salesOrderCode},'%') |
|
89 |
</if> |
|
90 |
<if test="paramCondition.customerNo != null and paramCondition.customerNo != ''"> |
|
91 |
and customer_no like CONCAT('%',#{paramCondition.customerNo},'%') |
|
92 |
</if> |
|
93 |
<if test="paramCondition.cargoNo != null and paramCondition.cargoNo != ''"> |
|
94 |
and cargo_no like CONCAT('%',#{paramCondition.cargoNo},'%') |
|
95 |
</if> |
|
96 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
97 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
98 |
</if> |
|
99 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
100 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
101 |
</if> |
|
102 |
<if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> |
|
103 |
and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') |
|
104 |
</if> |
|
105 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
106 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
107 |
</if> |
|
108 |
</select> |
|
109 |
|
|
110 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.params.SalesOrderChildParam"> |
|
111 |
select |
|
112 |
<include refid="Base_Column_List"/> |
|
113 |
from pm_sales_order_child where 1 = 1 |
|
114 |
<if test="paramCondition.salesOrderCode != null and paramCondition.salesOrderCode != ''"> |
|
115 |
and sales_order_code like CONCAT('%',#{paramCondition.salesOrderCode},'%') |
|
116 |
</if> |
|
117 |
<if test="paramCondition.customerNo != null and paramCondition.customerNo != ''"> |
|
118 |
and customer_no like CONCAT('%',#{paramCondition.customerNo},'%') |
|
119 |
</if> |
|
120 |
<if test="paramCondition.cargoNo != null and paramCondition.cargoNo != ''"> |
|
121 |
and cargo_no like CONCAT('%',#{paramCondition.cargoNo},'%') |
|
122 |
</if> |
|
123 |
<if test="paramCondition.productCode != null and paramCondition.productCode != ''"> |
|
124 |
and product_code like CONCAT('%',#{paramCondition.productCode},'%') |
|
125 |
</if> |
|
126 |
<if test="paramCondition.productName != null and paramCondition.productName != ''"> |
|
127 |
and product_name like CONCAT('%',#{paramCondition.productName},'%') |
|
128 |
</if> |
|
129 |
<if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> |
|
130 |
and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') |
|
131 |
</if> |
|
132 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
133 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
134 |
</if> |
|
135 |
</select> |
|
136 |
|
|
137 |
<select id="getPlanNumberTotal" resultType="Integer" parameterType="cn.stylefeng.guns.modular.zsx.pm.salesOrderChild.model.params.SalesOrderChildParam"> |
|
138 |
SELECT SUM(plan_number) AS planNumber FROM pm_sales_order_child WHERE sales_order_code = #{paramCondition.salesOrderCode} |
|
139 |
</select> |
|
140 |
|
|
141 |
|
|
142 |
</mapper> |