wujianwei
2025-07-29 5269c06d291f9f18d082983f63c4afb193a6bd80
service/src/main/resources/mapper/cwgl/DispatchOrderMapper.xml
@@ -77,9 +77,9 @@
        <if test="assistantDriverName != null  and assistantDriverName != ''"> and  driver_a.NAME like concat('%', #{assistantDriverName}, '%')</if>
        <if test="pointNum != null "> and ts.POINT_NUM = #{pointNum}</if>
        <if test="quantity != null "> and ts.QUANTITY = #{quantity}</if>
        <if test="actualDepartureTime != null "> and ts.ACTUAL_DEPARTURE_TIME = #{actualDepartureTime}</if>
        <if test="requiredArrivalTime != null "> and ts.REQUIRED_ARRIVAL_TIME = #{requiredArrivalTime}</if>
        <if test="actualArrivalTime != null "> and ts.ACTUAL_ARRIVAL_TIME = #{actualArrivalTime}</if>
        <if test="actualDepartureTimeBegin != null and actualDepartureTimeBegin!='' and actualDepartureTimeEnd != null and actualDepartureTimeEnd!='' "> and ts.ACTUAL_DEPARTURE_TIME between #{actualDepartureTimeBegin} and #{actualDepartureTimeEnd}</if>
        <if test="requiredArrivalTimeBegin != null and requiredArrivalTimeBegin!='' and requiredArrivalTimeEnd != null and requiredArrivalTimeEnd!='' "> and ts.REQUIRED_ARRIVAL_TIME between #{requiredArrivalTimeEnd} and #{requiredArrivalTimeEnd}</if>
        <if test="actualArrivalTimeBegin != null and actualArrivalTimeBegin!='' and actualArrivalTimeEnd != null and actualArrivalTimeEnd!='' "> and ts.ACTUAL_ARRIVAL_TIME between #{actualArrivalTimeEnd} and #{actualArrivalTimeEnd}</if>
        <if test="beReturn != null  and beReturn != ''"> and ts.BE_RETURN = #{beReturn}</if>
        <if test="dispatchQuantity != null "> and ts.DISPATCH_QUANTITY = #{dispatchQuantity}</if>
        <if test="dispatchWeight != null "> and ts.DISPATCH_WEIGHT = #{dispatchWeight}</if>
@@ -256,6 +256,34 @@
   bfd.ENTITY_ID = #{no}
    </select>
    <select id="selectDispatchOrderAttachment" resultType="com.ruoyi.cwgl.domain.vo.DispatchOrderAttachmentVo">
SELECT
--    image.PATH,
   CONCAT('https://tms.ygalogisticspark.com/ImageViewServlet?id=',image.id) as imageUrl,
   -- tof.FEE_TYPE_ID '费用类型ID',
   bfi.FEE_TYPE as feeItem,
   tof.account as account,
   case tof.CURRENCY_ID
      when 1 then '港币'
      when 2 then '人民币'
      else '未知'
   end as currency
FROM
-- 其他费用表
   Tms_Other_Fee tof
-- 调度单表
   LEFT JOIN tms_shipment ts ON tof.dispatch_Order_Id = ts.id
-- 附件表
   LEFT JOIN Thorn_Attachment image ON image.OBJ_ID = tof.id
-- 费用类型表
   left join base_fee_item bfi on bfi.id=tof.FEE_TYPE_ID
WHERE
   ts.DISPATCH_NO =  #{no}
   AND image.biz_Type = 'com.vtradex.tms.core.model.entity.fee.TmsOtherFee'
    </select>
    <!-- 新增 -->
    <insert id="insertDispatchOrder" parameterType="com.ruoyi.cwgl.domain.DispatchOrder"  useGeneratedKeys="true" keyProperty="id">