|
|
@@ -97,4 +97,69 @@
|
|
|
order by t2.arrival_time desc
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="selectBulkLoadList" resultType="org.springblade.land.vo.OrderAcctVO">
|
|
|
+ select t1.id as orderId,
|
|
|
+ t1.corp_id as corpId,
|
|
|
+ t3.cname as corpName,
|
|
|
+ t3.short_name as corpShortName,
|
|
|
+ t1.salesman,
|
|
|
+ t5.name as salesmanName,
|
|
|
+ t1.salesman_dept as salesmanDept,
|
|
|
+ t1.create_user as createUser,
|
|
|
+ t1.dispatcher,
|
|
|
+ t7.name as dispatcherName,
|
|
|
+ t1.dispatch_dept as dispatchDept,
|
|
|
+ t6.dept_name as dispatchDeptName,
|
|
|
+ t1.arrival_time as arrivalTime,
|
|
|
+ t1.address_detail as addressDetail,
|
|
|
+ t1.receipt_no as receiptNo,
|
|
|
+ t1.bill_no as billNo,
|
|
|
+ t1.station,
|
|
|
+ t1.fleet_id as fleetId,
|
|
|
+ t4.cname as fleetName,
|
|
|
+ t4.short_name as fleetShortName,
|
|
|
+ t1.plate_no,
|
|
|
+ t1.status,
|
|
|
+ t1.remarks
|
|
|
+ from land_order t1
|
|
|
+ left join basic_corps_desc t3 on t1.corp_id = t3.id
|
|
|
+ left join basic_corps_desc t4 on t1.fleet_id = t4.id
|
|
|
+ left join blade_user t5 on t1.salesman = t5.id
|
|
|
+ left join blade_dept t6 on t1.dispatch_dept = t6.id
|
|
|
+ left join blade_user t7 on t1.dispatcher = t7.id
|
|
|
+ <where>
|
|
|
+ t1.tenant_id = #{acct.tenantId}
|
|
|
+ and t1.is_deleted = 0
|
|
|
+ <if test="acct.corpName != null and acct.corpName != ''">and t3.cname like concat('%', #{acct.corpName}, '%')</if>
|
|
|
+ <if test="acct.salesmanName != null and acct.salesmanName != ''">and t5.name like concat('%', #{acct.salesmanName}, '%')</if>
|
|
|
+ <if test="acct.corpShortName != null and acct.corpShortName != ''">and t3.short_name like concat('%', #{acct.corpShortName}, '%')</if>
|
|
|
+
|
|
|
+ <if test="acct.fleetId != null">and t1.fleet_id = #{acct.fleetId}</if>
|
|
|
+ <if test="acct.fleetShortName != null and acct.fleetShortName != ''">and t4.short_name like concat('%', #{acct.fleetShortName}, '%')</if>
|
|
|
+ <if test="acct.addressDetail != null and acct.addressDetail != ''">and t1.address_detail like concat('%', #{acct.addressDetail}, '%')</if>
|
|
|
+ <if test="acct.receiptNo != null and acct.receiptNo != ''">and t1.receipt_no like concat('%', #{acct.receiptNo}, '%')</if>
|
|
|
+ <if test="acct.billNo != null and acct.billNo != ''">and t1.bill_no like concat('%', #{acct.billNo}, '%')</if>
|
|
|
+ <if test="acct.plateNo != null and acct.plateNo != ''">and t1.plate_no like concat('%', #{acct.plateNo}, '%')</if>
|
|
|
+
|
|
|
+ <if test="acct.beginArrivalTime != null and acct.beginArrivalTime != ''">and t1.arrival_time >= #{acct.beginArrivalTime}</if>
|
|
|
+ <if test="acct.endArrivalTime != null and acct.endArrivalTime != ''">and t1.arrival_time <= #{acct.endArrivalTime}</if>
|
|
|
+
|
|
|
+ <if test="acct.salesman != null">and t1.salesman = #{acct.salesman}</if>
|
|
|
+ <if test="acct.dispatcher != null">and t1.dispatcher = #{acct.dispatcher}</if>
|
|
|
+ <if test="acct.dispatchDept != null">and t1.dispatchDept = #{acct.dispatchDept}</if>
|
|
|
+ <if test="acct.salesmanDeptList != null">and t1.salesman_dept in
|
|
|
+ <foreach item="dept" collection="acct.salesmanDeptList" open="(" separator="," close=")">
|
|
|
+ #{dept}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="acct.shippingMode != null and acct.shippingMode != ''">and t1.shipping_mode = #{acct.shippingMode}</if>
|
|
|
+ <if test="acct.status == 1">and t1.status in (0, 1)</if>
|
|
|
+ <if test="acct.status == 2">and t1.status not in (0, 1, 5)</if>
|
|
|
+ <if test="acct.status == 3">and t1.status = 5</if>
|
|
|
+ </where>
|
|
|
+ group by t1.id, t1.plate_no, t1.arrival_time
|
|
|
+ order by t1.arrival_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|