提交 | 用户 | 时间
|
71e81e
|
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.sm.scrapCategoryRecord.mapper.ScrapCategoryRecordMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.entity.ScrapCategoryRecord"> |
|
7 |
<id column="id" property="id" /> |
|
8 |
<result column="work_order_no" property="workOrderNo" /> |
|
9 |
<result column="sfc_code" property="sfcCode" /> |
|
10 |
<result column="line_code" property="lineCode" /> |
|
11 |
<result column="line_name" property="lineName" /> |
|
12 |
<result column="location_code" property="locationCode" /> |
|
13 |
<result column="location_name" property="locationName" /> |
|
14 |
<result column="scrap_category" property="scrapCategory" /> |
|
15 |
<result column="scrap_quantity" property="scrapQuantity" /> |
|
16 |
<result column="scrap_reason" property="scrapReason" /> |
|
17 |
<result column="operate_user" property="operateUser" /> |
|
18 |
<result column="spare_field_1" property="spareField1" /> |
|
19 |
<result column="spare_field_2" property="spareField2" /> |
|
20 |
<result column="remarks" property="remarks" /> |
|
21 |
<result column="create_user" property="createUser" /> |
|
22 |
<result column="update_user" property="updateUser" /> |
|
23 |
<result column="update_time" property="updateTime" /> |
|
24 |
<result column="create_time" property="createTime" /> |
|
25 |
<result column="scrap_time" property="scrapTime" /> |
|
26 |
</resultMap> |
|
27 |
|
|
28 |
<!-- 通用查询结果列 --> |
|
29 |
<sql id="Base_Column_List"> |
|
30 |
id AS "id", work_order_no AS "workOrderNo", sfc_code AS "sfcCode", line_code AS "lineCode", line_name AS "lineName", location_code AS "locationCode", location_name AS "locationName", scrap_category AS "scrapCategory", scrap_quantity AS "scrapQuantity", scrap_reason AS "scrapReason", operate_user AS "operateUser", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", update_user AS "updateUser", update_time AS "updateTime", create_time AS "createTime", scrap_time AS "scrapTime" |
|
31 |
</sql> |
|
32 |
|
|
33 |
|
|
34 |
<select id="customList" resultType="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.model.result.ScrapCategoryRecordResult" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.model.params.ScrapCategoryRecordParam"> |
|
35 |
select |
|
36 |
<include refid="Base_Column_List"/> |
|
37 |
from sm_scrap_category_record where 1 = 1 |
|
38 |
<if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''"> |
|
39 |
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%') |
|
40 |
</if> |
|
41 |
<if test="paramCondition.sfcCode != null and paramCondition.sfcCode != ''"> |
|
42 |
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%') |
|
43 |
</if> |
|
44 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
45 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
46 |
</if> |
|
47 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
48 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
49 |
</if> |
|
50 |
</select> |
|
51 |
|
|
52 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.model.params.ScrapCategoryRecordParam"> |
|
53 |
select |
|
54 |
<include refid="Base_Column_List"/> |
|
55 |
from sm_scrap_category_record where 1 = 1 |
|
56 |
<if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''"> |
|
57 |
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%') |
|
58 |
</if> |
|
59 |
<if test="paramCondition.sfcCode != null and paramCondition.sfcCode != ''"> |
|
60 |
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%') |
|
61 |
</if> |
|
62 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
63 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
64 |
</if> |
|
65 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
66 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
67 |
</if> |
|
68 |
</select> |
|
69 |
|
|
70 |
<select id="customPageList" resultType="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.model.result.ScrapCategoryRecordResult" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.model.params.ScrapCategoryRecordParam"> |
|
71 |
select |
|
72 |
<include refid="Base_Column_List"/> |
|
73 |
from sm_scrap_category_record where 1 = 1 |
|
74 |
<if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''"> |
|
75 |
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%') |
|
76 |
</if> |
|
77 |
<if test="paramCondition.sfcCode != null and paramCondition.sfcCode != ''"> |
|
78 |
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%') |
|
79 |
</if> |
|
80 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
81 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
82 |
</if> |
|
83 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
84 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
85 |
</if> |
|
86 |
</select> |
|
87 |
|
|
88 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryRecord.model.params.ScrapCategoryRecordParam"> |
|
89 |
select |
|
90 |
<include refid="Base_Column_List"/> |
|
91 |
from sm_scrap_category_record where 1 = 1 |
|
92 |
<if test="paramCondition.workOrderNo != null and paramCondition.workOrderNo != ''"> |
|
93 |
and work_order_no like CONCAT('%',#{paramCondition.workOrderNo},'%') |
|
94 |
</if> |
|
95 |
<if test="paramCondition.sfcCode != null and paramCondition.sfcCode != ''"> |
|
96 |
and sfc_code like CONCAT('%',#{paramCondition.sfcCode},'%') |
|
97 |
</if> |
|
98 |
<if test="paramCondition.lineCode != null and paramCondition.lineCode != ''"> |
|
99 |
and line_code like CONCAT('%',#{paramCondition.lineCode},'%') |
|
100 |
</if> |
|
101 |
<if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> |
|
102 |
and location_code like CONCAT('%',#{paramCondition.locationCode},'%') |
|
103 |
</if> |
|
104 |
</select> |
|
105 |
|
|
106 |
<select id="getScrapQuantity" resultType="Integer"> |
|
107 |
select sum(scrap_quantity) as scrapQuantity from sm_scrap_category_record where DateDiff(dd,create_time,getdate())=0 |
|
108 |
</select> |
|
109 |
|
|
110 |
<select id="getScrapQuantityWeek" resultType="Integer"> |
|
111 |
select sum(scrap_quantity) as scrapQuantity from sm_scrap_category_record where DateDiff(month,create_time,getdate())=0 |
|
112 |
</select> |
|
113 |
|
|
114 |
</mapper> |