基础信息库区管理

highway
A0010407 1 year ago
parent 3353eb7afa
commit b69c8561d9

@ -117,6 +117,17 @@ public class BaseArea extends BaseEntity {
@Excel(name = "工厂编码")
private String factoryCode;
/** 删除标志 */
@Excel(name = "删除标志")
private String delFlag;
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
@ -334,6 +345,7 @@ public class BaseArea extends BaseEntity {
.append("activeFlag", getActiveFlag())
.append("remark", getRemark())
.append("factoryCode", getFactoryCode())
.append("delFlag", getDelFlag())
.toString();
}
}

@ -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>
Loading…
Cancel
Save