|
|
|
@ -36,10 +36,11 @@
|
|
|
|
|
<result property="activeFlag" column="active_flag" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="factoryCode" column="factory_code" />
|
|
|
|
|
<result property="delFlag" column="delFlag" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseAreaVo">
|
|
|
|
|
select area_id, area_code, area_desc, region_code, wh_code, instock_tran_loc, outstock_tran_loc, pick_tran_loc, ex_sign_loc_no, frozen_loc_no, sap_send_spot, area_point, use_tray, tray_mix, instorage_strategy, outstorage_strategy, force_outstorage, loc_pick_flag, allocation_rule, gather_loc_type, priority, user_defined1, user_defined2, user_defined3, create_by, create_time, update_by, update_time, active_flag, remark, factory_code from base_area
|
|
|
|
|
select area_id, area_code, area_desc, region_code, wh_code, instock_tran_loc, outstock_tran_loc, pick_tran_loc, ex_sign_loc_no, frozen_loc_no, sap_send_spot, area_point, use_tray, tray_mix, instorage_strategy, outstorage_strategy, force_outstorage, loc_pick_flag, allocation_rule, gather_loc_type, priority, user_defined1, user_defined2, user_defined3, create_by, create_time, update_by, update_time, active_flag, remark, factory_code,del_flag from base_area
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseAreaList" parameterType="BaseArea" resultMap="BaseAreaResult">
|
|
|
|
@ -70,12 +71,15 @@
|
|
|
|
|
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
|
|
|
|
|
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseAreaByAreaId" parameterType="String" resultMap="BaseAreaResult">
|
|
|
|
|
<include refid="selectBaseAreaVo"/>
|
|
|
|
|
where area_id = #{areaId}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseArea" parameterType="BaseArea">
|
|
|
|
@ -183,22 +187,29 @@
|
|
|
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where area_id = #{areaId}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseAreaByAreaId" parameterType="String">
|
|
|
|
|
delete from base_area where area_id = #{areaId}
|
|
|
|
|
</delete>
|
|
|
|
|
<update id="deleteBaseAreaByAreaId" parameterType="String">
|
|
|
|
|
update base_area
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where area_id = #{areaId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseAreaByAreaIds" parameterType="String">
|
|
|
|
|
delete from base_area where area_id in
|
|
|
|
|
<update id="deleteBaseAreaByAreaIds" parameterType="String">
|
|
|
|
|
update base_area
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where area_id in
|
|
|
|
|
<foreach item="areaId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{areaId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<!--查询总数-->
|
|
|
|
|
<select id="queryCount" parameterType="BaseArea" resultType="java.lang.Integer">
|
|
|
|
|
select count(*)
|
|
|
|
|
from base_area
|
|
|
|
|
where del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -206,12 +217,14 @@
|
|
|
|
|
select area_code
|
|
|
|
|
from base_area
|
|
|
|
|
where area_code = #{areaCode}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="checkAreaDescUnique" parameterType="BaseArea" resultType ="java.lang.String">
|
|
|
|
|
select area_desc
|
|
|
|
|
from base_area
|
|
|
|
|
where area_desc = #{areaDesc}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|