hjg
2023-11-22 975c04c0181b3da82a79cb04abe6a2f1799eb363
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
package com.mandi.fendan.mapper;
 
import java.util.List;
 
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
 
import com.mandi.fendan.persist.Fd_Company_Vehicle;
 
public interface Fd_ComVehicleMapper {
    
    @Select("select * from fd_company_vehicle where companyNo=#{companyNo} and vehicleId=#{vehicleId} and sdepartNo=#{sdepartNo} ")
    public Fd_Company_Vehicle getbyIDs(@Param("vehicleId") String vehicleId,@Param("companyNo")String companyNo,@Param("sdepartNo")String sdepartNo);
    
    @Insert("insert into fd_company_vehicle (companyNo,vehicleId,sdepartNo) values (#{companyNo},#{vehicleId},#{sdepartNo}) ")
    public int insertIDs(Fd_Company_Vehicle fdcv);
    
    @Delete("delete from fd_company_vehicle where companyNo=#{companyNo} and vehicleId=#{vehicleId} and sdepartNo=#{sdepartNo}  ")
    public int del(@Param("vehicleId")String vehicleId,@Param("companyNo")String companyNo,@Param("sdepartNo")String sdepartNo);
    @Delete("delete from fd_company_vehicle where vehicleId=#{vehicleId} and sdepartNo=#{sdepartNo} ")
    public int delbyID(@Param("vehicleId")String vehicleId,@Param("sdepartNo")String sdepartNo);
    @Delete("delete from fd_company_vehicle where companyNo!=#{companyNo} and vehicleId=#{vehicleId} and sdepartNo=#{sdepartNo} ")
    public int delIDandNoC(@Param("vehicleId")String vehicleId,@Param("companyNo")String companyNo,@Param("sdepartNo")String sdepartNo);
    
//    @Update("update fd_company_vehicle set vehicleId=#{nvehicleId} where vehicleId=#{ovehicleId}")
//    public int changeVehicle(@Param("nvehicleId")String nvehicleId,@Param("ovehicleId")String ovehicleId);
    
//    @Select("select * from fd_company_vehicle where vehicleId=#{vehicleId} ")
//    public List<Fd_Company_Vehicle> getbyVID(@Param("vehicleId") String vehicleId);
    
//    @Select("select a.vehicleId from fd_company_vehicle a LEFT JOIN fd_vehicle_xstd b on a.vehicleId=b.vehicleId where a.companyNo=#{companyNo} and b.xstdNo=#{xstdNo} GROUP BY a.vehicleId ")
//    public List<String> getbyVCNO(@Param("companyNo") String companyNo,@Param("xstdNo") String xstdNo);
    
    
}