package com.mandi.fendan.mapper; import java.util.List; import java.util.Map; 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.util.persist.Serviceenum; public interface BusinessMapper { /** * 存在发卡 */ @Select({" select top 1 * from bussinesssheet where exists( ", " 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) " , " ) and bussinessNo in(${bussinessNos}) " }) public Map existsIssueCardByNos(@Param("bussinessNos") String bussinessNos); /** * 取销售在用卡 * @param cardno * @param numberplates * @param sdepartNo * @return */ @Select({"" }) public String getBusinessNoByCardNo(@Param("cardno") String cardno,@Param("numberplates") String numberplates,@Param("sdepartNo")String sdepartNo); @Deprecated @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} ") public Map getbsbyBt(@Param("vehicleID") String vehicleID,@Param("btNo")String btNo,@Param("sstatus")Serviceenum sstatus,@Param("sdepartNo")String sdepartNo); /** * 分页获取已建的分单 * @param mp * @return */ public List> getbslist(Map mp); public int getbspages(Map mp); @Deprecated @Select("select top 1 * from bussinesssheet where bussinessNo=#{bussinessNo}") public Map getBsheet(String bussinessNo); @Deprecated @Update("update bussinesssheet set invitecode=#{invitecode} where numberplates=#{vehicleID} and sstatus=#{sstatus} and sdepartNo=#{sdepartNo} ") public int updateMsg(@Param("invitecode") String invitecode,@Param("vehicleID") String vehicleID,@Param("sstatus") Serviceenum sstatus,@Param("sdepartNo") String sdepartNo); @Deprecated @Update("update bussinesssheet set sstatus=#{sstatus} where bussinessNo=#{bussinessNo} ") public int endBsheet(@Param("bussinessNo") String bussinessNo,@Param("sstatus") Serviceenum sstatus); @Deprecated @Select("select top 1 * from bussinesssheet where invitecode=#{invitecode} and sstatus=#{sstatus} order by ctime desc") public Map getBsheetByInviteCodeNoSdNo(@Param("invitecode") String invitecode,@Param("sstatus")Serviceenum sstatus); @Deprecated @Insert("insert into bussinessitems " + "(id,bussinessNo,cdepart,cdepartid,cname,createid,ctime,fachang,factory,fcnum,loadbuild,materielNo,name,norms,note,num,reserved11," + "reserved12,reserved13,reserved14,reserved15,reserved16,product_billNo,product_serialNo,product_otherNo,weight,price,preweight,hejin,pici," + "gross,taotong,taotongWeight,money,product_ywrq,product_flh,unitname,recompany,reID,decompany,deID,frombatch,jsnum,rcompany,rID,forshowindx,barcode) values " + "(#{id},#{bussinessNo},#{cdepart},#{cdepartid},#{cname},#{createid},#{ctime},#{fachang},#{factory},#{fcnum},#{loadbuild}," + "#{materielNo},#{name},#{norms},#{note},#{num},#{reserved11},#{reserved12},#{reserved13},#{reserved14},#{reserved15},#{reserved16}" + ",#{product_billNo},#{product_serialNo},#{product_otherNo},#{weight},#{price},#{preweight},#{hejin},#{pici},#{gross},#{taotong},#{taotongWeight}," + "#{money},#{product_ywrq},#{product_flh},#{unitname},#{recompany},#{reID},#{decompany},#{deID},#{frombatch},#{jsnum},#{rcompany},#{rID},#{forshowindx},#{barcode})") public int insertBsi(Map wxst); @Deprecated @Insert("update bussinessitems set " + "bussinessNo=#{bussinessNo},cdepart=#{cdepart},cdepartid=#{cdepartid},cname=#{cname},createid=#{createid},ctime=#{ctime}," + "fachang=#{fachang},factory=#{factory},fcnum=#{fcnum},loadbuild=#{loadbuild},materielNo=#{materielNo},name=#{name},norms=#{norms}," + "note=#{note},num=#{num},reserved11=#{reserved11}," + "reserved12=#{reserved12},reserved13=#{reserved13},reserved14=#{reserved14},reserved15=#{reserved15},reserved16=#{reserved16}," + "product_billNo=#{product_billNo},product_serialNo=#{product_serialNo}," + "product_otherNo=#{product_otherNo},weight=#{weight},price=#{price},preweight=#{preweight},hejin=#{hejin},pici=#{pici}," + "gross=#{gross},taotong=#{taotong},taotongWeight=#{taotongWeight},money=#{money},product_ywrq=#{product_ywrq},product_flh=#{product_flh}," + "unitname=#{unitname},recompany=#{recompany},reID=#{reID},decompany=#{decompany}," + "deID=#{deID},frombatch=#{frombatch},jsnum=#{jsnum},rcompany=#{rcompany},rID=#{rID},forshowindx=#{forshowindx},barcode=#{barcode} where id=#{id} ") public int updateBsi(Map wxst); @Deprecated @Select("select * from bussinessitems where bussinessNo=#{bussinessNo} and pici=#{pici} ") public Map getbsi(@Param("pici")String pici,@Param("bussinessNo")String bussinessNo); @Deprecated @Select("select * from bussinessitems where bussinessNo=#{bussinessNo}") public List> getbsibyNo(@Param("bussinessNo")String bussinessNo); @Deprecated @Delete("delete from bussinessitems where bussinessNo=#{bussinessNo} and barcode=#{barcode} ") public int delbysibyBarcode(@Param("barcode")String barcode,@Param("bussinessNo")String bussinessNo); @Deprecated @Delete("delete from bussinessitems where bussinessNo=#{bussinessNo} and pici=#{pici} ") public int delbypchandNo(@Param("pici")String pici,@Param("bussinessNo")String bussinessNo); @Deprecated @Delete("delete from bussinessitems where bussinessNo=#{bussinessNo}") public int delbydNo(@Param("bussinessNo")String bussinessNo); @Deprecated @Update("update bussinesssheet set driver=#{driver},phone=#{phone},numberplates=#{numberplates} where bussinessNo=#{bussinessNo}") public int changeVehicle(Map mp); @Select("SELECT count(1) from weight_doc where vehicleID=#{vehicleID} and businessNo=#{businessNo} and wdstate='正常' ") public int getweightDoc(@Param("vehicleID")String vehicleID,@Param("businessNo")String businessNo); @Select("SELECT count(1) from weight_doc where vehicleID=#{vehicleID} and businessNo=#{businessNo} and wdstate='正常' and gross>0 ") public int getgrosstDoc(@Param("vehicleID")String vehicleID,@Param("businessNo")String businessNo); @Update("update weight_doc set canfub=1 where vehicleID=#{vehicleID} and businessNo=#{businessNo} and wdstate='正常' and gross>0 ") public int updatecanFb(@Param("vehicleID")String vehicleID,@Param("businessNo")String businessNo); @Deprecated @Delete("delete from vehicle_queuing where numberplates=#{vehicleID}") public int delvehicleQ(@Param("vehicleID")String vehicleID); @Select("select count(1) from vehicle_queuing where numberplates=#{vehicleID}") public int getvehicleQ(@Param("vehicleID")String vehicleID); @Select("select top 1 ipadd from print_ipadd where addtype='分单打印地址' and state=1 ") public String getUsedbyAdd(); @Update("update xs_taskmonitor set firstzxhtime=#{firstzxhtime},lastzxhtime=#{lastzxhtime} where businessNo=#{businessNo} ") public int updateTaskTime(Map xstm); @Select("select * from xs_taskmonitor where businessNo=#{businessNo} ") public Map selectTaskTime(String businessNo); @Update("update xs_taskmonitor set zcWc=#{zcWc},zcwcTime=#{zcwcTime} where businessNo=#{businessNo} ") public int updateZcWcTime(Map xstm); @Update("update xs_taskmonitor set canCm=#{canCm} where businessNo=#{businessNo} ") public int updateCanCm(Map xstm); }