|
|
|
@ -32,80 +32,225 @@
|
|
|
|
|
<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 obj_id,
|
|
|
|
|
order_code,
|
|
|
|
|
sale_order_code,
|
|
|
|
|
sale_order_line_number,
|
|
|
|
|
material_code,
|
|
|
|
|
material_name,
|
|
|
|
|
matkl,
|
|
|
|
|
bom_code,
|
|
|
|
|
order_amount,
|
|
|
|
|
complete_amount,
|
|
|
|
|
order_type,
|
|
|
|
|
order_status,
|
|
|
|
|
finish_flag,
|
|
|
|
|
begin_date,
|
|
|
|
|
end_date,
|
|
|
|
|
real_begin_date,
|
|
|
|
|
real_end_date,
|
|
|
|
|
factory_code,
|
|
|
|
|
is_release,
|
|
|
|
|
work_center_code,
|
|
|
|
|
routing_code,
|
|
|
|
|
print_name,
|
|
|
|
|
is_flag,
|
|
|
|
|
created_by,
|
|
|
|
|
created_time,
|
|
|
|
|
updated_by,
|
|
|
|
|
updated_time
|
|
|
|
|
from prod_order_info
|
|
|
|
|
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 order_code = #{orderCode}</if>
|
|
|
|
|
<if test="saleOrderCode != null and saleOrderCode != ''">and sale_order_code = #{saleOrderCode}</if>
|
|
|
|
|
<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 material_code = #{materialCode}</if>
|
|
|
|
|
<if test="materialName != null and materialName != ''">and material_name like concat('%', #{materialName},
|
|
|
|
|
<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 matkl = #{matkl}</if>
|
|
|
|
|
<if test="bomCode != null and bomCode != ''">and bom_code = #{bomCode}</if>
|
|
|
|
|
<if test="orderAmount != null ">and order_amount = #{orderAmount}</if>
|
|
|
|
|
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
|
|
|
|
|
<if test="orderType != null and orderType != ''">and order_type = #{orderType}</if>
|
|
|
|
|
<if test="orderStatus != null and orderStatus != ''">and order_status = #{orderStatus}</if>
|
|
|
|
|
<if test="finishFlag != null and finishFlag != ''">and finish_flag = #{finishFlag}</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 begin_date between #{params.beginBeginDate} and #{params.endBeginDate}
|
|
|
|
|
and poi.begin_date between #{params.beginBeginDate} and #{params.endBeginDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null ">and end_date = #{endDate}</if>
|
|
|
|
|
<if test="realBeginDate != null ">and real_begin_date = #{realBeginDate}</if>
|
|
|
|
|
<if test="realEndDate != null ">and real_end_date = #{realEndDate}</if>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''">and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="isRelease != null and isRelease != ''">and is_release = #{isRelease}</if>
|
|
|
|
|
<if test="workCenterCode != null and workCenterCode != ''">and work_center_code = #{workCenterCode}</if>
|
|
|
|
|
<if test="routingCode != null and routingCode != ''">and routing_code = #{routingCode}</if>
|
|
|
|
|
<if test="printName != null and printName != ''">and print_name like concat('%', #{printName}, '%')</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
|
|
|
|
<if test="createdTime != null ">and created_time = #{createdTime}</if>
|
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
|
|
|
|
<if test="updatedTime != null ">and updated_time = #{updatedTime}</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 obj_id = #{objId}
|
|
|
|
|
where poi.obj_id = #{objId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertProdOrderInfo" parameterType="ProdOrderInfo" useGeneratedKeys="true" keyProperty="objId">
|
|
|
|
|