新增盘点模块相关接口

This commit is contained in:
2025-06-17 08:39:05 +08:00
parent 52ff615f29
commit f3752c7cbc
32 changed files with 853 additions and 2303 deletions

View File

@@ -1,37 +1,52 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.information.mapper.StockOutTypeMapper">
<resultMap type="StockOutType" id="StockOutTypeResult">
<result property="id" column="id" />
<result property="ckTypeName" column="ck_type_name" />
<result property="ckTypeCode" column="ck_type_code" />
<result property="createdBy" column="created_by" />
<result property="createdAt" column="created_at" />
<result property="updatedBy" column="updated_by" />
<result property="updatedAt" column="updated_at" />
<result property="isDelete" column="is_delete" />
<result property="id" column="id"/>
<result property="typeName" column="type_name"/>
<result property="typeCode" column="type_code"/>
<result property="createdBy" column="created_by"/>
<result property="createdAt" column="created_at"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedAt" column="updated_at"/>
<result property="isDelete" column="is_delete"/>
</resultMap>
<sql id="selectStockOutTypeVo">
select id, ck_type_name, ck_type_code, created_by, created_at, updated_by, updated_at, is_delete from stock_out_type
select id, type_name, type_code, created_by, created_at, updated_by, updated_at, is_delete
from stock_out_type
</sql>
<select id="selectStockOutTypeList" parameterType="StockOutType" resultMap="StockOutTypeResult">
<include refid="selectStockOutTypeVo"/>
<where>
<if test="ckTypeName != null and ckTypeName != ''"> and ck_type_name like concat('%', #{ckTypeName}, '%')</if>
<if test="ckTypeCode != null and ckTypeCode != ''"> and ck_type_code = #{ckTypeCode}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
<where>
<if test="typeName != null and typeName != ''">
and type_name like concat('%', #{typeName}, '%')
</if>
<if test="typeCode != null and typeCode != ''">
and type_code = #{typeCode}
</if>
<if test="createdBy != null and createdBy != ''">
and created_by = #{createdBy}
</if>
<if test="createdAt != null">
and created_at = #{createdAt}
</if>
<if test="updatedBy != null and updatedBy != ''">
and updated_by = #{updatedBy}
</if>
<if test="updatedAt != null">
and updated_at = #{updatedAt}
</if>
<if test="isDelete != null and isDelete != ''">
and is_delete = #{isDelete}
</if>
</where>
</select>
<select id="selectStockOutTypeById" parameterType="Long" resultMap="StockOutTypeResult">
<include refid="selectStockOutTypeVo"/>
where id = #{id}
@@ -40,30 +55,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertStockOutType" parameterType="StockOutType" useGeneratedKeys="true" keyProperty="id">
insert into stock_out_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ckTypeName != null and ckTypeName != ''">ck_type_name,</if>
<if test="ckTypeCode != null and ckTypeCode != ''">ck_type_code,</if>
<if test="typeName != null and typeName != ''">type_name,</if>
<if test="typeCode != null and typeCode != ''">type_code,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ckTypeName != null and ckTypeName != ''">#{ckTypeName},</if>
<if test="ckTypeCode != null and ckTypeCode != ''">#{ckTypeCode},</if>
<if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="typeCode != null and typeCode != ''">#{typeCode},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</trim>
</insert>
<update id="updateStockOutType" parameterType="StockOutType">
update stock_out_type
<trim prefix="SET" suffixOverrides=",">
<if test="ckTypeName != null and ckTypeName != ''">ck_type_name = #{ckTypeName},</if>
<if test="ckTypeCode != null and ckTypeCode != ''">ck_type_code = #{ckTypeCode},</if>
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="typeCode != null and typeCode != ''">type_code = #{typeCode},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
@@ -78,9 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteStockOutTypeByIds" parameterType="String">
delete from stock_out_type where id in
delete from stock_out_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>