hjg
2024-10-30 8cf23534166c07e711aac2a25911ada317ba01f0
提交 | 用户 | 时间
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.Insert;
8 import org.apache.ibatis.annotations.Param;
9 import org.apache.ibatis.annotations.Select;
10 import org.apache.ibatis.annotations.Update;
11
12 import com.mandi.fendan.util.persist.Serviceenum;
13
14 public interface BusinessMapper {
15
16     /**
17      * 存在发卡
18      */
19     @Select({" select top 1 * from bussinesssheet where exists( ",
20             " select top 1 * from ACT_HI_TASKINST where NAME_ = 'issue_card' and PROC_INST_ID_ = instanceId and    (DELETE_REASON_ ='completed' or end_time_ is not null) " ,
21             " ) and bussinessNo in(${bussinessNos}) "
22     })
23     public Map<String,Object> existsIssueCardByNos(@Param("bussinessNos") String bussinessNos);
24
5aa407 25     /**
A 26      * 取销售在用卡
27      * @param cardno
28      * @param numberplates
29      * @param sdepartNo
30      * @return
31      */
32     @Select({"<script>" +
33             "select top 1 bussinessNo from bussinesssheet " +
34             "<where>",
35             "cardno=#{cardno} and sstatus='在办' and numberplates = #{numberplates} " ,
36             "<if test=\"sdepartNo!='' and sdepartNo!=null\">",
37             " and sdepartNo=#{sdepartNo}",
38             "</if>",
39 //            "and btid=3", //3为成品销售
40             "</where>",
41             " order by indx",
42             "</script>" })
43     public String getBusinessNoByCardNo(@Param("cardno") String cardno,@Param("numberplates") String numberplates,@Param("sdepartNo")String sdepartNo);
58d006 44
A 45     @Deprecated
46     @Select("select top 1 * 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} ")
47     public Map<String, Object> getbsbyBt(@Param("vehicleID") String vehicleID,@Param("btNo")String btNo,@Param("sstatus")Serviceenum sstatus,@Param("sdepartNo")String sdepartNo);
48
49
50     /**
51      * 分页获取已建的分单
52      * @param mp
53      * @return
54      */
55     public List<Map<String, Object>> getbslist(Map<String, Object> mp);
56     public int getbspages(Map<String, Object> mp);
57
58     @Deprecated
59     @Select("select top 1 * from bussinesssheet where bussinessNo=#{bussinessNo}")
60     public Map<String, Object> getBsheet(String bussinessNo);
61
62     @Deprecated
63     @Update("update bussinesssheet set invitecode=#{invitecode} where numberplates=#{vehicleID} and sstatus=#{sstatus} and sdepartNo=#{sdepartNo} ")
64     public int updateMsg(@Param("invitecode") String invitecode,@Param("vehicleID") String vehicleID,@Param("sstatus") Serviceenum sstatus,@Param("sdepartNo") String sdepartNo);
65     @Deprecated
66     @Update("update bussinesssheet set sstatus=#{sstatus} where bussinessNo=#{bussinessNo} ")
67     public int endBsheet(@Param("bussinessNo") String bussinessNo,@Param("sstatus") Serviceenum sstatus);
68
69     @Deprecated
70     @Select("select  top 1 * from bussinesssheet where invitecode=#{invitecode} and sstatus=#{sstatus} order by ctime desc")
71     public Map<String, Object> getBsheetByInviteCodeNoSdNo(@Param("invitecode") String invitecode,@Param("sstatus")Serviceenum sstatus);
72     @Deprecated
73     @Insert("insert into bussinessitems "
74     + "(id,bussinessNo,cdepart,cdepartid,cname,createid,ctime,fachang,factory,fcnum,loadbuild,materielNo,name,norms,note,num,reserved11,"
75     + "reserved12,reserved13,reserved14,reserved15,reserved16,product_billNo,product_serialNo,product_otherNo,weight,price,preweight,hejin,pici,"
76     + "gross,taotong,taotongWeight,money,product_ywrq,product_flh,unitname,recompany,reID,decompany,deID,frombatch,jsnum,rcompany,rID,forshowindx,barcode) values "
77     + "(#{id},#{bussinessNo},#{cdepart},#{cdepartid},#{cname},#{createid},#{ctime},#{fachang},#{factory},#{fcnum},#{loadbuild},"
78     + "#{materielNo},#{name},#{norms},#{note},#{num},#{reserved11},#{reserved12},#{reserved13},#{reserved14},#{reserved15},#{reserved16}"
79     + ",#{product_billNo},#{product_serialNo},#{product_otherNo},#{weight},#{price},#{preweight},#{hejin},#{pici},#{gross},#{taotong},#{taotongWeight},"
80     + "#{money},#{product_ywrq},#{product_flh},#{unitname},#{recompany},#{reID},#{decompany},#{deID},#{frombatch},#{jsnum},#{rcompany},#{rID},#{forshowindx},#{barcode})")
81     public int insertBsi(Map<String, Object> wxst);
82     @Deprecated
83     @Insert("update bussinessitems set "
84             + "bussinessNo=#{bussinessNo},cdepart=#{cdepart},cdepartid=#{cdepartid},cname=#{cname},createid=#{createid},ctime=#{ctime},"
85             + "fachang=#{fachang},factory=#{factory},fcnum=#{fcnum},loadbuild=#{loadbuild},materielNo=#{materielNo},name=#{name},norms=#{norms},"
86             + "note=#{note},num=#{num},reserved11=#{reserved11},"
87             + "reserved12=#{reserved12},reserved13=#{reserved13},reserved14=#{reserved14},reserved15=#{reserved15},reserved16=#{reserved16},"
88             + "product_billNo=#{product_billNo},product_serialNo=#{product_serialNo},"
89             + "product_otherNo=#{product_otherNo},weight=#{weight},price=#{price},preweight=#{preweight},hejin=#{hejin},pici=#{pici},"
90             + "gross=#{gross},taotong=#{taotong},taotongWeight=#{taotongWeight},money=#{money},product_ywrq=#{product_ywrq},product_flh=#{product_flh},"
91             + "unitname=#{unitname},recompany=#{recompany},reID=#{reID},decompany=#{decompany},"
92             + "deID=#{deID},frombatch=#{frombatch},jsnum=#{jsnum},rcompany=#{rcompany},rID=#{rID},forshowindx=#{forshowindx},barcode=#{barcode} where id=#{id} ")
93     public int updateBsi(Map<String, Object> wxst);
94     @Deprecated
95     @Select("select * from bussinessitems where bussinessNo=#{bussinessNo} and pici=#{pici} ")
96     public Map<String, Object> getbsi(@Param("pici")String pici,@Param("bussinessNo")String bussinessNo);
97     @Deprecated
98     @Select("select * from bussinessitems where bussinessNo=#{bussinessNo}")
99     public List<Map<String, Object>> getbsibyNo(@Param("bussinessNo")String bussinessNo);
100     @Deprecated
101     @Delete("delete from bussinessitems where bussinessNo=#{bussinessNo} and barcode=#{barcode} ")
102     public int delbysibyBarcode(@Param("barcode")String barcode,@Param("bussinessNo")String bussinessNo);
103     @Deprecated
104     @Delete("delete from bussinessitems where bussinessNo=#{bussinessNo} and pici=#{pici} ")
105     public int delbypchandNo(@Param("pici")String pici,@Param("bussinessNo")String bussinessNo);
106     @Deprecated
107     @Delete("delete from bussinessitems where bussinessNo=#{bussinessNo}")
108     public int delbydNo(@Param("bussinessNo")String bussinessNo);
109     @Deprecated
110     @Update("update bussinesssheet set driver=#{driver},phone=#{phone},numberplates=#{numberplates} where bussinessNo=#{bussinessNo}")
111     public int changeVehicle(Map<String, Object> mp);
112
113     @Select("SELECT count(1) from weight_doc where vehicleID=#{vehicleID} and businessNo=#{businessNo} and wdstate='正常' ")
114     public int getweightDoc(@Param("vehicleID")String vehicleID,@Param("businessNo")String businessNo);
115
116     @Select("SELECT count(1) from weight_doc where vehicleID=#{vehicleID} and businessNo=#{businessNo} and wdstate='正常' and gross>0 ")
117     public int getgrosstDoc(@Param("vehicleID")String vehicleID,@Param("businessNo")String businessNo);
118
119     @Update("update weight_doc set canfub=1 where vehicleID=#{vehicleID} and businessNo=#{businessNo} and wdstate='正常' and gross>0 ")
120     public int updatecanFb(@Param("vehicleID")String vehicleID,@Param("businessNo")String businessNo);
121
122
123     @Deprecated
124     @Delete("delete from vehicle_queuing where numberplates=#{vehicleID}")
125     public int delvehicleQ(@Param("vehicleID")String vehicleID);
126     @Select("select count(1) from vehicle_queuing where numberplates=#{vehicleID}")
127     public int getvehicleQ(@Param("vehicleID")String vehicleID);
128
129     @Select("select top 1 ipadd from print_ipadd where addtype='分单打印地址' and state=1 ")
130     public String getUsedbyAdd();
131
132
133
134     @Update("update xs_taskmonitor set firstzxhtime=#{firstzxhtime},lastzxhtime=#{lastzxhtime} where businessNo=#{businessNo} ")
135     public int updateTaskTime(Map<String, Object> xstm);
136
137     @Select("select * from xs_taskmonitor where businessNo=#{businessNo} ")
138     public Map<String, Object> selectTaskTime(String businessNo);
139
140     @Update("update xs_taskmonitor set zcWc=#{zcWc},zcwcTime=#{zcwcTime} where businessNo=#{businessNo} ")
141     public int updateZcWcTime(Map<String, Object> xstm);
142
143     @Update("update xs_taskmonitor set canCm=#{canCm} where businessNo=#{businessNo} ")
144     public int updateCanCm(Map<String, Object> xstm);
145
146
147
148 }