入库模块开发
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
<?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.zg.project.information.mapper.ConstructionTeamMapper">
|
||||
|
||||
<resultMap type="ConstructionTeam" id="ConstructionTeamResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="teamName" column="team_name" />
|
||||
<result property="teamCode" column="team_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="selectConstructionTeamVo">
|
||||
select id, team_name, team_code, created_by, created_at, updated_by, updated_at, is_delete from construction_team
|
||||
</sql>
|
||||
|
||||
<select id="selectConstructionTeamList" parameterType="ConstructionTeam" resultMap="ConstructionTeamResult">
|
||||
<include refid="selectConstructionTeamVo"/>
|
||||
<where>
|
||||
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
|
||||
<if test="teamCode != null and teamCode != ''"> and team_code = #{teamCode}</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="selectConstructionTeamById" parameterType="Long" resultMap="ConstructionTeamResult">
|
||||
<include refid="selectConstructionTeamVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertConstructionTeam" parameterType="ConstructionTeam" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into construction_team
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="teamName != null and teamName != ''">team_name,</if>
|
||||
<if test="teamCode != null and teamCode != ''">team_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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="teamName != null and teamName != ''">#{teamName},</if>
|
||||
<if test="teamCode != null and teamCode != ''">#{teamCode},</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>
|
||||
</insert>
|
||||
|
||||
<update id="updateConstructionTeam" parameterType="ConstructionTeam">
|
||||
update construction_team
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="teamName != null and teamName != ''">team_name = #{teamName},</if>
|
||||
<if test="teamCode != null and teamCode != ''">team_code = #{teamCode},</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>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteConstructionTeamById" parameterType="Long">
|
||||
delete from construction_team where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteConstructionTeamByIds" parameterType="String">
|
||||
delete from construction_team where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.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" />
|
||||
</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
|
||||
</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>
|
||||
</select>
|
||||
|
||||
<select id="selectStockOutTypeById" parameterType="Long" resultMap="StockOutTypeResult">
|
||||
<include refid="selectStockOutTypeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<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="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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ckTypeName != null and ckTypeName != ''">#{ckTypeName},</if>
|
||||
<if test="ckTypeCode != null and ckTypeCode != ''">#{ckTypeCode},</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>
|
||||
</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="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStockOutTypeById" parameterType="Long">
|
||||
delete from stock_out_type where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStockOutTypeByIds" parameterType="String">
|
||||
delete from stock_out_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user