|
|
@ -2,10 +2,10 @@
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
|
|
|
|
|
|
|
<mapper namespace="com.glxp.api.admin.dao.thrsys.ThrInvWarehouseDao">
|
|
|
|
<mapper namespace="com.glxp.api.admin.dao.thrsys.ThrInvWarehouseDao">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterThrInvWarehouse" parameterType="com.glxp.api.admin.req.thrsys.FilterThrInvWarehouseRequest"
|
|
|
|
<select id="filterThrInvWarehouse" parameterType="com.glxp.api.admin.req.thrsys.FilterThrInvWarehouseRequest"
|
|
|
|
resultType="com.glxp.api.admin.entity.thrsys.ThrInvWarehouseEntity">
|
|
|
|
resultType="com.glxp.api.admin.entity.thrsys.ThrInvWarehouseEntity">
|
|
|
|
SELECT * FROM thr_inv_warehouse
|
|
|
|
SELECT *
|
|
|
|
|
|
|
|
FROM thr_inv_warehouse
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
AND id = #{id}
|
|
|
|
AND id = #{id}
|
|
|
@ -19,20 +19,25 @@
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
AND name = #{name}
|
|
|
|
AND name = #{name}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test=" advanceType != null">
|
|
|
|
<if test="advanceType != null">
|
|
|
|
AND advanceType = #{advanceType}
|
|
|
|
AND advanceType = #{advanceType}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="isDefault != null">
|
|
|
|
<if test="isDefault != null">
|
|
|
|
AND isDefault = #{isDefault}
|
|
|
|
AND isDefault = #{isDefault}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="key != null">
|
|
|
|
<if test="key != null">
|
|
|
|
and code like concat('%',#{key},'%') or `name` like concat('%',#{key},'%')
|
|
|
|
and code like concat('%', #{key}, '%')
|
|
|
|
|
|
|
|
or `name` like concat('%', #{key}, '%')
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
|
|
|
|
<if test="thirdSysFk != null">
|
|
|
|
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
and thirdSysFk = #{thirdSysFk}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectById" parameterType="Map"
|
|
|
|
<select id="selectById" parameterType="Map"
|
|
|
@ -64,24 +69,27 @@
|
|
|
|
<if test="isDefault != '' and isDefault != null">
|
|
|
|
<if test="isDefault != '' and isDefault != null">
|
|
|
|
AND isDefault = #{isDefault}
|
|
|
|
AND isDefault = #{isDefault}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="thirdSysFk != null">
|
|
|
|
|
|
|
|
AND thirdSysFk = #{thirdSysFk}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<insert id="insertThrInvWarehouse" keyProperty="id"
|
|
|
|
<insert id="insertThrInvWarehouse" keyProperty="id"
|
|
|
|
parameterType="com.glxp.api.admin.entity.thrsys.ThrInvWarehouseEntity">
|
|
|
|
parameterType="com.glxp.api.admin.entity.thrsys.ThrInvWarehouseEntity">
|
|
|
|
insert INTO thr_inv_warehouse
|
|
|
|
replace INTO thr_inv_warehouse
|
|
|
|
(pid, code, name, advanceType, isDefault,
|
|
|
|
(pid, code, name, advanceType, isDefault,
|
|
|
|
status, updateTime, remark)
|
|
|
|
status, updateTime, remark, thirdSysFk)
|
|
|
|
values (#{pid}, #{code},
|
|
|
|
values (#{pid}, #{code},
|
|
|
|
#{name}, #{advanceType}, #{isDefault},
|
|
|
|
#{name}, #{advanceType}, #{isDefault},
|
|
|
|
#{status}, #{updateTime},
|
|
|
|
#{status}, #{updateTime},
|
|
|
|
#{remark})
|
|
|
|
#{remark}, #{thirdSysFk})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertThrInvWarehouses" parameterType="java.util.List">
|
|
|
|
<insert id="insertThrInvWarehouses" parameterType="java.util.List">
|
|
|
|
insert INTO thr_inv_warehouse
|
|
|
|
insert INTO thr_inv_warehouse
|
|
|
|
(pid, code, name, advanceType, isDefault,
|
|
|
|
(pid, code, name, advanceType, isDefault,
|
|
|
|
status, updateTime, remark)
|
|
|
|
status, updateTime, remark, thirdSysFk)
|
|
|
|
VALUES
|
|
|
|
VALUES
|
|
|
|
<foreach collection="thrInvWarehouseEntitys" item="item" index="index"
|
|
|
|
<foreach collection="thrInvWarehouseEntitys" item="item" index="index"
|
|
|
|
separator=",">
|
|
|
|
separator=",">
|
|
|
@ -89,7 +97,7 @@
|
|
|
|
#{item.pid}, #{item.code},
|
|
|
|
#{item.pid}, #{item.code},
|
|
|
|
#{item.name}, #{item.advanceType}, #{item.isDefault},
|
|
|
|
#{item.name}, #{item.advanceType}, #{item.isDefault},
|
|
|
|
#{item.status}, #{item.updateTime},
|
|
|
|
#{item.status}, #{item.updateTime},
|
|
|
|
#{item.remark})
|
|
|
|
#{item.remark}, #{item.thirdSysFk})
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
@ -110,6 +118,7 @@
|
|
|
|
<if test="status != null">status=#{status},</if>
|
|
|
|
<if test="status != null">status=#{status},</if>
|
|
|
|
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
|
|
|
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
|
|
|
<if test="remark != null">remark=#{remark},</if>
|
|
|
|
<if test="remark != null">remark=#{remark},</if>
|
|
|
|
|
|
|
|
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
WHERE id = #{id}
|
|
|
|
WHERE id = #{id}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
@ -147,6 +156,28 @@
|
|
|
|
<if test="level != null">
|
|
|
|
<if test="level != null">
|
|
|
|
AND `level` = #{level}
|
|
|
|
AND `level` = #{level}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="thirdSysFk != null">
|
|
|
|
|
|
|
|
AND `thirdSysFk` = #{thirdSysFk}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertInvWarehouses">
|
|
|
|
|
|
|
|
replace into thr_inv_warehouse (pid, code, name, advanceType, isDefault, status, updateTime, remark, level,
|
|
|
|
|
|
|
|
pcode,
|
|
|
|
|
|
|
|
thirdSysFk)
|
|
|
|
|
|
|
|
values
|
|
|
|
|
|
|
|
<foreach collection="thrInvWarehouseEntitys" index="index" item="item" separator=",">
|
|
|
|
|
|
|
|
(#{item.pid},
|
|
|
|
|
|
|
|
#{item.code},
|
|
|
|
|
|
|
|
#{item.name},
|
|
|
|
|
|
|
|
#{item.advanceType},
|
|
|
|
|
|
|
|
#{item.isDefault},
|
|
|
|
|
|
|
|
#{item.status},
|
|
|
|
|
|
|
|
#{item.updateTime},
|
|
|
|
|
|
|
|
#{item.remark},
|
|
|
|
|
|
|
|
#{item.level},
|
|
|
|
|
|
|
|
#{item.pcode},
|
|
|
|
|
|
|
|
#{item.thirdSysFk})
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|