Administrator
2022-12-12 5aa407dd55a0a8f37774308743bb0a593bd8da3c
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
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.mandi.fendan.mapper;
 
import java.util.List;
import java.util.Map;
 
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
 
import com.mandi.fendan.persist.Fd_Vehicle;
 
 
public interface Fd_VehicleMapper{
    @Select("select a.* from fd_vehicle a where a.id=#{id}")
    public Fd_Vehicle get(String id);
    @Delete("delete from fd_vehicle  where id=#{id}")
    public int del(String id);
    @Update("update fd_vehicle set companyNo=#{companyNo},driver=#{driver},loadweight=#{loadweight},note=#{note},phone=#{phone},state=#{state},vehicleId=#{vehicleId},vehicleweight=#{vehicleweight},type=#{type},status=#{status},feature=#{feature},IDNum=#{IDNum} where id=#{id}")
    public int update(Fd_Vehicle fd_vehicle);
    @Insert("insert into fd_vehicle(id,companyNo,driver,loadweight,note,phone,state,"
            + "vehicleId,vehicleweight,type,status,feature,IDNum) "
            + "values (#{id},#{companyNo},#{driver},#{loadweight},#{note},#{phone},#{state},upper(#{vehicleId}),"
            + "#{vehicleweight},#{type},#{status},#{feature},#{IDNum})")
    public int insert(Fd_Vehicle fd_vehicle);
    @Select("select a.* from fd_vehicle a where a.vehicleId=#{vehicleId}")
    public Fd_Vehicle getByVehicleId(String vehicleId);
    @Select("select top 1 a.* from fd_vehicle a where a.companyNo=#{companyNo} ")
    public Fd_Vehicle selectbyCompanyNo(String companyNo);
    @Delete("delete from fd_vehicle where vehicleId=#{vehicleId}")
    public int delByVehicleId(String vehicleId);
    
    public List<Map<String, Object>> getList1(Map<String, Object> mp);
    public List<Map<String, Object>> getList2(Map<String, Object> mp);
    public int getPages(Map<String, Object> mp);
    
    /**
     * 公司添加的车辆
     * @param mp
     * @return
     */
    public List<Map<String, Object>> getCompanyVehicle(Map<String, Object> mp);
}