refactor: 出入库类型,修改为软删除
This commit is contained in:
parent
a3b8743a1c
commit
bbe7262a03
@ -1,80 +1,123 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.md.mapper.WmsBusinessTypeMapper">
|
||||
|
||||
|
||||
<resultMap type="WmsBusinessType" id="WmsBusinessTypeResult">
|
||||
<result property="typeId" column="TYPE_ID" />
|
||||
<result property="createBy" column="CREATE_BY" />
|
||||
<result property="createTime" column="CREATE_TIME" />
|
||||
<result property="updateBy" column="UPDATE_BY" />
|
||||
<result property="modifyDate" column="MODIFY_DATE" />
|
||||
<result property="isActive" column="IS_ACTIVE" />
|
||||
<result property="isDelete" column="IS_DELETE" />
|
||||
<result property="code" column="CODE" />
|
||||
<result property="name" column="NAME" />
|
||||
<result property="flag" column="FLAG" />
|
||||
<result property="type" column="TYPE" />
|
||||
<result property="isDefault" column="IS_DEFAULT" />
|
||||
<result property="isGlobal" column="IS_GLOBAL" />
|
||||
<result property="isNeedUp" column="IS_NEED_UP" />
|
||||
<result property="qualityType" column="QUALITY_TYPE" />
|
||||
<result property="isOutboundReview" column="IS_OUTBOUND_REVIEW" />
|
||||
<result property="waveStrategy" column="WAVE_STRATEGY" />
|
||||
<result property="isMultipleAllowed" column="IS_MULTIPLE_ALLOWED" />
|
||||
<result property="isShortageAllowed" column="IS_SHORTAGE_ALLOWED" />
|
||||
<result property="isExcessAllowed" column="IS_EXCESS_ALLOWED" />
|
||||
<result property="isWholeOrderPost" column="IS_WHOLE_ORDER_POST" />
|
||||
<result property="isManuallyCreate" column="IS_MANUALLY_CREATE" />
|
||||
<result property="isNoTask" column="IS_NO_TASK" />
|
||||
<result property="isNegativeInv" column="IS_NEGATIVE_INV" />
|
||||
<result property="isCheckSafetyStock" column="IS_CHECK_SAFETY_STOCK" />
|
||||
<result property="isRecordInboundTime" column="IS_RECORD_INBOUND_TIME" />
|
||||
<result property="remark" column="REMARK" />
|
||||
<result property="typeId" column="TYPE_ID"/>
|
||||
<result property="createBy" column="CREATE_BY"/>
|
||||
<result property="createTime" column="CREATE_TIME"/>
|
||||
<result property="updateBy" column="UPDATE_BY"/>
|
||||
<result property="modifyDate" column="MODIFY_DATE"/>
|
||||
<result property="isActive" column="IS_ACTIVE"/>
|
||||
<result property="isDelete" column="IS_DELETE"/>
|
||||
<result property="code" column="CODE"/>
|
||||
<result property="name" column="NAME"/>
|
||||
<result property="flag" column="FLAG"/>
|
||||
<result property="type" column="TYPE"/>
|
||||
<result property="isDefault" column="IS_DEFAULT"/>
|
||||
<result property="isGlobal" column="IS_GLOBAL"/>
|
||||
<result property="isNeedUp" column="IS_NEED_UP"/>
|
||||
<result property="qualityType" column="QUALITY_TYPE"/>
|
||||
<result property="isOutboundReview" column="IS_OUTBOUND_REVIEW"/>
|
||||
<result property="waveStrategy" column="WAVE_STRATEGY"/>
|
||||
<result property="isMultipleAllowed" column="IS_MULTIPLE_ALLOWED"/>
|
||||
<result property="isShortageAllowed" column="IS_SHORTAGE_ALLOWED"/>
|
||||
<result property="isExcessAllowed" column="IS_EXCESS_ALLOWED"/>
|
||||
<result property="isWholeOrderPost" column="IS_WHOLE_ORDER_POST"/>
|
||||
<result property="isManuallyCreate" column="IS_MANUALLY_CREATE"/>
|
||||
<result property="isNoTask" column="IS_NO_TASK"/>
|
||||
<result property="isNegativeInv" column="IS_NEGATIVE_INV"/>
|
||||
<result property="isCheckSafetyStock" column="IS_CHECK_SAFETY_STOCK"/>
|
||||
<result property="isRecordInboundTime" column="IS_RECORD_INBOUND_TIME"/>
|
||||
<result property="remark" column="REMARK"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWmsBusinessTypeVo">
|
||||
select TYPE_ID, CREATE_BY, CREATE_TIME, UPDATE_BY, MODIFY_DATE, IS_ACTIVE, IS_DELETE, CODE, NAME, FLAG, TYPE, IS_DEFAULT, IS_GLOBAL, IS_NEED_UP, QUALITY_TYPE, IS_OUTBOUND_REVIEW, WAVE_STRATEGY, IS_MULTIPLE_ALLOWED, IS_SHORTAGE_ALLOWED, IS_EXCESS_ALLOWED, IS_WHOLE_ORDER_POST, IS_MANUALLY_CREATE, IS_NO_TASK, IS_NEGATIVE_INV, IS_CHECK_SAFETY_STOCK, IS_RECORD_INBOUND_TIME, REMARK from WMS_BUSINESS_TYPE
|
||||
select TYPE_ID,
|
||||
CREATE_BY,
|
||||
CREATE_TIME,
|
||||
UPDATE_BY,
|
||||
MODIFY_DATE,
|
||||
IS_ACTIVE,
|
||||
IS_DELETE,
|
||||
CODE,
|
||||
NAME,
|
||||
FLAG,
|
||||
TYPE,
|
||||
IS_DEFAULT,
|
||||
IS_GLOBAL,
|
||||
IS_NEED_UP,
|
||||
QUALITY_TYPE,
|
||||
IS_OUTBOUND_REVIEW,
|
||||
WAVE_STRATEGY,
|
||||
IS_MULTIPLE_ALLOWED,
|
||||
IS_SHORTAGE_ALLOWED,
|
||||
IS_EXCESS_ALLOWED,
|
||||
IS_WHOLE_ORDER_POST,
|
||||
IS_MANUALLY_CREATE,
|
||||
IS_NO_TASK,
|
||||
IS_NEGATIVE_INV,
|
||||
IS_CHECK_SAFETY_STOCK,
|
||||
IS_RECORD_INBOUND_TIME,
|
||||
REMARK
|
||||
from WMS_BUSINESS_TYPE
|
||||
where IS_DELETE = 0
|
||||
</sql>
|
||||
|
||||
<select id="selectWmsBusinessTypeList" parameterType="WmsBusinessType" resultMap="WmsBusinessTypeResult">
|
||||
<include refid="selectWmsBusinessTypeVo"/>
|
||||
<where>
|
||||
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
||||
<if test="createTime != null and createTime != ''"> and CREATE_TIME = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
||||
<if test="modifyDate != null and modifyDate != ''"> and MODIFY_DATE = #{modifyDate}</if>
|
||||
<if test="isActive != null and isActive != ''"> and IS_ACTIVE = #{isActive}</if>
|
||||
<if test="isDelete != null and isDelete != ''"> and IS_DELETE = #{isDelete}</if>
|
||||
<if test="code != null and code != ''"> and CODE = #{code}</if>
|
||||
<if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
|
||||
<if test="flag != null and flag != ''"> and FLAG = #{flag}</if>
|
||||
<if test="type != null and type != ''"> and TYPE = #{type}</if>
|
||||
<if test="isDefault != null and isDefault != ''"> and IS_DEFAULT = #{isDefault}</if>
|
||||
<if test="isGlobal != null and isGlobal != ''"> and IS_GLOBAL = #{isGlobal}</if>
|
||||
<if test="isNeedUp != null and isNeedUp != ''"> and IS_NEED_UP = #{isNeedUp}</if>
|
||||
<if test="qualityType != null and qualityType != ''"> and QUALITY_TYPE = #{qualityType}</if>
|
||||
<if test="isOutboundReview != null and isOutboundReview != ''"> and IS_OUTBOUND_REVIEW = #{isOutboundReview}</if>
|
||||
<if test="waveStrategy != null and waveStrategy != ''"> and WAVE_STRATEGY = #{waveStrategy}</if>
|
||||
<if test="isMultipleAllowed != null and isMultipleAllowed != ''"> and IS_MULTIPLE_ALLOWED = #{isMultipleAllowed}</if>
|
||||
<if test="isShortageAllowed != null and isShortageAllowed != ''"> and IS_SHORTAGE_ALLOWED = #{isShortageAllowed}</if>
|
||||
<if test="isExcessAllowed != null and isExcessAllowed != ''"> and IS_EXCESS_ALLOWED = #{isExcessAllowed}</if>
|
||||
<if test="isWholeOrderPost != null and isWholeOrderPost != ''"> and IS_WHOLE_ORDER_POST = #{isWholeOrderPost}</if>
|
||||
<if test="isManuallyCreate != null and isManuallyCreate != ''"> and IS_MANUALLY_CREATE = #{isManuallyCreate}</if>
|
||||
<if test="isNoTask != null and isNoTask != ''"> and IS_NO_TASK = #{isNoTask}</if>
|
||||
<if test="isNegativeInv != null and isNegativeInv != ''"> and IS_NEGATIVE_INV = #{isNegativeInv}</if>
|
||||
<if test="isCheckSafetyStock != null and isCheckSafetyStock != ''"> and IS_CHECK_SAFETY_STOCK = #{isCheckSafetyStock}</if>
|
||||
<if test="isRecordInboundTime != null and isRecordInboundTime != ''"> and IS_RECORD_INBOUND_TIME = #{isRecordInboundTime}</if>
|
||||
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
|
||||
<where>
|
||||
<if test="createBy != null and createBy != ''">and CREATE_BY = #{createBy}</if>
|
||||
<if test="createTime != null and createTime != ''">and CREATE_TIME = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''">and UPDATE_BY = #{updateBy}</if>
|
||||
<if test="modifyDate != null and modifyDate != ''">and MODIFY_DATE = #{modifyDate}</if>
|
||||
<if test="isActive != null and isActive != ''">and IS_ACTIVE = #{isActive}</if>
|
||||
<if test="isDelete != null and isDelete != ''">and IS_DELETE = #{isDelete}</if>
|
||||
<if test="code != null and code != ''">and CODE = #{code}</if>
|
||||
<if test="name != null and name != ''">and NAME like concat('%', #{name}, '%')</if>
|
||||
<if test="flag != null and flag != ''">and FLAG = #{flag}</if>
|
||||
<if test="type != null and type != ''">and TYPE = #{type}</if>
|
||||
<if test="isDefault != null and isDefault != ''">and IS_DEFAULT = #{isDefault}</if>
|
||||
<if test="isGlobal != null and isGlobal != ''">and IS_GLOBAL = #{isGlobal}</if>
|
||||
<if test="isNeedUp != null and isNeedUp != ''">and IS_NEED_UP = #{isNeedUp}</if>
|
||||
<if test="qualityType != null and qualityType != ''">and QUALITY_TYPE = #{qualityType}</if>
|
||||
<if test="isOutboundReview != null and isOutboundReview != ''">and IS_OUTBOUND_REVIEW =
|
||||
#{isOutboundReview}
|
||||
</if>
|
||||
<if test="waveStrategy != null and waveStrategy != ''">and WAVE_STRATEGY = #{waveStrategy}</if>
|
||||
<if test="isMultipleAllowed != null and isMultipleAllowed != ''">and IS_MULTIPLE_ALLOWED =
|
||||
#{isMultipleAllowed}
|
||||
</if>
|
||||
<if test="isShortageAllowed != null and isShortageAllowed != ''">and IS_SHORTAGE_ALLOWED =
|
||||
#{isShortageAllowed}
|
||||
</if>
|
||||
<if test="isExcessAllowed != null and isExcessAllowed != ''">and IS_EXCESS_ALLOWED = #{isExcessAllowed}
|
||||
</if>
|
||||
<if test="isWholeOrderPost != null and isWholeOrderPost != ''">and IS_WHOLE_ORDER_POST =
|
||||
#{isWholeOrderPost}
|
||||
</if>
|
||||
<if test="isManuallyCreate != null and isManuallyCreate != ''">and IS_MANUALLY_CREATE =
|
||||
#{isManuallyCreate}
|
||||
</if>
|
||||
<if test="isNoTask != null and isNoTask != ''">and IS_NO_TASK = #{isNoTask}</if>
|
||||
<if test="isNegativeInv != null and isNegativeInv != ''">and IS_NEGATIVE_INV = #{isNegativeInv}</if>
|
||||
<if test="isCheckSafetyStock != null and isCheckSafetyStock != ''">and IS_CHECK_SAFETY_STOCK =
|
||||
#{isCheckSafetyStock}
|
||||
</if>
|
||||
<if test="isRecordInboundTime != null and isRecordInboundTime != ''">and IS_RECORD_INBOUND_TIME =
|
||||
#{isRecordInboundTime}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">and REMARK = #{remark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectWmsBusinessTypeByTypeId" parameterType="String" resultMap="WmsBusinessTypeResult">
|
||||
<include refid="selectWmsBusinessTypeVo"/>
|
||||
where TYPE_ID = #{typeId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertWmsBusinessType" parameterType="WmsBusinessType" useGeneratedKeys="true" keyProperty="typeId">
|
||||
insert into WMS_BUSINESS_TYPE
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@ -104,7 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="isCheckSafetyStock != null">IS_CHECK_SAFETY_STOCK,</if>
|
||||
<if test="isRecordInboundTime != null">IS_RECORD_INBOUND_TIME,</if>
|
||||
<if test="remark != null">REMARK,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
@ -132,7 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="isCheckSafetyStock != null">#{isCheckSafetyStock},</if>
|
||||
<if test="isRecordInboundTime != null">#{isRecordInboundTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWmsBusinessType" parameterType="WmsBusinessType">
|
||||
@ -169,11 +212,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</update>
|
||||
|
||||
<delete id="deleteWmsBusinessTypeByTypeId" parameterType="String">
|
||||
delete from WMS_BUSINESS_TYPE where TYPE_ID = #{typeId}
|
||||
update from WMS_BUSINESS_TYPE
|
||||
where TYPE_ID = #{typeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWmsBusinessTypeByTypeIds" parameterType="String">
|
||||
delete from WMS_BUSINESS_TYPE where TYPE_ID in
|
||||
update WMS_BUSINESS_TYPE set IS_DELETE = 1 where TYPE_ID in
|
||||
<foreach item="typeId" collection="array" open="(" separator="," close=")">
|
||||
#{typeId}
|
||||
</foreach>
|
||||
|
Loading…
Reference in New Issue
Block a user