hjg
2023-11-22 975c04c0181b3da82a79cb04abe6a2f1799eb363
提交 | 用户 | 时间
58d006 1 package com.mandi.fendan.mapper;
A 2
3 import java.util.List;
4
5 import org.apache.ibatis.annotations.Delete;
6 import org.apache.ibatis.annotations.Insert;
7 import org.apache.ibatis.annotations.Param;
8 import org.apache.ibatis.annotations.Select;
9 import org.apache.ibatis.annotations.Update;
10
11 import com.mandi.fendan.persist.Fd_Company;
12 import com.mandi.fendan.persist.Vehicle_XSTD;
13
14 public interface VehicleXSTDMapper {
15     
16     @Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
17     public Vehicle_XSTD getbyIDs(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo,@Param("companyNo") String companyNo);
18     
19     @Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} ")
20     public List<Vehicle_XSTD> getbyIDsnocomNo(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo);
21     
22     @Delete("delete from fd_vehicle_xstd where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
23     public int delbyIDs(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo,@Param("companyNo") String companyNo);
24     
25     @Delete("delete from fd_vehicle_xstd where xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
26     public int delbyIDandcomNo(@Param("xstdNo") String xstdNo,@Param("companyNo") String companyNo);
27     
28     @Delete("delete from fd_vehicle_xstd where vehicleId=#{vehicleId} and bsNo=#{bsNo}")
29     public int delbyVehicleId(@Param("vehicleId") String vehicleId,@Param("bsNo") String bsNo);
30     
31 //    @Delete("delete from fd_vehicle_xstd where vehicleId=#{vehicleId} ")
32 //    public int delbyVehicleID(@Param("vehicleId") String vehicleId);
33     
34     @Insert("insert into fd_vehicle_xstd (vehicleId,xstdNo,fd_num,fd_weight,bsNo,companyNo) "
35             + "values (upper(#{vehicleId}),#{xstdNo},#{fd_num},#{fd_weight},#{bsNo},#{companyNo}) ")
36     public int insert(Vehicle_XSTD vxs);
37     @Update("update fd_vehicle_xstd set fd_num=#{fd_num},fd_weight=#{fd_weight},bsNo=#{bsNo}"
38             + " where vehicleId=#{vehicleId} and xstdNo=#{xstdNo}  and companyNo=#{companyNo} ")
39     public int updatewithIDs(Vehicle_XSTD vxs);
40 //    @Update("update fd_vehicle_xstd set vehicleId=#{nvehicleId} where vehicleId=#{vehicleId}")
41 //    public int changeVehicle(@Param("vehicleId")String vehicleId,@Param("nvehicleId")String nvehicleId);
42     
43     @Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} ")
44     public List<Vehicle_XSTD> getlistbyVehicleId(String vehicleId);
45     
46     @Select("select * from fd_vehicle_xstd where companyNo=#{companyNo} ")
47     public List<Vehicle_XSTD> getlistbycomNo(String companyNo);
48     @Select("select * from fd_vehicle_xstd ")
49     public List<Vehicle_XSTD> getlistAll();
50     
51 //    @Select("select companyNo from fd_vehicle_xstd where vehicleId=#{vehicleId} group by companyNo ")
52 //    public List<String> getlistbyVehicleIdGp(String vehicleId); 
53     
54     @Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and bsNo=#{bsNo} ")
55     public List<Vehicle_XSTD> getlistbyVehicleIdandbsNoGp(@Param("vehicleId")String vehicleId,@Param("bsNo") String bsNo); 
56     
57     @Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and companyNo=#{companyNo} ")
58     public List<Vehicle_XSTD> getlistbyVehandcompanyNo(@Param("vehicleId")String vehicleId,@Param("companyNo")String companyNo);
59     
60     @Select("select * from fd_vehicle_xstd where xstdNo=#{xstdNo} ")
61     public List<Vehicle_XSTD> getlistbytdNo(String xstdNo);
62     
63     @Select("select * from fd_vehicle_xstd where xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
64     public List<Vehicle_XSTD> getbyxstdNoandcmNo(@Param("xstdNo")String xstdNo,@Param("companyNo")String companyNo);
65     
66     
67     /**
68      * 可以修改
69      * @param xstdNo
70      * @param status
71      * @return
72      */
73 //    @Select("select a.* from fd_vehicle_xstd a left join fd_vehicle b on  a.vehicleId=b.vehicleId where a.xstdNo=#{xstdNo} and b.status=#{status} ")
74 //    public List<Vehicle_XSTD> getkxglist(@Param("xstdNo")String xstdNo,@Param("status")VehicleStatus status);
75     
76     @Select("select b.companyNo,max(b.name) name from fd_vehicle_xstd a left join fd_company b on a.companyNo=b.companyNo where a.vehicleId=#{vehicleId} GROUP BY b.companyNo ")
77     public List<Fd_Company> getCompany(@Param("vehicleId") String vehicleId,@Param("bsNo") String bsNo);
78     @Select("select b.companyNo,max(b.name) name ,a.bsNo note from fd_vehicle_xstd a left join fd_company b on a.companyNo=b.companyNo GROUP BY b.companyNo,a.bsNo ")
79     public List<Fd_Company> getAllCom();
80     
81     @Select("select top 1 a.* from fd_vehicle_xstd  a  where a.vehicleId=#{vehicleId} and a.xstdNo=#{xstdNo} ")
82     public Vehicle_XSTD getVhicleByIDs(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo);
83     
84 }