|
|
@@ -34,11 +34,84 @@
|
|
|
<select id="validPeriod" parameterType="map" resultType="java.lang.Short">
|
|
|
SELECT IFNULL(PD_STATUS,0) PD_STATUS FROM PERIODSDETAIL WHERE COMPANYID=#{companyId} AND PD_DETNO=#{period}
|
|
|
</select>
|
|
|
+
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
<sql id="Base_Column_List">
|
|
|
wh_id, wh_code, wh_type, wh_description, wh_statuscode, wh_status, wh_recorderid,
|
|
|
wh_recorder, wh_date, companyid, updaterId, updatetime, wh_text1, wh_text2, wh_text3,
|
|
|
wh_text4, wh_text5
|
|
|
</sql>
|
|
|
+ <select id="selectByExample" parameterType="com.usoftchina.saas.document.entities.WarehouseExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from warehouse
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -49,6 +122,12 @@
|
|
|
delete from warehouse
|
|
|
where wh_id = #{wh_id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.usoftchina.saas.document.entities.WarehouseExample">
|
|
|
+ delete from warehouse
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
<insert id="insert" parameterType="com.usoftchina.saas.document.entities.Warehouse">
|
|
|
insert into warehouse (wh_id, wh_code, wh_type,
|
|
|
wh_description, wh_statuscode, wh_status,
|
|
|
@@ -172,6 +251,94 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
+ <select id="countByExample" parameterType="com.usoftchina.saas.document.entities.WarehouseExample" resultType="java.lang.Integer">
|
|
|
+ select count(*) from warehouse
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update warehouse
|
|
|
+ <set>
|
|
|
+ <if test="record.wh_id != null">
|
|
|
+ wh_id = #{record.wh_id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_code != null">
|
|
|
+ wh_code = #{record.wh_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_type != null">
|
|
|
+ wh_type = #{record.wh_type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_description != null">
|
|
|
+ wh_description = #{record.wh_description,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_statuscode != null">
|
|
|
+ wh_statuscode = #{record.wh_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_status != null">
|
|
|
+ wh_status = #{record.wh_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_recorderid != null">
|
|
|
+ wh_recorderid = #{record.wh_recorderid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_recorder != null">
|
|
|
+ wh_recorder = #{record.wh_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_date != null">
|
|
|
+ wh_date = #{record.wh_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.companyid != null">
|
|
|
+ companyid = #{record.companyid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.updaterId != null">
|
|
|
+ updaterId = #{record.updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.updatetime != null">
|
|
|
+ updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_text1 != null">
|
|
|
+ wh_text1 = #{record.wh_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_text2 != null">
|
|
|
+ wh_text2 = #{record.wh_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_text3 != null">
|
|
|
+ wh_text3 = #{record.wh_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_text4 != null">
|
|
|
+ wh_text4 = #{record.wh_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.wh_text5 != null">
|
|
|
+ wh_text5 = #{record.wh_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update warehouse
|
|
|
+ set wh_id = #{record.wh_id,jdbcType=INTEGER},
|
|
|
+ wh_code = #{record.wh_code,jdbcType=VARCHAR},
|
|
|
+ wh_type = #{record.wh_type,jdbcType=VARCHAR},
|
|
|
+ wh_description = #{record.wh_description,jdbcType=VARCHAR},
|
|
|
+ wh_statuscode = #{record.wh_statuscode,jdbcType=VARCHAR},
|
|
|
+ wh_status = #{record.wh_status,jdbcType=VARCHAR},
|
|
|
+ wh_recorderid = #{record.wh_recorderid,jdbcType=VARCHAR},
|
|
|
+ wh_recorder = #{record.wh_recorder,jdbcType=VARCHAR},
|
|
|
+ wh_date = #{record.wh_date,jdbcType=TIMESTAMP},
|
|
|
+ companyid = #{record.companyid,jdbcType=INTEGER},
|
|
|
+ updaterId = #{record.updaterId,jdbcType=INTEGER},
|
|
|
+ updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
|
|
|
+ wh_text1 = #{record.wh_text1,jdbcType=VARCHAR},
|
|
|
+ wh_text2 = #{record.wh_text2,jdbcType=VARCHAR},
|
|
|
+ wh_text3 = #{record.wh_text3,jdbcType=VARCHAR},
|
|
|
+ wh_text4 = #{record.wh_text4,jdbcType=VARCHAR},
|
|
|
+ wh_text5 = #{record.wh_text5,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Warehouse">
|
|
|
update warehouse
|
|
|
<set>
|
|
|
@@ -246,5 +413,25 @@
|
|
|
wh_text5 = #{wh_text5,jdbcType=VARCHAR}
|
|
|
where wh_id = #{wh_id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Warehouse">
|
|
|
+ <id column="wh_id" jdbcType="INTEGER" property="whId" />
|
|
|
+ <result column="wh_code" jdbcType="VARCHAR" property="whCode" />
|
|
|
+ <result column="wh_type" jdbcType="VARCHAR" property="whType" />
|
|
|
+ <result column="wh_description" jdbcType="VARCHAR" property="whDescription" />
|
|
|
+ <result column="wh_statuscode" jdbcType="VARCHAR" property="whStatuscode" />
|
|
|
+ <result column="wh_status" jdbcType="VARCHAR" property="whStatus" />
|
|
|
+ <result column="wh_recorderid" jdbcType="VARCHAR" property="whRecorderid" />
|
|
|
+ <result column="wh_recorder" jdbcType="VARCHAR" property="whRecorder" />
|
|
|
+ <result column="wh_date" jdbcType="TIMESTAMP" property="whDate" />
|
|
|
+ <result column="companyid" jdbcType="INTEGER" property="companyid" />
|
|
|
+ <result column="updaterId" jdbcType="INTEGER" property="updaterid" />
|
|
|
+ <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
|
|
|
+ <result column="wh_text1" jdbcType="VARCHAR" property="whText1" />
|
|
|
+ <result column="wh_text2" jdbcType="VARCHAR" property="whText2" />
|
|
|
+ <result column="wh_text3" jdbcType="VARCHAR" property="whText3" />
|
|
|
+ <result column="wh_text4" jdbcType="VARCHAR" property="whText4" />
|
|
|
+ <result column="wh_text5" jdbcType="VARCHAR" property="whText5" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
</mapper>
|
|
|
|