123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- <?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.hcloud.microservice.goods.dao.GoodsProInputsMapper">
- <resultMap id="BaseResultMap" type="com.hcloud.microservice.goods.facade.entity.GoodsProInputs">
- <id column="guid" jdbcType="CHAR" property="guid" />
- <result column="fk_org_guid" jdbcType="CHAR" property="fkOrgGuid" />
- <result column="fk_goods_batch_guid" jdbcType="CHAR" property="fkGoodsBatchGuid" />
- <result column="pro_inputs_no" jdbcType="CHAR" property="proInputsNo" />
- <result column="pro_inputs_name" jdbcType="CHAR" property="proInputsName" />
- <result column="inputs_process_name" jdbcType="VARCHAR" property="inputsProcessName" />
- <result column="inputs_time" jdbcType="TIMESTAMP" property="inputsTime" />
- <result column="input_do_user" jdbcType="VARCHAR" property="inputDoUser" />
- <result column="input_provider_user" jdbcType="VARCHAR" property="inputProviderUser" />
- <result column="state" jdbcType="INTEGER" property="state" />
- <result column="create_user" jdbcType="CHAR" property="createUser" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="modified_user" jdbcType="CHAR" property="modifiedUser" />
- <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime" />
- </resultMap>
- <sql id="Base_Column_List">
- guid, fk_org_guid, fk_goods_batch_guid, pro_inputs_no, pro_inputs_name, inputs_process_name,
- inputs_time, input_do_user, input_provider_user, state, create_user, create_time,
- modified_user, modified_time
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_goods_pro_inputs
- where guid = #{guid,jdbcType=CHAR}
- </select>
- <select id="searchProInputsByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_goods_pro_inputs
- where
- data.state=1
- <if test="data.fkOrgGuid!=null and data.fkOrgGuid!=''">
- and fk_org_guid = #{data.fkOrgGuid,jdbcType=CHAR}
- </if>
- <if test="data.fkGoodsBatchGuid!=null and data.fkGoodsBatchGuid!=''">
- and fk_goods_batch_guid = #{data.fkGoodsBatchGuid,jdbcType=CHAR}
- </if>
- <if test="data.proInputsName!=null and data.proInputsName!=''">
- and pro_inputs_name = #{data.proInputsName,jdbcType=CHAR}
- </if>
- <if test="data.inputsProcessName!=null and data.inputsProcessName!=''">
- and inputs_process_name = #{data.inputsProcessName,jdbcType=CHAR}
- </if>
- </select>
- <select id="searchProInputsByBatchGuid" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from t_goods_pro_inputs
- where fk_goods_batch_guid = #{fkGoodsBatchGuid,jdbcType=CHAR}
- order by inputs_time desc
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from t_goods_pro_inputs
- where guid = #{guid,jdbcType=CHAR}
- </delete>
- <delete id="delProInputsByFK">
- delete from t_goods_pro_inputs
- where fk_goods_batch_guid = #{batid}
- </delete>
- <insert id="insert" parameterType="com.hcloud.microservice.goods.facade.entity.GoodsProInputs">
- insert into t_goods_pro_inputs (guid, fk_org_guid, fk_goods_batch_guid,
- pro_inputs_no, pro_inputs_name, inputs_process_name,
- inputs_time, input_do_user, input_provider_user,
- state, create_user, create_time,
- modified_user, modified_time)
- values (#{guid,jdbcType=CHAR}, #{fkOrgGuid,jdbcType=CHAR}, #{fkGoodsBatchGuid,jdbcType=CHAR},
- #{proInputsNo,jdbcType=CHAR}, #{proInputsName,jdbcType=CHAR}, #{inputsProcessName,jdbcType=VARCHAR},
- #{inputsTime,jdbcType=TIMESTAMP}, #{inputDoUser,jdbcType=VARCHAR}, #{inputProviderUser,jdbcType=VARCHAR},
- #{state,jdbcType=INTEGER}, #{createUser,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{modifiedUser,jdbcType=CHAR}, #{modifiedTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.hcloud.microservice.goods.facade.entity.GoodsProInputs">
- insert into t_goods_pro_inputs
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="guid != null">
- guid,
- </if>
- <if test="fkOrgGuid != null">
- fk_org_guid,
- </if>
- <if test="fkGoodsBatchGuid != null">
- fk_goods_batch_guid,
- </if>
- <if test="proInputsNo != null">
- pro_inputs_no,
- </if>
- <if test="proInputsName != null">
- pro_inputs_name,
- </if>
- <if test="inputsProcessName != null">
- inputs_process_name,
- </if>
- <if test="inputsTime != null">
- inputs_time,
- </if>
- <if test="inputDoUser != null">
- input_do_user,
- </if>
- <if test="inputProviderUser != null">
- input_provider_user,
- </if>
- <if test="state != null">
- state,
- </if>
- <if test="createUser != null">
- create_user,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="modifiedUser != null">
- modified_user,
- </if>
- <if test="modifiedTime != null">
- modified_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="guid != null">
- #{guid,jdbcType=CHAR},
- </if>
- <if test="fkOrgGuid != null">
- #{fkOrgGuid,jdbcType=CHAR},
- </if>
- <if test="fkGoodsBatchGuid != null">
- #{fkGoodsBatchGuid,jdbcType=CHAR},
- </if>
- <if test="proInputsNo != null">
- #{proInputsNo,jdbcType=CHAR},
- </if>
- <if test="proInputsName != null">
- #{proInputsName,jdbcType=CHAR},
- </if>
- <if test="inputsProcessName != null">
- #{inputsProcessName,jdbcType=VARCHAR},
- </if>
- <if test="inputsTime != null">
- #{inputsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="inputDoUser != null">
- #{inputDoUser,jdbcType=VARCHAR},
- </if>
- <if test="inputProviderUser != null">
- #{inputProviderUser,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- #{state,jdbcType=INTEGER},
- </if>
- <if test="createUser != null">
- #{createUser,jdbcType=CHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="modifiedUser != null">
- #{modifiedUser,jdbcType=CHAR},
- </if>
- <if test="modifiedTime != null">
- #{modifiedTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <insert id="batchSaveProInputs">
- insert into t_goods_pro_inputs (guid, fk_org_guid, fk_goods_batch_guid,
- pro_inputs_name, inputs_process_name,
- inputs_time, input_do_user, input_provider_user,
- state, create_user, create_time,
- modified_user, modified_time)values
- <foreach collection="list" item="bean" open="" separator="," close="">
- (REPLACE(UUID(),'-',''), #{bean.fkOrgGuid,jdbcType=CHAR}, #{bean.fkGoodsBatchGuid,jdbcType=CHAR},
- #{bean.proInputsName,jdbcType=CHAR}, #{bean.inputsProcessName,jdbcType=VARCHAR},
- #{bean.inputsTime,jdbcType=TIMESTAMP}, #{bean.inputDoUser,jdbcType=VARCHAR},
- #{bean.inputProviderUser,jdbcType=VARCHAR},#{bean.state,jdbcType=INTEGER}, #{bean.createUser,jdbcType=CHAR},
- #{bean.createTime,jdbcType=TIMESTAMP},#{bean.modifiedUser,jdbcType=CHAR}, #{bean.modifiedTime,jdbcType=TIMESTAMP})
- </foreach>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.hcloud.microservice.goods.facade.entity.GoodsProInputs">
- update t_goods_pro_inputs
- <set>
- <if test="fkOrgGuid != null">
- fk_org_guid = #{fkOrgGuid,jdbcType=CHAR},
- </if>
- <if test="fkGoodsBatchGuid != null">
- fk_goods_batch_guid = #{fkGoodsBatchGuid,jdbcType=CHAR},
- </if>
- <if test="proInputsNo != null">
- pro_inputs_no = #{proInputsNo,jdbcType=CHAR},
- </if>
- <if test="proInputsName != null">
- pro_inputs_name = #{proInputsName,jdbcType=CHAR},
- </if>
- <if test="inputsProcessName != null">
- inputs_process_name = #{inputsProcessName,jdbcType=VARCHAR},
- </if>
- <if test="inputsTime != null">
- inputs_time = #{inputsTime,jdbcType=TIMESTAMP},
- </if>
- <if test="inputDoUser != null">
- input_do_user = #{inputDoUser,jdbcType=VARCHAR},
- </if>
- <if test="inputProviderUser != null">
- input_provider_user = #{inputProviderUser,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- state = #{state,jdbcType=INTEGER},
- </if>
- <if test="createUser != null">
- create_user = #{createUser,jdbcType=CHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="modifiedUser != null">
- modified_user = #{modifiedUser,jdbcType=CHAR},
- </if>
- <if test="modifiedTime != null">
- modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where guid = #{guid,jdbcType=CHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.hcloud.microservice.goods.facade.entity.GoodsProInputs">
- update t_goods_pro_inputs
- set fk_org_guid = #{fkOrgGuid,jdbcType=CHAR},
- fk_goods_batch_guid = #{fkGoodsBatchGuid,jdbcType=CHAR},
- pro_inputs_no = #{proInputsNo,jdbcType=CHAR},
- pro_inputs_name = #{proInputsName,jdbcType=CHAR},
- inputs_process_name = #{inputsProcessName,jdbcType=VARCHAR},
- inputs_time = #{inputsTime,jdbcType=TIMESTAMP},
- input_do_user = #{inputDoUser,jdbcType=VARCHAR},
- input_provider_user = #{inputProviderUser,jdbcType=VARCHAR},
- state = #{state,jdbcType=INTEGER},
- create_user = #{createUser,jdbcType=CHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- modified_user = #{modifiedUser,jdbcType=CHAR},
- modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
- where guid = #{guid,jdbcType=CHAR}
- </update>
- </mapper>
|