<iftest="id != null and id != ''"> and roi.id = #{id}</if>
<iftest="orderId != null and orderId != ''"> and roi.order_id like concat('%', #{orderId}, '%')</if>
<iftest="materialId != null and materialId != ''"> and (roi.material_id like concat('%', #{materialId}, '%') or m.material_code like concat('%', #{materialId}, '%'))</if>
...
...
@@ -83,19 +84,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<iftest="ownerId != null and ownerId != ''"> and ro.owner_id = #{ownerId}</if>
<iftest="startDate != null and startDate != ''"> and date_format(ro.return_date,'%Y-%m-%d') >= #{startDate}</if>
<iftest="endDate != null and endDate != ''"> and date_format(ro.return_date,'%Y-%m-%d') <= #{endDate}</if>
<iftest="plannedQuantity != null "> and roi.planned_quantity = #{plannedQuantity}</if>
<iftest="actualQuantity != null "> and roi.actual_quantity = #{actualQuantity}</if>
<iftest="plannedPackages != null "> and roi.planned_packages = #{plannedPackages}</if>
<iftest="actualPackages != null "> and roi.actual_packages = #{actualPackages}</if>
<iftest="divisor != null "> and roi.divisor = #{divisor}</if>
<iftest="labelColor != null "> and roi.label_color = #{labelColor}</if>
<iftest="voucherNumber != null and voucherNumber != ''"> and roi.voucher_number = #{voucherNumber}</if>
<iftest="unitPrice != null "> and roi.unit_price = #{unitPrice}</if>
<iftest="totalAmount != null "> and roi.total_amount = #{totalAmount}</if>
<iftest="isUsed != null "> and roi.is_used = #{isUsed}</if>
<iftest="sortNo != null "> and roi.sort_no = #{sortNo}</if>
<iftest="createUserCode != null and createUserCode != ''"> and roi.create_user_code = #{createUserCode}</if>
<iftest="updateUserCode != null and updateUserCode != ''"> and roi.update_user_code = #{updateUserCode}</if>
<iftest="orderStatus != null and orderStatus != ''"> and ro.order_status = #{orderStatus}</if>
<!-- <if test="plannedQuantity != null "> and roi.planned_quantity = #{plannedQuantity}</if>-->
<!-- <if test="actualQuantity != null "> and roi.actual_quantity = #{actualQuantity}</if>-->
<!-- <if test="plannedPackages != null "> and roi.planned_packages = #{plannedPackages}</if>-->
<!-- <if test="actualPackages != null "> and roi.actual_packages = #{actualPackages}</if>-->
<!-- <if test="divisor != null "> and roi.divisor = #{divisor}</if>-->
<!-- <if test="labelColor != null "> and roi.label_color = #{labelColor}</if>-->
<!-- <if test="voucherNumber != null and voucherNumber != ''"> and roi.voucher_number = #{voucherNumber}</if>-->
<!-- <if test="unitPrice != null "> and roi.unit_price = #{unitPrice}</if>-->
<!-- <if test="totalAmount != null "> and roi.total_amount = #{totalAmount}</if>-->
<!-- <if test="isUsed != null "> and roi.is_used = #{isUsed}</if>-->
<!-- <if test="sortNo != null "> and roi.sort_no = #{sortNo}</if>-->
<!-- <if test="createUserCode != null and createUserCode != ''"> and roi.create_user_code = #{createUserCode}</if>-->
<!-- <if test="updateUserCode != null and updateUserCode != ''"> and roi.update_user_code = #{updateUserCode}</if>-->
</where>
order by ro.return_date desc, roi.sort_no, roi.create_time
</select>
...
...
@@ -199,5 +201,74 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"