You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
361 lines
20 KiB
XML
361 lines
20 KiB
XML
<?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.os.mes.prod.mapper.ProdOrderInfoMapper">
|
|
|
|
<resultMap type="ProdOrderInfo" id="ProdOrderInfoResult">
|
|
<result property="objId" column="obj_id"/>
|
|
<result property="orderCode" column="order_code"/>
|
|
<result property="saleOrderCode" column="sale_order_code"/>
|
|
<result property="saleOrderLineNumber" column="sale_order_line_number"/>
|
|
<result property="materialCode" column="material_code"/>
|
|
<result property="materialName" column="material_name"/>
|
|
<result property="matkl" column="matkl"/>
|
|
<result property="bomCode" column="bom_code"/>
|
|
<result property="orderAmount" column="order_amount"/>
|
|
<result property="completeAmount" column="complete_amount"/>
|
|
<result property="orderType" column="order_type"/>
|
|
<result property="orderStatus" column="order_status"/>
|
|
<result property="finishFlag" column="finish_flag"/>
|
|
<result property="beginDate" column="begin_date"/>
|
|
<result property="endDate" column="end_date"/>
|
|
<result property="realBeginDate" column="real_begin_date"/>
|
|
<result property="realEndDate" column="real_end_date"/>
|
|
<result property="factoryCode" column="factory_code"/>
|
|
<result property="isRelease" column="is_release"/>
|
|
<result property="workCenterCode" column="work_center_code"/>
|
|
<result property="routingCode" column="routing_code"/>
|
|
<result property="printName" column="print_name"/>
|
|
<result property="isFlag" column="is_flag"/>
|
|
<result property="createdBy" column="created_by"/>
|
|
<result property="createdTime" column="created_time"/>
|
|
<result property="updatedBy" column="updated_by"/>
|
|
<result property="updatedTime" column="updated_time"/>
|
|
<association property="orderDetail" javaType="ProdOrderDetail" resultMap="ProdOrderDetailResult" />
|
|
</resultMap>
|
|
|
|
<resultMap id="ProdOrderDetailResult" type="ProdOrderDetail">
|
|
<result property="SeqNo" column="SeqNo"/>
|
|
<result property="OrderDate" column="OrderDate"/>
|
|
<result property="DeliveryDate" column="DeliveryDate"/>
|
|
<result property="ProductType" column="ProductType"/>
|
|
<result property="ProductStatus" column="ProductStatus"/>
|
|
<result property="OrderOwner" column="OrderOwner"/>
|
|
<result property="CustomerInfo" column="CustomerInfo"/>
|
|
<result property="BeltLengthSpecifications" column="BeltLengthSpecifications"/>
|
|
<result property="AreaAndWeight" column="AreaAndWeight"/>
|
|
<result property="UsingRawMaterials" column="UsingRawMaterials"/>
|
|
<result property="BeltWidth" column="BeltWidth"/>
|
|
<result property="BeltClothLayer" column="BeltClothLayer"/>
|
|
<result property="BeltRequiredLength" column="BeltRequiredLength"/>
|
|
<result property="GluingRequiredThickness" column="GluingRequiredThickness"/>
|
|
<result property="LowerGlueRequiredThickness" column="LowerGlueRequiredThickness"/>
|
|
<result property="ProductionGluingThickness" column="ProductionGluingThickness"/>
|
|
<result property="UpperBufferAdhesiveThickness" column="UpperBufferAdhesiveThickness"/>
|
|
<result property="ProductionLowerGlueThickness" column="ProductionLowerGlueThickness"/>
|
|
<result property="LowerBufferAdhesiveThickness" column="LowerBufferAdhesiveThickness"/>
|
|
<result property="ClothGlueThickness" column="ClothGlueThickness"/>
|
|
<result property="SmallClothFabricLayer" column="SmallClothFabricLayer"/>
|
|
<result property="SmallClothThickness" column="SmallClothThickness"/>
|
|
<result property="IsNeedThicken" column="IsNeedThicken"/>
|
|
<result property="EachLayerThickenThickness" column="EachLayerThickenThickness"/>
|
|
<result property="ExtraThickeningThickness" column="ExtraThickeningThickness"/>
|
|
<result property="TotalProductionThickness" column="TotalProductionThickness"/>
|
|
<result property="AdditionalThickness" column="AdditionalThickness"/>
|
|
<result property="RecommendedShimThickness" column="RecommendedShimThickness"/>
|
|
<result property="SemiFinishedProductWidth" column="SemiFinishedProductWidth"/>
|
|
<result property="RollingProductionMeters" column="RollingProductionMeters"/>
|
|
<result property="RecommendedPadWidth" column="RecommendedPadWidth"/>
|
|
<result property="BigFabricManufacturer" column="BigFabricManufacturer"/>
|
|
<result property="FabricSpecifications" column="FabricSpecifications"/>
|
|
<result property="EstimatedFabricUsage" column="EstimatedFabricUsage"/>
|
|
<result property="ClothWidth" column="ClothWidth"/>
|
|
<result property="ClothWeight" column="ClothWeight"/>
|
|
<result property="SmallFabricSpecificationsDic" column="SmallFabricSpecificationsDic"/>
|
|
<result property="SmallClothWidth" column="SmallClothWidth"/>
|
|
<result property="SmallClothUsage" column="SmallClothUsage"/>
|
|
<result property="SmallClothWeight" column="SmallClothWeight"/>
|
|
<result property="GluingProcess" column="GluingProcess"/>
|
|
<result property="UpperLowerGlue" column="UpperLowerGlue"/>
|
|
<result property="UpperLowerGlueCoefficient" column="UpperLowerGlueCoefficient"/>
|
|
<result property="UpperLowerGlueUsage" column="UpperLowerGlueUsage"/>
|
|
<result property="LowerGlue" column="LowerGlue"/>
|
|
<result property="LowerGlueCoefficient" column="LowerGlueCoefficient"/>
|
|
<result property="LowerGlueUsage" column="LowerGlueUsage"/>
|
|
<result property="LargeClothGlue" column="LargeClothGlue"/>
|
|
<result property="LargeClothGlueCoefficient" column="LargeClothGlueCoefficient"/>
|
|
<result property="LargeClothGlueUsage" column="LargeClothGlueUsage"/>
|
|
<result property="BufferGlueUsage" column="BufferGlueUsage"/>
|
|
<result property="MiddleGlue" column="MiddleGlue"/>
|
|
<result property="MiddleGlueCoefficient" column="MiddleGlueCoefficient"/>
|
|
<result property="MiddleGlueUsage" column="MiddleGlueUsage"/>
|
|
<result property="SmallBarWidth" column="SmallBarWidth"/>
|
|
<result property="SmallBarThickness" column="SmallBarThickness"/>
|
|
<result property="SmallBarStandardUsage" column="SmallBarStandardUsage"/>
|
|
<result property="FormingArea" column="FormingArea"/>
|
|
<result property="RollCoatingArea" column="RollCoatingArea"/>
|
|
<result property="RolledFabricArea" column="RolledFabricArea"/>
|
|
<result property="SulfurizationArea" column="SulfurizationArea"/>
|
|
<result property="LargeClothArea" column="LargeClothArea"/>
|
|
<result property="SmallClothArea" column="SmallClothArea"/>
|
|
<result property="BeltTotalArea" column="BeltTotalArea"/>
|
|
<result property="SkirtArea" column="SkirtArea"/>
|
|
<result property="PartitionArea" column="PartitionArea"/>
|
|
<result property="EdgeBandingTotalArea" column="EdgeBandingTotalArea"/>
|
|
<result property="WireropeBeltTotalArea" column="WireropeBeltTotalArea"/>
|
|
<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="selectProdOrderInfoVo">
|
|
select poi.obj_id,
|
|
poi.order_code,
|
|
poi.sale_order_code,
|
|
poi.sale_order_line_number,
|
|
poi.material_code,
|
|
poi.material_name,
|
|
poi.matkl,
|
|
poi.bom_code,
|
|
poi.order_amount,
|
|
poi.complete_amount,
|
|
poi.order_type,
|
|
poi.order_status,
|
|
poi.finish_flag,
|
|
poi.begin_date,
|
|
poi.end_date,
|
|
poi.real_begin_date,
|
|
poi.real_end_date,
|
|
poi.factory_code,
|
|
poi.is_release,
|
|
poi.work_center_code,
|
|
poi.routing_code,
|
|
poi.print_name,
|
|
poi.is_flag,
|
|
poi.created_by,
|
|
poi.created_time,
|
|
poi.updated_by,
|
|
poi.updated_time,
|
|
pod.SeqNo,
|
|
pod.OrderDate,
|
|
pod.DeliveryDate,
|
|
pod.ProductType,
|
|
pod.ProductStatus,
|
|
pod.OrderOwner,
|
|
pod.CustomerInfo,
|
|
pod.BeltLengthSpecifications,
|
|
pod.AreaAndWeight,
|
|
pod.UsingRawMaterials,
|
|
pod.BeltWidth,
|
|
pod.BeltClothLayer,
|
|
pod.BeltRequiredLength,
|
|
pod.GluingRequiredThickness,
|
|
pod.LowerGlueRequiredThickness,
|
|
pod.ProductionGluingThickness,
|
|
pod.UpperBufferAdhesiveThickness,
|
|
pod.ProductionLowerGlueThickness,
|
|
pod.LowerBufferAdhesiveThickness,
|
|
pod.ClothGlueThickness,
|
|
pod.SmallClothFabricLayer,
|
|
pod.SmallClothThickness,
|
|
pod.IsNeedThicken,
|
|
pod.EachLayerThickenThickness,
|
|
pod.ExtraThickeningThickness,
|
|
pod.TotalProductionThickness,
|
|
pod.AdditionalThickness,
|
|
pod.RecommendedShimThickness,
|
|
pod.SemiFinishedProductWidth,
|
|
pod.RollingProductionMeters,
|
|
pod.RecommendedPadWidth,
|
|
pod.BigFabricManufacturer,
|
|
pod.FabricSpecifications,
|
|
pod.EstimatedFabricUsage,
|
|
pod.ClothWidth,
|
|
pod.ClothWeight,
|
|
pod.SmallFabricSpecificationsDic,
|
|
pod.SmallClothWidth,
|
|
pod.SmallClothUsage,
|
|
pod.SmallClothWeight,
|
|
pod.GluingProcess,
|
|
pod.UpperLowerGlue,
|
|
pod.UpperLowerGlueCoefficient,
|
|
pod.UpperLowerGlueUsage,
|
|
pod.LowerGlue,
|
|
pod.LowerGlueCoefficient,
|
|
pod.LowerGlueUsage,
|
|
pod.LargeClothGlue,
|
|
pod.LargeClothGlueCoefficient,
|
|
pod.LargeClothGlueUsage,
|
|
pod.BufferGlueUsage,
|
|
pod.MiddleGlue,
|
|
pod.MiddleGlueCoefficient,
|
|
pod.MiddleGlueUsage,
|
|
pod.SmallBarWidth,
|
|
pod.SmallBarThickness,
|
|
pod.SmallBarStandardUsage,
|
|
pod.FormingArea,
|
|
pod.RollCoatingArea,
|
|
pod.RolledFabricArea,
|
|
pod.SulfurizationArea,
|
|
pod.LargeClothArea,
|
|
pod.SmallClothArea,
|
|
pod.BeltTotalArea,
|
|
pod.SkirtArea,
|
|
pod.PartitionArea,
|
|
pod.EdgeBandingTotalArea,
|
|
pod.WireropeBeltTotalArea
|
|
from prod_order_info poi
|
|
left join prod_order_detail pod on pod.SeqNo = poi.order_code
|
|
</sql>
|
|
|
|
<select id="selectProdOrderInfoList" parameterType="ProdOrderInfo" resultMap="ProdOrderInfoResult">
|
|
<include refid="selectProdOrderInfoVo"/>
|
|
<where>
|
|
<if test="orderCode != null and orderCode != ''">and poi.order_code = #{orderCode}</if>
|
|
<if test="saleOrderCode != null and saleOrderCode != ''">and poi.sale_order_code = #{saleOrderCode}</if>
|
|
<if test="saleOrderLineNumber != null and saleOrderLineNumber != ''">and sale_order_line_number =
|
|
#{saleOrderLineNumber}
|
|
</if>
|
|
<if test="materialCode != null and materialCode != ''">and poi.material_code = #{materialCode}</if>
|
|
<if test="materialName != null and materialName != ''">and poi.material_name like concat('%', #{materialName},
|
|
'%')
|
|
</if>
|
|
<if test="matkl != null and matkl != ''">and poi.matkl = #{matkl}</if>
|
|
<if test="bomCode != null and bomCode != ''">and poi.bom_code = #{bomCode}</if>
|
|
<if test="orderAmount != null ">and poi.order_amount = #{orderAmount}</if>
|
|
<if test="completeAmount != null ">and poi.complete_amount = #{completeAmount}</if>
|
|
<if test="orderType != null and orderType != ''">and poi.order_type = #{orderType}</if>
|
|
<if test="orderStatus != null and orderStatus != ''">and poi.order_status = #{orderStatus}</if>
|
|
<if test="finishFlag != null and finishFlag != ''">and poi.finish_flag = #{finishFlag}</if>
|
|
<if test="params.beginBeginDate != null and params.beginBeginDate != '' and params.endBeginDate != null and params.endBeginDate != ''">
|
|
and poi.begin_date between #{params.beginBeginDate} and #{params.endBeginDate}
|
|
</if>
|
|
<if test="endDate != null ">and poi.end_date = #{endDate}</if>
|
|
<if test="realBeginDate != null ">and poi.real_begin_date = #{realBeginDate}</if>
|
|
<if test="realEndDate != null ">and poi.real_end_date = #{realEndDate}</if>
|
|
<if test="factoryCode != null and factoryCode != ''">and poi.factory_code = #{factoryCode}</if>
|
|
<if test="isRelease != null and isRelease != ''">and poi.is_release = #{isRelease}</if>
|
|
<if test="workCenterCode != null and workCenterCode != ''">and poi.work_center_code = #{workCenterCode}</if>
|
|
<if test="routingCode != null and routingCode != ''">and poi.routing_code = #{routingCode}</if>
|
|
<if test="printName != null and printName != ''">and poi.print_name like concat('%', #{printName}, '%')</if>
|
|
<if test="isFlag != null and isFlag != ''">and poi.is_flag = #{isFlag}</if>
|
|
<if test="createdBy != null and createdBy != ''">and poi.created_by = #{createdBy}</if>
|
|
<if test="createdTime != null ">and poi.created_time = #{createdTime}</if>
|
|
<if test="updatedBy != null and updatedBy != ''">and poi.updated_by = #{updatedBy}</if>
|
|
<if test="updatedTime != null ">and poi.updated_time = #{updatedTime}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectProdOrderInfoByObjId" parameterType="Long" resultMap="ProdOrderInfoResult">
|
|
<include refid="selectProdOrderInfoVo"/>
|
|
where poi.obj_id = #{objId}
|
|
</select>
|
|
|
|
<insert id="insertProdOrderInfo" parameterType="ProdOrderInfo" useGeneratedKeys="true" keyProperty="objId">
|
|
insert into prod_order_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="orderCode != null">order_code,</if>
|
|
<if test="saleOrderCode != null">sale_order_code,</if>
|
|
<if test="saleOrderLineNumber != null">sale_order_line_number,</if>
|
|
<if test="materialCode != null">material_code,</if>
|
|
<if test="materialName != null">material_name,</if>
|
|
<if test="matkl != null">matkl,</if>
|
|
<if test="bomCode != null">bom_code,</if>
|
|
<if test="orderAmount != null">order_amount,</if>
|
|
<if test="completeAmount != null">complete_amount,</if>
|
|
<if test="orderType != null">order_type,</if>
|
|
<if test="orderStatus != null">order_status,</if>
|
|
<if test="finishFlag != null">finish_flag,</if>
|
|
<if test="beginDate != null">begin_date,</if>
|
|
<if test="endDate != null">end_date,</if>
|
|
<if test="realBeginDate != null">real_begin_date,</if>
|
|
<if test="realEndDate != null">real_end_date,</if>
|
|
<if test="factoryCode != null">factory_code,</if>
|
|
<if test="isRelease != null">is_release,</if>
|
|
<if test="workCenterCode != null">work_center_code,</if>
|
|
<if test="routingCode != null">routing_code,</if>
|
|
<if test="printName != null">print_name,</if>
|
|
<if test="isFlag != null">is_flag,</if>
|
|
<if test="createdBy != null">created_by,</if>
|
|
<if test="createdTime != null">created_time,</if>
|
|
<if test="updatedBy != null">updated_by,</if>
|
|
<if test="updatedTime != null">updated_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="orderCode != null">#{orderCode},</if>
|
|
<if test="saleOrderCode != null">#{saleOrderCode},</if>
|
|
<if test="saleOrderLineNumber != null">#{saleOrderLineNumber},</if>
|
|
<if test="materialCode != null">#{materialCode},</if>
|
|
<if test="materialName != null">#{materialName},</if>
|
|
<if test="matkl != null">#{matkl},</if>
|
|
<if test="bomCode != null">#{bomCode},</if>
|
|
<if test="orderAmount != null">#{orderAmount},</if>
|
|
<if test="completeAmount != null">#{completeAmount},</if>
|
|
<if test="orderType != null">#{orderType},</if>
|
|
<if test="orderStatus != null">#{orderStatus},</if>
|
|
<if test="finishFlag != null">#{finishFlag},</if>
|
|
<if test="beginDate != null">#{beginDate},</if>
|
|
<if test="endDate != null">#{endDate},</if>
|
|
<if test="realBeginDate != null">#{realBeginDate},</if>
|
|
<if test="realEndDate != null">#{realEndDate},</if>
|
|
<if test="factoryCode != null">#{factoryCode},</if>
|
|
<if test="isRelease != null">#{isRelease},</if>
|
|
<if test="workCenterCode != null">#{workCenterCode},</if>
|
|
<if test="routingCode != null">#{routingCode},</if>
|
|
<if test="printName != null">#{printName},</if>
|
|
<if test="isFlag != null">#{isFlag},</if>
|
|
<if test="createdBy != null">#{createdBy},</if>
|
|
<if test="createdTime != null">#{createdTime},</if>
|
|
<if test="updatedBy != null">#{updatedBy},</if>
|
|
<if test="updatedTime != null">#{updatedTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateProdOrderInfo" parameterType="ProdOrderInfo">
|
|
update prod_order_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
|
<if test="saleOrderCode != null">sale_order_code = #{saleOrderCode},</if>
|
|
<if test="saleOrderLineNumber != null">sale_order_line_number = #{saleOrderLineNumber},</if>
|
|
<if test="materialCode != null">material_code = #{materialCode},</if>
|
|
<if test="materialName != null">material_name = #{materialName},</if>
|
|
<if test="matkl != null">matkl = #{matkl},</if>
|
|
<if test="bomCode != null">bom_code = #{bomCode},</if>
|
|
<if test="orderAmount != null">order_amount = #{orderAmount},</if>
|
|
<if test="completeAmount != null">complete_amount = #{completeAmount},</if>
|
|
<if test="orderType != null">order_type = #{orderType},</if>
|
|
<if test="orderStatus != null">order_status = #{orderStatus},</if>
|
|
<if test="finishFlag != null">finish_flag = #{finishFlag},</if>
|
|
<if test="beginDate != null">begin_date = #{beginDate},</if>
|
|
<if test="endDate != null">end_date = #{endDate},</if>
|
|
<if test="realBeginDate != null">real_begin_date = #{realBeginDate},</if>
|
|
<if test="realEndDate != null">real_end_date = #{realEndDate},</if>
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
<if test="isRelease != null">is_release = #{isRelease},</if>
|
|
<if test="workCenterCode != null">work_center_code = #{workCenterCode},</if>
|
|
<if test="routingCode != null">routing_code = #{routingCode},</if>
|
|
<if test="printName != null">print_name = #{printName},</if>
|
|
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
|
<if test="createdBy != null">created_by = #{createdBy},</if>
|
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
</trim>
|
|
where obj_id = #{objId}
|
|
</update>
|
|
|
|
<delete id="deleteProdOrderInfoByObjId" parameterType="Long">
|
|
delete
|
|
from prod_order_info
|
|
where obj_id = #{objId}
|
|
</delete>
|
|
|
|
<delete id="deleteProdOrderInfoByObjIds" parameterType="String">
|
|
delete from prod_order_info where obj_id in
|
|
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
|
#{objId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |