工艺bug修改
parent
6ec5a1f20a
commit
5c850ba017
@ -1,260 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapBaseProductMapper">
|
||||
|
||||
<resultMap type="SapBaseProduct" id="BaseProductResult">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productDescZh" column="product_desc_zh" />
|
||||
<result property="productModel" column="product_model" />
|
||||
<result property="productDescEn" column="product_desc_en" />
|
||||
<result property="ruleCode" column="rule_code" />
|
||||
<result property="oldProductCode" column="old_product_code" />
|
||||
<result property="partsProductCode" column="parts_product_code" />
|
||||
<result property="skuBarcode" column="sku_barcode" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="tareWeight" column="tare_weight" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="productGroup" column="product_group" />
|
||||
<result property="productGroupName" column="product_group_name" />
|
||||
<result property="userDefined1" column="user_defined1" />
|
||||
<result property="userDefined2" column="user_defined2" />
|
||||
<result property="userDefined3" column="user_defined3" />
|
||||
<result property="userDefined4" column="user_defined4" />
|
||||
<result property="userDefined5" column="user_defined5" />
|
||||
<result property="userDefined6" column="user_defined6" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
<result property="activeFlag" column="active_flag" />
|
||||
<result property="syncFlag" column="sync_flag" />
|
||||
<result property="primaryUom" column="primary_uom" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="bstme" column="bstme" />
|
||||
<result property="basicOrder" column="basic_order" />
|
||||
<result property="convOrder" column="conv_order" />
|
||||
<result property="ausme" column="ausme" />
|
||||
<result property="basicIssue" column="basic_issue" />
|
||||
<result property="convIssue" column="conv_issue" />
|
||||
<result property="appendFlag" column="append_flag" />
|
||||
<result property="appendPercent" column="append_percent" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseProductVo">
|
||||
select product_id, product_code, product_desc_zh, product_model,product_desc_en, rule_code, old_product_code, parts_product_code, sku_barcode, length, width, height, gross_weight, net_weight, tare_weight, volume, unit_price, product_group, product_group_name, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, create_by, create_time, update_by, update_time, factory_code, active_flag, sync_flag, primary_uom, del_flag, bstme, basic_order, conv_order, ausme, basic_issue, conv_issue, append_flag, append_percent from base_product
|
||||
</sql>
|
||||
|
||||
<select id="selectSBaseProductList" parameterType="SapBaseProduct" resultMap="BaseProductResult">
|
||||
<include refid="selectBaseProductVo"/>
|
||||
<where>
|
||||
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
||||
<if test="productDescZh != null and productDescZh != ''"> and product_desc_zh = #{productDescZh}</if>
|
||||
<if test="productModel != null and productModel != ''"> and product_model = #{productModel}</if>
|
||||
<if test="productDescEn != null and productDescEn != ''"> and product_desc_en = #{productDescEn}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''"> and rule_code = #{ruleCode}</if>
|
||||
<if test="oldProductCode != null and oldProductCode != ''"> and old_product_code = #{oldProductCode}</if>
|
||||
<if test="partsProductCode != null and partsProductCode != ''"> and parts_product_code = #{partsProductCode}</if>
|
||||
<if test="skuBarcode != null and skuBarcode != ''"> and sku_barcode = #{skuBarcode}</if>
|
||||
<if test="length != null "> and length = #{length}</if>
|
||||
<if test="width != null "> and width = #{width}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||
<if test="tareWeight != null "> and tare_weight = #{tareWeight}</if>
|
||||
<if test="volume != null "> and volume = #{volume}</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="productGroup != null and productGroup != ''"> and product_group = #{productGroup}</if>
|
||||
<if test="productGroupName != null and productGroupName != ''"> and product_group_name like concat('%', #{productGroupName}, '%')</if>
|
||||
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
|
||||
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
|
||||
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
|
||||
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
|
||||
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
|
||||
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
||||
<if test="syncFlag != null and syncFlag != ''"> and sync_flag = #{syncFlag}</if>
|
||||
<if test="primaryUom != null and primaryUom != ''"> and primary_uom = #{primaryUom}</if>
|
||||
<if test="bstme != null and bstme != ''"> and bstme = #{bstme}</if>
|
||||
<if test="basicOrder != null "> and basic_order = #{basicOrder}</if>
|
||||
<if test="convOrder != null "> and conv_order = #{convOrder}</if>
|
||||
<if test="ausme != null and ausme != ''"> and ausme = #{ausme}</if>
|
||||
<if test="basicIssue != null "> and basic_issue = #{basicIssue}</if>
|
||||
<if test="convIssue != null "> and conv_issue = #{convIssue}</if>
|
||||
<if test="appendFlag != null and appendFlag != ''"> and append_flag = #{appendFlag}</if>
|
||||
<if test="appendPercent != null and appendPercent != ''"> and append_percent = #{appendPercent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult">
|
||||
<include refid="selectBaseProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
<select id="selectBaseProductIDByProductCode" parameterType="String" resultType="String">
|
||||
select product_id
|
||||
from base_product where product_code = #{productCode}
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseProduct" parameterType="SapBaseProduct">
|
||||
insert into base_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productCode != null and productCode != ''">product_code,</if>
|
||||
<if test="productDescZh != null">product_desc_zh,</if>
|
||||
<if test="productModel != null">product_model,</if>
|
||||
<if test="productDescEn != null">product_desc_en,</if>
|
||||
<if test="ruleCode != null">rule_code,</if>
|
||||
<if test="oldProductCode != null">old_product_code,</if>
|
||||
<if test="partsProductCode != null">parts_product_code,</if>
|
||||
<if test="skuBarcode != null">sku_barcode,</if>
|
||||
<if test="length != null">length,</if>
|
||||
<if test="width != null">width,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="tareWeight != null">tare_weight,</if>
|
||||
<if test="volume != null">volume,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="productGroup != null">product_group,</if>
|
||||
<if test="productGroupName != null">product_group_name,</if>
|
||||
<if test="userDefined1 != null">user_defined1,</if>
|
||||
<if test="userDefined2 != null">user_defined2,</if>
|
||||
<if test="userDefined3 != null">user_defined3,</if>
|
||||
<if test="userDefined4 != null">user_defined4,</if>
|
||||
<if test="userDefined5 != null">user_defined5,</if>
|
||||
<if test="userDefined6 != null">user_defined6,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
<if test="activeFlag != null">active_flag,</if>
|
||||
<if test="syncFlag != null">sync_flag,</if>
|
||||
<if test="primaryUom != null">primary_uom,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="bstme != null">bstme,</if>
|
||||
<if test="basicOrder != null">basic_order,</if>
|
||||
<if test="convOrder != null">conv_order,</if>
|
||||
<if test="ausme != null">ausme,</if>
|
||||
<if test="basicIssue != null">basic_issue,</if>
|
||||
<if test="convIssue != null">conv_issue,</if>
|
||||
<if test="appendFlag != null">append_flag,</if>
|
||||
<if test="appendPercent != null">append_percent,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productCode != null and productCode != ''">#{productCode},</if>
|
||||
<if test="productDescZh != null">#{productDescZh},</if>
|
||||
<if test="productModel != null">#{productModel},</if>
|
||||
<if test="productDescEn != null">#{productDescEn},</if>
|
||||
<if test="ruleCode != null">#{ruleCode},</if>
|
||||
<if test="oldProductCode != null">#{oldProductCode},</if>
|
||||
<if test="partsProductCode != null">#{partsProductCode},</if>
|
||||
<if test="skuBarcode != null">#{skuBarcode},</if>
|
||||
<if test="length != null">#{length},</if>
|
||||
<if test="width != null">#{width},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="tareWeight != null">#{tareWeight},</if>
|
||||
<if test="volume != null">#{volume},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="productGroup != null">#{productGroup},</if>
|
||||
<if test="productGroupName != null">#{productGroupName},</if>
|
||||
<if test="userDefined1 != null">#{userDefined1},</if>
|
||||
<if test="userDefined2 != null">#{userDefined2},</if>
|
||||
<if test="userDefined3 != null">#{userDefined3},</if>
|
||||
<if test="userDefined4 != null">#{userDefined4},</if>
|
||||
<if test="userDefined5 != null">#{userDefined5},</if>
|
||||
<if test="userDefined6 != null">#{userDefined6},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
<if test="activeFlag != null">#{activeFlag},</if>
|
||||
<if test="syncFlag != null">#{syncFlag},</if>
|
||||
<if test="primaryUom != null">#{primaryUom},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="bstme != null">#{bstme},</if>
|
||||
<if test="basicOrder != null">#{basicOrder},</if>
|
||||
<if test="convOrder != null">#{convOrder},</if>
|
||||
<if test="ausme != null">#{ausme},</if>
|
||||
<if test="basicIssue != null">#{basicIssue},</if>
|
||||
<if test="convIssue != null">#{convIssue},</if>
|
||||
<if test="appendFlag != null">#{appendFlag},</if>
|
||||
<if test="appendPercent != null">#{appendPercent},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseProduct" parameterType="SapBaseProduct">
|
||||
update base_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
|
||||
<if test="productDescZh != null">product_desc_zh = #{productDescZh},</if>
|
||||
<if test="productModel != null">product_model = #{productModel},</if>
|
||||
<if test="productDescEn != null">product_desc_en = #{productDescEn},</if>
|
||||
<if test="ruleCode != null">rule_code = #{ruleCode},</if>
|
||||
<if test="oldProductCode != null">old_product_code = #{oldProductCode},</if>
|
||||
<if test="partsProductCode != null">parts_product_code = #{partsProductCode},</if>
|
||||
<if test="skuBarcode != null">sku_barcode = #{skuBarcode},</if>
|
||||
<if test="length != null">length = #{length},</if>
|
||||
<if test="width != null">width = #{width},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="tareWeight != null">tare_weight = #{tareWeight},</if>
|
||||
<if test="volume != null">volume = #{volume},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="productGroup != null">product_group = #{productGroup},</if>
|
||||
<if test="productGroupName != null">product_group_name = #{productGroupName},</if>
|
||||
<if test="userDefined1 != null">user_defined1 = #{userDefined1},</if>
|
||||
<if test="userDefined2 != null">user_defined2 = #{userDefined2},</if>
|
||||
<if test="userDefined3 != null">user_defined3 = #{userDefined3},</if>
|
||||
<if test="userDefined4 != null">user_defined4 = #{userDefined4},</if>
|
||||
<if test="userDefined5 != null">user_defined5 = #{userDefined5},</if>
|
||||
<if test="userDefined6 != null">user_defined6 = #{userDefined6},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
||||
<if test="syncFlag != null">sync_flag = #{syncFlag},</if>
|
||||
<if test="primaryUom != null">primary_uom = #{primaryUom},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="bstme != null">bstme = #{bstme},</if>
|
||||
<if test="basicOrder != null">basic_order = #{basicOrder},</if>
|
||||
<if test="convOrder != null">conv_order = #{convOrder},</if>
|
||||
<if test="ausme != null">ausme = #{ausme},</if>
|
||||
<if test="basicIssue != null">basic_issue = #{basicIssue},</if>
|
||||
<if test="convIssue != null">conv_issue = #{convIssue},</if>
|
||||
<if test="appendFlag != null">append_flag = #{appendFlag},</if>
|
||||
<if test="appendPercent != null">append_percent = #{appendPercent},</if>
|
||||
</trim>
|
||||
where product_id = #{productId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseProductByProductId" parameterType="String">
|
||||
delete from base_product where product_id = #{productId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseProductByProductIds" parameterType="String">
|
||||
delete from base_product where product_id in
|
||||
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
@ -1,120 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapProProcessContentMapper">
|
||||
|
||||
<resultMap type="SapProProcessContent" id="ProProcessContentResult">
|
||||
<result property="contentId" column="content_id" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="contentText" column="content_text" />
|
||||
<result property="device" column="device" />
|
||||
<result property="material" column="material" />
|
||||
<result property="docUrl" column="doc_url" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProcessContentVo">
|
||||
select content_id, process_id, order_num, content_text, device, material, doc_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_process_content
|
||||
</sql>
|
||||
|
||||
<select id="selectProProcessContentList" parameterType="SapProProcessContent" resultMap="ProProcessContentResult">
|
||||
<include refid="selectProProcessContentVo"/>
|
||||
<where>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="contentText != null and contentText != ''"> and content_text = #{contentText}</if>
|
||||
<if test="device != null and device != ''"> and device = #{device}</if>
|
||||
<if test="material != null and material != ''"> and material = #{material}</if>
|
||||
<if test="docUrl != null and docUrl != ''"> and doc_url = #{docUrl}</if>
|
||||
</where>
|
||||
order by order_num asc
|
||||
</select>
|
||||
|
||||
<select id="selectProProcessContentByContentId" parameterType="String" resultMap="ProProcessContentResult">
|
||||
<include refid="selectProProcessContentVo"/>
|
||||
where content_id = #{contentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProcessContent" parameterType="SapProProcessContent" useGeneratedKeys="true" keyProperty="contentId">
|
||||
insert into pro_process_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
content_id,
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="contentText != null">content_text,</if>
|
||||
<if test="device != null">device,</if>
|
||||
<if test="material != null">material,</if>
|
||||
<if test="docUrl != null">doc_url,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
#{contentId},
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="contentText != null">#{contentText},</if>
|
||||
<if test="device != null">#{device},</if>
|
||||
<if test="material != null">#{material},</if>
|
||||
<if test="docUrl != null">#{docUrl},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProProcessContent" parameterType="SapProProcessContent">
|
||||
update pro_process_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="contentText != null">content_text = #{contentText},</if>
|
||||
<if test="device != null">device = #{device},</if>
|
||||
<if test="material != null">material = #{material},</if>
|
||||
<if test="docUrl != null">doc_url = #{docUrl},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where content_id = #{contentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProcessContentByContentId" parameterType="String">
|
||||
delete from pro_process_content where content_id = #{contentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProcessContentByContentIds" parameterType="String">
|
||||
delete from pro_process_content where content_id in
|
||||
<foreach item="contentId" collection="array" open="(" separator="," close=")">
|
||||
#{contentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -1,154 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapProProcessMapper">
|
||||
|
||||
<resultMap type="SapProProcess" id="ProProcessResult">
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="attention" column="attention" />
|
||||
<result property="enableFlag" column="enable_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="splitMerge" column="split_merge" />
|
||||
<result property="splitMergNum" column="split_merg_num" />
|
||||
<result property="sync" column="sync"/>
|
||||
<result property="workCenter" column="work_center"/>
|
||||
<result property="workTime" column="work_time"/>
|
||||
<result property="equipment" column="equipment"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProcessVo">
|
||||
select process_id, process_code, process_name, attention,
|
||||
enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time,
|
||||
update_by, update_time,split_merge,split_merg_num,sync,work_center,work_time,equipment
|
||||
from pro_process
|
||||
</sql>
|
||||
|
||||
<select id="selectProProcessList" parameterType="SapProProcess" resultMap="ProProcessResult">
|
||||
<include refid="selectProProcessVo"/>
|
||||
<where>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="attention != null and attention != ''"> and attention = #{attention}</if>
|
||||
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectProProcessByProcessId" parameterType="String" resultMap="ProProcessResult">
|
||||
<include refid="selectProProcessVo"/>
|
||||
where process_id = #{processId}
|
||||
</select>
|
||||
|
||||
<select id="checkProcessCodeUnique" parameterType="SapProProcess" resultMap="ProProcessResult">
|
||||
select top 1 process_id, process_code, process_name, attention, enable_flag,
|
||||
remark, attr1, attr2, attr3, attr4, create_by, create_time,
|
||||
update_by, update_time from pro_process
|
||||
where process_code = #{processCode}
|
||||
</select>
|
||||
|
||||
<select id="checkProcessNameUnique" parameterType="SapProProcess" resultMap="ProProcessResult">
|
||||
select top 1 process_id, process_code, process_name, attention, enable_flag,
|
||||
remark, attr1, attr2, attr3, attr4, create_by, create_time,
|
||||
update_by, update_time from pro_process
|
||||
where process_name = #{processName}
|
||||
</select>
|
||||
|
||||
<select id="selectProProcessByProcessName" parameterType="String" resultType="Integer">
|
||||
select count(process_name) from pro_process where process_name = #{processName}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProcess" parameterType="SapProProcess" useGeneratedKeys="true" keyProperty="processId">
|
||||
insert into pro_process
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
process_id,
|
||||
<if test="processCode != null and processCode != ''">process_code,</if>
|
||||
<if test="processName != null and processName != ''">process_name,</if>
|
||||
<if test="attention != null">attention,</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="splitMerge != null">split_merge,</if>
|
||||
<if test="splitMergNum != null">split_merg_num,</if>
|
||||
<if test="sync != null">sync,</if>
|
||||
<if test="workCenter != null">work_center,</if>
|
||||
<if test="workTime != null">work_time,</if>
|
||||
<if test="equipment != null">equipment,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
#{processId},
|
||||
<if test="processCode != null and processCode != ''">#{processCode},</if>
|
||||
<if test="processName != null and processName != ''">#{processName},</if>
|
||||
<if test="attention != null">#{attention},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">#{enableFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="splitMerge != null">#{splitMerge},</if>
|
||||
<if test="splitMergNum != null">#{splitMergNum},</if>
|
||||
<if test="sync != null">#{sync},</if>
|
||||
<if test="workCenter != null">#{workCenter},</if>
|
||||
<if test="workTime != null">#{workTime},</if>
|
||||
<if test="equipment != null">#{equipment},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateProProcess" parameterType="SapProProcess">
|
||||
update pro_process
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="processCode != null and processCode != ''">process_code = #{processCode},</if>
|
||||
<if test="processName != null and processName != ''">process_name = #{processName},</if>
|
||||
<if test="attention != null">attention = #{attention},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag = #{enableFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="splitMerge != null">split_merge = #{splitMerge},</if>
|
||||
<if test="splitMergNum != null">split_merg_num = #{splitMergNum},</if>
|
||||
<if test="sync != null">sync = #{sync},</if>
|
||||
<if test="workCenter != null">work_center = #{workCenter},</if>
|
||||
<if test="workTime != null">work_time = #{workTime},</if>
|
||||
<if test="equipment != null">equipment = #{equipment},</if>
|
||||
</trim>
|
||||
where process_id = #{processId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProcessByProcessId" parameterType="String">
|
||||
delete from pro_process where process_id = #{processId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProcessByProcessIds" parameterType="String">
|
||||
delete from pro_process where process_id in
|
||||
<foreach item="processId" collection="array" open="(" separator="," close=")">
|
||||
#{processId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -1,150 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapProRouteMapper">
|
||||
|
||||
<resultMap type="SapProRoute" id="ProRouteResult">
|
||||
<result property="routeId" column="route_id" />
|
||||
<result property="routeCode" column="route_code" />
|
||||
<result property="routeName" column="route_name" />
|
||||
<result property="routeDesc" column="route_desc" />
|
||||
<result property="enableFlag" column="enable_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="routeVersion" column="route_version" />
|
||||
<result property="needCheck" column="need_check" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProRouteVo">
|
||||
select route_id, route_code, route_name, route_desc, enable_flag, remark,
|
||||
attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time,
|
||||
route_version,need_check
|
||||
from pro_route
|
||||
</sql>
|
||||
|
||||
<select id="selectProRouteList" parameterType="SapProRoute" resultMap="ProRouteResult">
|
||||
<include refid="selectProRouteVo"/>
|
||||
<where>
|
||||
<if test="routeCode != null and routeCode != ''"> and route_code = #{routeCode}</if>
|
||||
<if test="routeName != null and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if>
|
||||
<if test="routeDesc != null and routeDesc != ''"> and route_desc = #{routeDesc}</if>
|
||||
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectProRouteByRouteId" parameterType="String" resultMap="ProRouteResult">
|
||||
<include refid="selectProRouteVo"/>
|
||||
where route_id = #{routeId}
|
||||
</select>
|
||||
<select id="selectProRouteByRouteCode" parameterType="String" resultType="Integer">
|
||||
select count(route_code) from pro_route where route_code = #{routeCode}
|
||||
</select>
|
||||
|
||||
<select id="getRouteByProductId" parameterType="String" resultMap="ProRouteResult">
|
||||
select r.*
|
||||
from pro_route r
|
||||
left join pro_route_product p
|
||||
on p.route_id = r.route_id
|
||||
where r.enable_flag = 'Y'
|
||||
and p.item_id = #{itemId}
|
||||
</select>
|
||||
|
||||
<select id="checkRouteCodeUnique" parameterType="SapProRoute" resultMap="ProRouteResult">
|
||||
select top 1 route_id, route_code, route_name, route_desc,
|
||||
enable_flag, remark, attr1, attr2, attr3, attr4,
|
||||
create_by, create_time, update_by, update_time,need_check
|
||||
from pro_route
|
||||
where route_code = #{routeCode}
|
||||
</select>
|
||||
|
||||
<select id="selectAllRoute" resultMap="ProRouteResult">
|
||||
select route_code, route_name
|
||||
from pro_route
|
||||
where enable_flag = 'Y'
|
||||
</select>
|
||||
|
||||
<insert id="insertProRoute" parameterType="SapProRoute" useGeneratedKeys="true" keyProperty="routeId">
|
||||
insert into pro_route
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="routeId != null and routeId != ''">route_id,</if>
|
||||
<if test="routeCode != null and routeCode != ''">route_code,</if>
|
||||
<if test="routeName != null and routeName != ''">route_name,</if>
|
||||
<if test="routeDesc != null">route_desc,</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="routeVersion != null">route_version,</if>
|
||||
<if test="needCheck != null">need_check,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="routeId != null and routeId != ''">#{routeId},</if>
|
||||
<if test="routeCode != null and routeCode != ''">#{routeCode},</if>
|
||||
<if test="routeName != null and routeName != ''">#{routeName},</if>
|
||||
<if test="routeDesc != null">#{routeDesc},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">#{enableFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="routeVersion != null">#{routeVersion},</if>
|
||||
<if test="needCheck != null">#{needCheck},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateProRoute" parameterType="SapProRoute">
|
||||
update pro_route
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="routeCode != null and routeCode != ''">route_code = #{routeCode},</if>
|
||||
<if test="routeName != null and routeName != ''">route_name = #{routeName},</if>
|
||||
<if test="routeDesc != null">route_desc = #{routeDesc},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag = #{enableFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="routeVersion != null">route_version = #{routeVersion},</if>
|
||||
<if test="needCheck != null">#{needCheck},</if>
|
||||
</trim>
|
||||
where route_id = #{routeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProRouteByRouteId" parameterType="String">
|
||||
delete from pro_route where route_id = #{routeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProRouteByRouteIds" parameterType="String">
|
||||
delete from pro_route where route_id in
|
||||
<foreach item="routeId" collection="array" open="(" separator="," close=")">
|
||||
#{routeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -1,231 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapProRouteProcessMapper">
|
||||
|
||||
<resultMap type="SapProRouteProcess" id="ProRouteProcessResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="routeId" column="route_id" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="nextProcessId" column="next_process_id" />
|
||||
<result property="nextProcessCode" column="next_process_code" />
|
||||
<result property="nextProcessName" column="next_process_name" />
|
||||
<result property="linkType" column="link_type" />
|
||||
<result property="defaultPreTime" column="default_pre_time" />
|
||||
<result property="defaultSufTime" column="default_suf_time" />
|
||||
<result property="colorCode" column="color_code" />
|
||||
<result property="keyFlag" column="key_flag" ></result>
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProRouteProcessVo">
|
||||
select record_id, route_id, process_id, process_code, process_name, order_num, next_process_id, next_process_code, next_process_name, link_type, default_pre_time, default_suf_time, color_code,key_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_route_process
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectProRouteProcessList" parameterType="SapProRouteProcess" resultMap="ProRouteProcessResult">
|
||||
<include refid="selectProRouteProcessVo"/>
|
||||
<where>
|
||||
<if test="routeId != null "> and route_id = #{routeId}</if>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="nextProcessId != null "> and next_process_id = #{nextProcessId}</if>
|
||||
<if test="nextProcessCode != null and nextProcessCode != ''"> and next_process_code = #{nextProcessCode}</if>
|
||||
<if test="nextProcessName != null and nextProcessName != ''"> and next_process_name like concat('%', #{nextProcessName}, '%')</if>
|
||||
<if test="linkType != null and linkType != ''"> and link_type = #{linkType}</if>
|
||||
<if test="defaultPreTime != null "> and default_pre_time = #{defaultPreTime}</if>
|
||||
<if test="defaultSufTime != null "> and default_suf_time = #{defaultSufTime}</if>
|
||||
<if test="colorCode != null and colorCode != ''"> and color_code = #{colorCode}</if>
|
||||
<if test="keyFlag !=null and keyFlag !=''"> and key_flag = #{keyFlag}</if>
|
||||
</where>
|
||||
order by order_num asc
|
||||
</select>
|
||||
|
||||
<select id="selectProRouteProcessByRecordId" parameterType="String" resultMap="ProRouteProcessResult">
|
||||
<include refid="selectProRouteProcessVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
<select id="selectProRouteProcessByProcessCode" parameterType="String" resultType="Integer">
|
||||
SELECT count(*) FROM pro_route_process where process_code = #{processCode}
|
||||
</select>
|
||||
<select id="checkOrderNumExists" parameterType="SapProRouteProcess" resultMap="ProRouteProcessResult">
|
||||
select top 1 record_id, route_id, process_id, process_code, process_name,
|
||||
order_num, next_process_id, next_process_code, next_process_name,
|
||||
link_type, default_pre_time, default_suf_time, color_code,key_flag,
|
||||
remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by,
|
||||
update_time
|
||||
from pro_route_process
|
||||
where route_id = #{routeId} and order_num = #{orderNum}
|
||||
</select>
|
||||
|
||||
<select id="checkProcessExists" parameterType="SapProRouteProcess" resultMap="ProRouteProcessResult">
|
||||
select top 1 record_id, route_id, process_id, process_code, process_name,
|
||||
order_num, next_process_id, next_process_code, next_process_name,
|
||||
link_type, default_pre_time, default_suf_time, color_code,key_flag,
|
||||
remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by,
|
||||
update_time
|
||||
from pro_route_process
|
||||
where route_id = #{routeId} and process_id = #{processId}
|
||||
</select>
|
||||
|
||||
<select id="checkUpdateFlagUnique" parameterType="SapProRouteProcess" resultMap="ProRouteProcessResult">
|
||||
select top 1 record_id, route_id, process_id, process_code, process_name,
|
||||
order_num, next_process_id, next_process_code, next_process_name,
|
||||
link_type, default_pre_time, default_suf_time, color_code,key_flag,
|
||||
remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by,
|
||||
update_time
|
||||
from pro_route_process
|
||||
where route_id = #{routeId} and key_flag = 'Y'
|
||||
</select>
|
||||
|
||||
<select id="findPreProcess" parameterType="SapProRouteProcess" resultMap="ProRouteProcessResult">
|
||||
select top 1 record_id, route_id, process_id, process_code, process_name,
|
||||
order_num, next_process_id, next_process_code, next_process_name,
|
||||
link_type, default_pre_time, default_suf_time, color_code,key_flag,
|
||||
remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by,
|
||||
update_time
|
||||
from pro_route_process
|
||||
where route_id = #{routeId}
|
||||
<choose>
|
||||
<when test="orderNum != null "> and order_num < #{orderNum}</when>
|
||||
<otherwise>
|
||||
AND order_num < (
|
||||
SELECT top 1 order_num
|
||||
FROM pro_route_process
|
||||
WHERE route_id = #{routeId}
|
||||
)
|
||||
</otherwise>
|
||||
</choose>
|
||||
ORDER BY order_num DESC
|
||||
</select>
|
||||
|
||||
<select id="findNextProcess" parameterType="SapProRouteProcess" resultMap="ProRouteProcessResult">
|
||||
select top 1 record_id, route_id, process_id, process_code, process_name, order_num,
|
||||
next_process_id, next_process_code, next_process_name, link_type, default_pre_time,
|
||||
default_suf_time, color_code,key_flag, remark, attr1, attr2, attr3, attr4, create_by,
|
||||
create_time, update_by, update_time from pro_route_process
|
||||
where route_id = #{routeId}
|
||||
<choose>
|
||||
<when test="orderNum != null "> and order_num > #{orderNum}</when>
|
||||
<otherwise>
|
||||
AND order_num > (
|
||||
SELECT top 1 order_num
|
||||
FROM pro_route_process
|
||||
WHERE route_id = #{routeId}
|
||||
)
|
||||
</otherwise>
|
||||
</choose>
|
||||
ORDER BY order_num ASC
|
||||
</select>
|
||||
|
||||
<insert id="insertProRouteProcess" parameterType="SapProRouteProcess" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into pro_route_process
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null and recordId != ''">record_id,</if>
|
||||
<if test="routeId != null">route_id,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="processCode != null">process_code,</if>
|
||||
<if test="processName != null">process_name,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="nextProcessId != null">next_process_id,</if>
|
||||
<if test="nextProcessCode != null">next_process_code,</if>
|
||||
<if test="nextProcessName != null">next_process_name,</if>
|
||||
<if test="linkType != null">link_type,</if>
|
||||
<if test="defaultPreTime != null">default_pre_time,</if>
|
||||
<if test="defaultSufTime != null">default_suf_time,</if>
|
||||
<if test="colorCode != null">color_code,</if>
|
||||
<if test="keyFlag !=null">key_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null and recordId != ''">#{recordId},</if>
|
||||
<if test="routeId != null">#{routeId},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="processCode != null">#{processCode},</if>
|
||||
<if test="processName != null">#{processName},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="nextProcessId != null">#{nextProcessId},</if>
|
||||
<if test="nextProcessCode != null">#{nextProcessCode},</if>
|
||||
<if test="nextProcessName != null">#{nextProcessName},</if>
|
||||
<if test="linkType != null">#{linkType},</if>
|
||||
<if test="defaultPreTime != null">#{defaultPreTime},</if>
|
||||
<if test="defaultSufTime != null">#{defaultSufTime},</if>
|
||||
<if test="colorCode != null">#{colorCode},</if>
|
||||
<if test="keyFlag !=null">#{keyFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProRouteProcess" parameterType="SapProRouteProcess">
|
||||
update pro_route_process
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="routeId != null">route_id = #{routeId},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="processCode != null">process_code = #{processCode},</if>
|
||||
<if test="processName != null">process_name = #{processName},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="nextProcessId != null">next_process_id = #{nextProcessId},</if>
|
||||
<if test="nextProcessCode != null">next_process_code = #{nextProcessCode},</if>
|
||||
<if test="nextProcessName != null">next_process_name = #{nextProcessName},</if>
|
||||
<if test="linkType != null">link_type = #{linkType},</if>
|
||||
<if test="defaultPreTime != null">default_pre_time = #{defaultPreTime},</if>
|
||||
<if test="defaultSufTime != null">default_suf_time = #{defaultSufTime},</if>
|
||||
<if test="keyFlag !=null">key_flag = #{keyFlag},</if>
|
||||
<if test="colorCode != null">color_code = #{colorCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProRouteProcessByRecordId" parameterType="String">
|
||||
delete from pro_route_process where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProRouteProcessByRecordIds" parameterType="String">
|
||||
delete from pro_route_process where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByRouteId" parameterType="String">
|
||||
delete from pro_route_process where route_id = #{routeId}
|
||||
</delete>
|
||||
</mapper>
|
@ -1,148 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapProRouteProductMapper">
|
||||
|
||||
<resultMap type="com.op.system.api.domain.sap.SapProRouteProduct" id="ProRouteProductResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="routeId" column="route_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProRouteProductVo">
|
||||
select record_id, route_id, item_id, item_code, item_name, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_route_product
|
||||
</sql>
|
||||
|
||||
<select id="selectProRouteProductList" parameterType="com.op.system.api.domain.sap.SapProRouteProduct" resultMap="ProRouteProductResult">
|
||||
<include refid="selectProRouteProductVo"/>
|
||||
<where>
|
||||
<if test="routeId != null and routeId != ''"> and route_id = #{routeId}</if>
|
||||
<if test="itemId != null and itemId != ''"> and item_id = #{itemId}</if>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProRouteProductByRecordId" parameterType="String" resultMap="ProRouteProductResult">
|
||||
<include refid="selectProRouteProductVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
<!-- 原来逻辑:关联工厂里面的线体-->
|
||||
<!-- <select id="getRouteProdProductListUndo" resultType="com.op.technology.domain.ProRouteProduct">-->
|
||||
<!-- select sf.f_code [key],-->
|
||||
<!-- sf.factory_name label-->
|
||||
<!-- from sys_factory sf-->
|
||||
<!-- where sf.f_type='l' and sf.status = '1' and sf.del_flag = '0'-->
|
||||
<!-- </select>-->
|
||||
<!-- 现在逻辑:关联产品-->
|
||||
<select id="getRouteProdProductListUndo" resultType="com.op.system.api.domain.sap.SapProRouteProduct">
|
||||
select bp.product_code [key],
|
||||
bp.product_desc_zh label,
|
||||
bp.product_desc_zh itemName,
|
||||
bp.product_id itemId
|
||||
from base_product bp
|
||||
where bp.active_flag = '1' and bp.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<!-- <select id="getRouteProdProductListDo" resultType="com.op.technology.domain.ProRouteProduct">-->
|
||||
<!-- select pl.item_code [key],-->
|
||||
<!-- sf.factory_name label-->
|
||||
<!-- from pro_route_product pl-->
|
||||
<!-- left join sys_factory sf on pl.item_code = sf.f_code-->
|
||||
<!-- where pl.route_id = #{routeId}-->
|
||||
<!-- </select>-->
|
||||
|
||||
<select id="getRouteProdProductListDo" resultType="com.op.system.api.domain.sap.SapProRouteProduct">
|
||||
select pp.item_code [key],
|
||||
bp.product_desc_zh label
|
||||
from pro_route_product pp
|
||||
left join base_product bp on pp.item_code = bp.product_code
|
||||
where pp.route_id = #{routeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertProRouteProduct" parameterType="com.op.system.api.domain.sap.SapProRouteProduct">
|
||||
insert into pro_route_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="routeId != null and routeId != ''">route_id,</if>
|
||||
<if test="itemId != null and itemId != ''">item_id,</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code,</if>
|
||||
<if test="itemName != null and itemName != ''">item_name,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="routeId != null and routeId != ''">#{routeId},</if>
|
||||
<if test="itemId != null and itemId != ''">#{itemId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">#{itemCode},</if>
|
||||
<if test="itemName != null and itemName != ''">#{itemName},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProRouteProduct" parameterType="com.op.system.api.domain.sap.SapProRouteProduct">
|
||||
update pro_route_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="routeId != null and routeId != ''">route_id = #{routeId},</if>
|
||||
<if test="itemId != null and itemId != ''">item_id = #{itemId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code = #{itemCode},</if>
|
||||
<if test="itemName != null and itemName != ''">item_name = #{itemName},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProRouteProductByRecordId" parameterType="String">
|
||||
delete from pro_route_product where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProRouteProductByRecordIds" parameterType="String">
|
||||
delete from pro_route_product where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByRouteId">
|
||||
delete from pro_route_product where route_id = #{routeId}
|
||||
</delete>
|
||||
</mapper>
|
@ -1,14 +0,0 @@
|
||||
<?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">
|
||||
<mapper namespace="com.op.sap.mapper.SapSysUserMapper">
|
||||
|
||||
<select id="getPoolName" parameterType="String" resultType="String">
|
||||
select url from sys_datasource
|
||||
where pool_name = #{poolName}
|
||||
</select>
|
||||
<select id="getNums" resultType="Integer">
|
||||
SELECT COUNT(*) FROM sys_datasource
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue