Administrator
2023-04-19 40ec16bbb7c9d23df625aa31ae42ac36e901749d
提交 | 用户 | 时间
58d006 1 package com.mandi.fendan.mapper;
A 2
3 import java.util.List;
4 import java.util.Map;
5
6 import org.apache.ibatis.annotations.Delete;
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.util.persist.Serviceenum;
12
13 /**
14  * 一卡通数据取值
15  * @author 15083
16  *
17  */
18 public interface Fd_YKTMapper {
19     
20     @Select("select a.* from enterworker a left join users b on a.userid=b.id where b.username=#{username}")
21     public Map<String, Object> findWorkerByUserName(String username);
22     @Update("update bussinesssheet set canedit='不可编辑',sstatus='终止' where bussinessNo=#{bussinessNo} ")
23     public int endBsheet(String bussinessNo);
24     @Delete("delete from bussinesssheet  where bussinessNo=#{bussinessNo} ")
25     public int delBsheet(String bussinessNo);
26     @Select("select * from cardinuse where cardno=#{cardno} ")
27     public Map<String, Object> getcardinuse(String cardno);
28     @Select("select * from vehicle_queuing where numberplates=#{vehicleId} and gatesNo=#{gatesNo} ")
29     public Map<String, Object> getpdindx(@Param("vehicleId") String vehicleId,@Param("gatesNo") String gatesNo);
30     @Select("select top 1 a.* from bussinesssheet a left join gbusi_type b  on a.btid=b.id where b.businesstypeNo=#{btNo} and a.numberplates=#{vehicleID} and a.sstatus=#{sstatus} and a.sdepartNo=#{sdepartNo} ")
31     public Map<String, Object> getBsheet(@Param("vehicleID") String vehicleID,@Param("btNo") String btNo,@Param("sstatus") Serviceenum status,@Param("sdepartNo") String sdepartNo);
32     @Select("select top 1 * from cardinuse where numberplates=#{vehicleId}")
33     public Map<String, Object> getcardbyVehicleID(String vehicleId);
34     @Update("update bussinesssheet set rcompany=#{shcompany},rcID=#{rcID} where bussinessNo=#{bussinessNo} ")
35     public int updateshcompany(@Param("bussinessNo")String bussinessNo,@Param("shcompany") String shcompany,@Param("rcID") String rcID);
36     
37     @Select("select count(1) from weight_doc where businessNo=#{bussinessNo} and wdstate='正常' ")
38     public int getweight_doc(@Param("bussinessNo")String bussinessNo);
39     
40     @Select("SELECT ISNULL(SUM(a.gross),0) gross,ISNULL(SUM(a.tare),0) tare from weight_doc a where a.businessNo=#{bussinessNo} and a.wdstate='正常'  ")
41     public Map<String, Object> getweight_docgt(@Param("bussinessNo")String bussinessNo);
42     
43     @Select("SELECT DISTINCT(b.username) FROM worker_depart a LEFT JOIN users b on a.userid=b.id LEFT JOIN enterworker e on a.workerNo=e.gonghao where a.departNo=#{bianhao} and e.state=1 and b.id is not null  ")
44     public List<String> getUserNsByDepart(String bianhao);
45     
46     
47 }