chenlu
2024-06-07 2f640b1038fa331954f78ed1f4317212cf5bb34d
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
<?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.example.erp.mapper.mm.BasicWarehouseTypeMapper">
 
    <select id="getBasicWarehouseTypeTakeOut" >
        select * from mm.basic_warehouse_type where type='领出';
    </select>
 
    <select id="getBasicWarehouseTypeRework" >
        select * from mm.basic_warehouse_type where type='返工';
    </select>
 
    <select id="getBasicWarehouseType" >
        select * from mm.basic_warehouse_type where type regexp #{type} group by operate_type_name;
    </select>
 
    <select id="getBasicWarehouse" >
        select operate_type from mm.basic_warehouse_type where type regexp #{type};
    </select>
 
    <select id="getBasicWarehouseTypeAll" >
        select * from mm.basic_warehouse_type where type!='原片' and type!='辅料'  order by id desc;
    </select>
 
    <insert id="insertBasicWarehouse"  useGeneratedKeys="true"  >
        insert into mm.basic_warehouse_type (operate_type_name, operate_type, type, create_time
        )
        values (
                   #{operateTypeName} ,#{operateType},#{type},now()
               )
    </insert>
 
    <delete id="deleteBasicWarehouse"  >
        delete from mm.basic_warehouse_type where id=#{id}
    </delete>
 
    <update id="updateBasicWarehouse"  >
        update mm.basic_warehouse_type set operate_type_name=#{operateTypeName},create_time=now() where id=#{id}
    </update>
 
 
 
 
</mapper>