liu
10 天以前 dd1a51612fcd3c839d31dfa0df83b3d3071c8145
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.ruoyi.unattended.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.unattended.pojo.UnattendedOperation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
import java.util.Map;
 
@Mapper
public interface UnattendedOperationMapper extends BaseMapper<UnattendedOperation> {
 
    /** 按承运商匹配销售订单 */
    @Select("<script>" +
            "select sales_contract_no as order_no, 'sales' as order_type " +
            "from sales_ledger where customer_name = #{carrierName} " +
            "order by id desc limit 1" +
            "</script>")
    List<Map<String, Object>> matchSalesOrder(@Param("carrierName") String carrierName);
 
    /** 按承运商匹配采购订单 */
    @Select("<script>" +
            "select purchase_contract_number as order_no, 'purchase' as order_type " +
            "from purchase_ledger where supplier_name = #{carrierName} " +
            "order by id desc limit 1" +
            "</script>")
    List<Map<String, Object>> matchPurchaseOrder(@Param("carrierName") String carrierName);
}