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;
|
import com.mandi.fendan.persist.Vehicle_XSTD;
|
|
public interface VehicleXSTDMapper {
|
|
@Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
|
public Vehicle_XSTD getbyIDs(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo,@Param("companyNo") String companyNo);
|
|
@Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} ")
|
public List<Vehicle_XSTD> getbyIDsnocomNo(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo);
|
|
@Delete("delete from fd_vehicle_xstd where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
|
public int delbyIDs(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo,@Param("companyNo") String companyNo);
|
|
@Delete("delete from fd_vehicle_xstd where xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
|
public int delbyIDandcomNo(@Param("xstdNo") String xstdNo,@Param("companyNo") String companyNo);
|
|
@Delete("delete from fd_vehicle_xstd where vehicleId=#{vehicleId} and bsNo=#{bsNo}")
|
public int delbyVehicleId(@Param("vehicleId") String vehicleId,@Param("bsNo") String bsNo);
|
|
// @Delete("delete from fd_vehicle_xstd where vehicleId=#{vehicleId} ")
|
// public int delbyVehicleID(@Param("vehicleId") String vehicleId);
|
|
@Insert("insert into fd_vehicle_xstd (vehicleId,xstdNo,fd_num,fd_weight,bsNo,companyNo) "
|
+ "values (upper(#{vehicleId}),#{xstdNo},#{fd_num},#{fd_weight},#{bsNo},#{companyNo}) ")
|
public int insert(Vehicle_XSTD vxs);
|
@Update("update fd_vehicle_xstd set fd_num=#{fd_num},fd_weight=#{fd_weight},bsNo=#{bsNo}"
|
+ " where vehicleId=#{vehicleId} and xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
|
public int updatewithIDs(Vehicle_XSTD vxs);
|
// @Update("update fd_vehicle_xstd set vehicleId=#{nvehicleId} where vehicleId=#{vehicleId}")
|
// public int changeVehicle(@Param("vehicleId")String vehicleId,@Param("nvehicleId")String nvehicleId);
|
|
@Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} ")
|
public List<Vehicle_XSTD> getlistbyVehicleId(String vehicleId);
|
|
@Select("select * from fd_vehicle_xstd where companyNo=#{companyNo} ")
|
public List<Vehicle_XSTD> getlistbycomNo(String companyNo);
|
@Select("select * from fd_vehicle_xstd ")
|
public List<Vehicle_XSTD> getlistAll();
|
|
// @Select("select companyNo from fd_vehicle_xstd where vehicleId=#{vehicleId} group by companyNo ")
|
// public List<String> getlistbyVehicleIdGp(String vehicleId);
|
|
@Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and bsNo=#{bsNo} ")
|
public List<Vehicle_XSTD> getlistbyVehicleIdandbsNoGp(@Param("vehicleId")String vehicleId,@Param("bsNo") String bsNo);
|
|
@Select("select * from fd_vehicle_xstd where vehicleId=#{vehicleId} and companyNo=#{companyNo} ")
|
public List<Vehicle_XSTD> getlistbyVehandcompanyNo(@Param("vehicleId")String vehicleId,@Param("companyNo")String companyNo);
|
|
@Select("select * from fd_vehicle_xstd where xstdNo=#{xstdNo} ")
|
public List<Vehicle_XSTD> getlistbytdNo(String xstdNo);
|
|
@Select("select * from fd_vehicle_xstd where xstdNo=#{xstdNo} and companyNo=#{companyNo} ")
|
public List<Vehicle_XSTD> getbyxstdNoandcmNo(@Param("xstdNo")String xstdNo,@Param("companyNo")String companyNo);
|
|
|
/**
|
* 可以修改
|
* @param xstdNo
|
* @param status
|
* @return
|
*/
|
// @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} ")
|
// public List<Vehicle_XSTD> getkxglist(@Param("xstdNo")String xstdNo,@Param("status")VehicleStatus status);
|
|
@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 ")
|
public List<Fd_Company> getCompany(@Param("vehicleId") String vehicleId,@Param("bsNo") String bsNo);
|
@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 ")
|
public List<Fd_Company> getAllCom();
|
|
@Select("select top 1 a.* from fd_vehicle_xstd a where a.vehicleId=#{vehicleId} and a.xstdNo=#{xstdNo} ")
|
public Vehicle_XSTD getVhicleByIDs(@Param("vehicleId") String vehicleId,@Param("xstdNo") String xstdNo);
|
|
}
|