guoyuji
2024-09-26 8c29a327707574f1e04cd25218e05ba9b4c8e4a8
north-glass-erp/src/main/resources/mapper/mm/BasicWarehouseType.xml
New file
@@ -0,0 +1,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>