@ -6,50 +6,155 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -6,50 +6,155 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type= "DhcOrderLedger" id= "DhcOrderLedgerResult" >
<id property= "id" column= "id" />
<result property= "lhzNo" column= "lhz_no" />
<result property= "lhzNo" column= "lhz_no" />
<result property= "rollPlanNumber" column= "roll_plan_number" />
<result property= "productModel" column= "product_model" />
<result property= "orderQty" column= "order_qty" />
<result property= "noProductNum" column= "no_product_num" />
<result property= "productNum" column= "product_num" />
<result property= "customerName" column= "customer_name" />
<result property= "orderStatusCode" column= "order_status_code" />
<result property= "orderStatusName" column= "order_status_name" />
<result property= "salesAreaCode" column= "sales_area_code" />
<result property= "salesAreaName" column= "sales_area_name" />
<result property= "countryCode" column= "country_code" />
<result property= "countryName" column= "country_name" />
<result property= "customerName" column= "customer_name" />
<result property= "realCustomer" column= "real_customer" />
<result property= "brandCode" column= "brand_code" />
<result property= "brandName" column= "brand_name" />
<!-- 其他字段映射 -->
<result property= "shipPortName" column= "ship_port_name" />
<result property= "tradeTerms" column= "trade_terms" />
<result property= "fobUnitPrice" column= "fob_unit_price" />
<result property= "fobPrice" column= "fob_price" />
<result property= "cifUnitPrice" column= "cif_unit_price" />
<result property= "cifPrice" column= "cif_price" />
<result property= "movePrice" column= "move_price" />
<result property= "premium" column= "premium" />
<result property= "cgUnitPrice" column= "cg_unit_price" />
<result property= "cgPrice" column= "cg_price" />
<result property= "poPrice" column= "po_price" />
<result property= "exwUnitPrice" column= "exw_unit_price" />
<result property= "actualInvoicedAmount" column= "actual_invoiced_amount" />
<result property= "hongKongInvoicePrice" column= "hong_kong_invoice_price" />
<result property= "hongKongPrice" column= "hong_kong_price" />
<result property= "productSize" column= "product_size" />
<result property= "completemachCode" column= "completemach_code" />
<result property= "newMaterialCode" column= "new_material_code" />
<result property= "contractNo" column= "contract_no" />
<result property= "customerModel" column= "customer_model" />
<result property= "screenCode" column= "screen_code" />
<result property= "productionBaseName" column= "production_base_name" />
<result property= "packWayName" column= "pack_way_name" />
<result property= "orderType" column= "order_type" />
<result property= "destnPortName" column= "destn_port_name" />
<result property= "airLine" column= "air_line" />
<result property= "shipCompany" column= "ship_company" />
<result property= "soNo" column= "so_no" />
<result property= "ordplanDate" column= "ordplan_date" />
<result property= "formalPlanDeliveryDate" column= "formal_plan_delivery_date" />
<result property= "formalPlanQty" column= "formal_plan_qty" />
<result property= "currentInventory" column= "current_inventory" />
<result property= "deliveryDateDiff" column= "delivery_date_diff" />
<result property= "qtyDiff" column= "qty_diff" />
<result property= "planEtd" column= "plan_etd" />
<result property= "planEta" column= "plan_eta" />
<result property= "planEtdWeekday" column= "plan_etd_weekday" />
<result property= "lhzEtd" column= "lhz_etd" />
<result property= "dcEtd" column= "dc_etd" />
<result property= "etdActualTime" column= "etd_actual_time" />
<result property= "etaActualTime" column= "eta_actual_time" />
<result property= "etaDifference" column= "eta_difference" />
<result property= "specialRemark" column= "special_remark" />
<result property= "atd" column= "atd" />
<result property= "ata" column= "ata" />
<result property= "ztdDate" column= "ztd_date" />
<result property= "isInspection" column= "is_inspection" />
<result property= "salesAssistantName" column= "sales_assistant_name" />
<result property= "logisticsPersonnel" column= "logistics_personnel" />
<result property= "lhzStatusName" column= "lhz_status_name" />
<result property= "orderEntryMonth" column= "order_entry_month" />
<result property= "serviceType" column= "service_type" />
<result property= "productLineType" column= "product_line_type" />
<result property= "rkQty" column= "rk_qty" />
<result property= "productBigCategory" column= "product_big_category" />
<result property= "zeroRollPlanNumber" column= "zero_roll_plan_number" />
<result property= "boxType" column= "box_type" />
<result property= "manuRemark" column= "manu_remark" />
<result property= "overseasFactory" column= "overseas_factory" />
<result property= "inProduction" column= "in_production" />
<result property= "inStock" column= "in_stock" />
<result property= "loadedInContainer" column= "loaded_in_container" />
<result property= "hasShipped" column= "has_shipped" />
<result property= "deliveryStatus" column= "delivery_status" />
<result property= "customsDeclarationNumber" column= "customs_declaration_number" />
<result property= "customsDeclarationReason" column= "customs_declaration_reason" />
<result property= "planDeliveryDate" column= "plan_delivery_date" />
<result property= "planDeliveryWeekday" column= "plan_delivery_weekday" />
<result property= "noProductNum" column= "no_product_num" />
<result property= "productNum" column= "product_num" />
<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= "remark" column= "remark" />
</resultMap>
<sql id= "selectDhcOrderLedgerVo" >
select id, lhz_no, roll_plan_number, product_model, order_qty, no_product_num, product_num,
sales_area_code, sales_area_name, country_code, country_name, customer_name, real_customer,
brand_code, brand_name, create_by, create_time, update_by, update_time, remark
select id, lhz_no, roll_plan_number, product_model, order_qty, customer_name,
order_status_code, order_status_name, sales_area_code, sales_area_name,
country_code, country_name, real_customer, brand_code, brand_name,
ship_port_name, trade_terms, fob_unit_price, fob_price, cif_unit_price,
cif_price, move_price, premium, cg_unit_price, cg_price, po_price,
exw_unit_price, actual_invoiced_amount, hong_kong_invoice_price, hong_kong_price,
product_size, completemach_code, new_material_code, contract_no, customer_model,
screen_code, production_base_name, pack_way_name, order_type, destn_port_name,
air_line, ship_company, so_no, ordplan_date, formal_plan_delivery_date,
formal_plan_qty, current_inventory, delivery_date_diff, qty_diff, plan_etd,
plan_eta, plan_etd_weekday, lhz_etd, dc_etd, etd_actual_time, eta_actual_time,
eta_difference, special_remark, atd, ata, ztd_date, is_inspection,
sales_assistant_name, logistics_personnel, lhz_status_name, order_entry_month,
service_type, product_line_type, rk_qty, product_big_category,
zero_roll_plan_number, box_type, manu_remark, overseas_factory,
in_production, in_stock, loaded_in_container, has_shipped, delivery_status,
customs_declaration_number, customs_declaration_reason,
plan_delivery_date, plan_delivery_weekday, no_product_num, product_num,
create_by, create_time, update_by, update_time
from dhc_order_ledger
</sql>
<select id= "selectDhcOrderLedgerList" parameterType= "DhcOrderLedger" resultMap= "DhcOrderLedgerResult" >
<include refid= "selectDhcOrderLedgerVo" />
<where >
<if test= "lhzNo != null and lhzNo != ''" > and lhz_no = #{lhzNo}</if>
<if test= "rollPlanNumber != null and rollPlanNumber != ''" > and roll_plan_number = #{rollPlanNumber}</if>
<if test= "productModel != null and productModel != ''" > and product_model = #{productModel}</if>
<if test= "customerName != null and customerName != ''" > and customer_name like concat('%', #{customerName}, '%')</if>
<if test= "orderStatusCode != null and orderStatusCode != ''" > and order_status_code = #{orderStatusCode}</if>
<if test= "planDeliveryDate != null " > and plan_delivery_date = #{planDeliveryDate}</if>
<if test= "lhzNo != null and lhzNo != ''" >
AND lhz_no like concat('%', #{lhzNo}, '%')
</if>
<if test= "rollPlanNumber != null and rollPlanNumber != ''" >
AND roll_plan_number = #{rollPlanNumber}
</if>
<if test= "customerName != null and customerName != ''" >
AND customer_name like concat('%', #{customerName}, '%')
</if>
<if test= "orderStatusCode != null and orderStatusCode != ''" >
AND order_status_code = #{orderStatusCode}
</if>
<if test= "salesAreaCode != null and salesAreaCode != ''" >
AND sales_area_code = #{salesAreaCode}
</if>
<if test= "countryCode != null and countryCode != ''" >
AND country_code = #{countryCode}
</if>
<if test= "brandCode != null and brandCode != ''" >
AND brand_code = #{brandCode}
</if>
<if test= "planDeliveryDate != null" >
AND plan_delivery_date = #{planDeliveryDate}
</if>
</where>
</select>
<select id= "selectDhcOrderLedgerById" parameterType= "Long" resultMap= "DhcOrderLedgerResult" >
<select id= "selectDhcOrderLedgerByIds " parameterType= "Long[] " resultMap= "DhcOrderLedgerResult" >
<include refid= "selectDhcOrderLedgerVo" />
where id = #{id}
where id in
<foreach item= "id" collection= "array" open= "(" separator= "," close= ")" >
#{id}
</foreach>
</select>
<insert id= "insertDhcOrderLedger" parameterType= "DhcOrderLedger" useGeneratedKeys= "true" keyProperty= "id" >
@ -59,19 +164,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -59,19 +164,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "rollPlanNumber != null" > roll_plan_number,</if>
<if test= "productModel != null" > product_model,</if>
<if test= "orderQty != null" > order_qty,</if>
<if test= "customerName != null" > customer_name,</if>
<if test= "orderStatusCode != null" > order_status_code,</if>
<if test= "orderStatusName != null" > order_status_name,</if>
<if test= "salesAreaCode != null" > sales_area_code,</if>
<if test= "salesAreaName != null" > sales_area_name,</if>
<if test= "countryCode != null" > country_code,</if>
<if test= "countryName != null" > country_name,</if>
<if test= "realCustomer != null" > real_customer,</if>
<if test= "brandCode != null" > brand_code,</if>
<if test= "brandName != null" > brand_name,</if>
<if test= "planDeliveryDate != null" > plan_delivery_date,</if>
<if test= "planDeliveryWeekday != null" > plan_delivery_weekday,</if>
<if test= "noProductNum != null" > no_product_num,</if>
<if test= "productNum != null" > product_num,</if>
<if test= "createBy != null" > create_by,</if>
<if test= "createTime != null" > create_time,</if>
<if test= "remark != null" > remark,</if>
</trim>
<if test= "updateBy != null" > update_by,</if>
<if test= "updateTime != null" > update_time,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "lhzNo != null" > #{lhzNo},</if>
<if test= "rollPlanNumber != null" > #{rollPlanNumber},</if>
<if test= "productModel != null" > #{productModel},</if>
<if test= "orderQty != null" > #{orderQty},</if>
<if test= "customerName != null" > #{customerName},</if>
<if test= "orderStatusCode != null" > #{orderStatusCode},</if>
<if test= "orderStatusName != null" > #{orderStatusName},</if>
<if test= "salesAreaCode != null" > #{salesAreaCode},</if>
<if test= "salesAreaName != null" > #{salesAreaName},</if>
<if test= "countryCode != null" > #{countryCode},</if>
<if test= "countryName != null" > #{countryName},</if>
<if test= "realCustomer != null" > #{realCustomer},</if>
<if test= "brandCode != null" > #{brandCode},</if>
<if test= "brandName != null" > #{brandName},</if>
<if test= "planDeliveryDate != null" > #{planDeliveryDate},</if>
<if test= "planDeliveryWeekday != null" > #{planDeliveryWeekday},</if>
<if test= "noProductNum != null" > #{noProductNum},</if>
<if test= "productNum != null" > #{productNum},</if>
<if test= "createBy != null" > #{createBy},</if>
<if test= "createTime != null" > #{createTime},</if>
<if test= "remark != null" > #{remark},</if>
</trim>
<if test= "updateBy != null" > #{updateBy},</if>
<if test= "updateTime != null" > #{updateTime},</if>
</trim>
</insert>
<update id= "updateDhcOrderLedger" parameterType= "DhcOrderLedger" >
@ -81,9 +216,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
@@ -81,9 +216,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "rollPlanNumber != null" > roll_plan_number = #{rollPlanNumber},</if>
<if test= "productModel != null" > product_model = #{productModel},</if>
<if test= "orderQty != null" > order_qty = #{orderQty},</if>
<if test= "customerName != null" > customer_name = #{customerName},</if>
<if test= "orderStatusCode != null" > order_status_code = #{orderStatusCode},</if>
<if test= "orderStatusName != null" > order_status_name = #{orderStatusName},</if>
<if test= "salesAreaCode != null" > sales_area_code = #{salesAreaCode},</if>
<if test= "salesAreaName != null" > sales_area_name = #{salesAreaName},</if>
<if test= "countryCode != null" > country_code = #{countryCode},</if>
<if test= "countryName != null" > country_name = #{countryName},</if>
<if test= "realCustomer != null" > real_customer = #{realCustomer},</if>
<if test= "brandCode != null" > brand_code = #{brandCode},</if>
<if test= "brandName != null" > brand_name = #{brandName},</if>
<if test= "planDeliveryDate != null" > plan_delivery_date = #{planDeliveryDate},</if>
<if test= "planDeliveryWeekday != null" > plan_delivery_weekday = #{planDeliveryWeekday},</if>
<if test= "noProductNum != null" > no_product_num = #{noProductNum},</if>
<if test= "productNum != null" > product_num = #{productNum},</if>
<if test= "updateBy != null" > update_by = #{updateBy},</if>
<if test= "updateTime != null" > update_time = #{updateTime},</if>
<if test= "remark != null" > remark = #{remark},</if>
</trim>
where id = #{id}
</update>