package com.mandi.basicconfig.mapper; import org.apache.ibatis.annotations.Select; import com.mandi.basicconfig.persist.Ncck; import com.mandi.basicconfig.persist.Ncdepart; import com.mandi.basicconfig.persist.Nchj; import com.mandi.basicconfig.persist.Nchw; import com.mandi.basicconfig.persist.Nccrklx; import com.mandi.basicconfig.persist.Nckh; import com.mandi.basicconfig.persist.Ncwl; import com.mandi.basicconfig.persist.Ncworker; import com.mandi.basicconfig.persist.Ncbzlx; import com.mandi.basicconfig.persist.Ncywdy; import com.mandi.basicconfig.persist.Nczt; public interface NczsjMapper { @Select("select name,depotNo as code from repertory where pkid=#{pkid} ") public Ncck getNcckbyPkid(String pkid); @Select("select top 1 a.code code,a.name name,c.bianhao yktcode,c.name yktname from nc_depart a LEFT JOIN nc_depart_nexus b on a.pkid=b.pkid LEFT JOIN depart c on b.departNo=c.bianhao where a.code=#{code} ") public Ncdepart getNcdepartbyCode(String code); @Select("SELECT top 1 code,name from nc_hj where code=#{code} ") public Nchj getNchjbyCode(String code); @Select("SELECT code,name from nc_hw where pkid=#{pkid} ") public Nchw getNchwbyPkid(String pkid); @Select("SELECT top 1 companyNo code,name from company where companyNo=#{code}") public Nckh getNckhbyCode(String code); @Select("SELECT top 1 materielNo code,name from materiel where materielNo=#{code} ") public Ncwl getNcwlbyCode(String code); @Select("SELECT top 1 gonghao yktcode,name,nc_code code from enterworker where nc_code=#{code} ") public Ncworker getNcworkerbyCode(String code); @Select("SELECT top 1 code,name from nc_bzlx where code=#{code} ") public Ncbzlx getNczpbzbyCode(String code); @Select("SELECT top 1 code,name from nc_zt where code=#{code} ") public Nczt getNcztbyCode(String code); @Select("SELECT top 1 a.code,a.name,c.bianhao yktCode,c.name yktName from nc_ywdy a LEFT JOIN nc_ywdy_nexus b on a.pkid=b.pkid LEFT JOIN depart c on b.sdepartNo=c.bianhao where a.code=#{code} ") public Ncywdy getNcywdybyCode(String code); @Select("select top 1 * from nc_crklx where code=#{code} ") public Nccrklx getNcjylxbycode(String code); }