diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java index 39303f70..a37e8329 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/util/QueryU8CEntityUtil.java @@ -4,9 +4,11 @@ import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant; import com.hzya.frame.plugin.lets.dao.IBdCorpDao; import com.hzya.frame.plugin.lets.dao.IBdInvbasdocDao; import com.hzya.frame.plugin.lets.dao.IBdInvmandocDao; +import com.hzya.frame.plugin.lets.dao.IBdStordocDao; import com.hzya.frame.plugin.lets.entity.BdCorpEntity; import com.hzya.frame.plugin.lets.entity.BdInvbasdocEntity; import com.hzya.frame.plugin.lets.entity.BdInvmandocEntity; +import com.hzya.frame.plugin.lets.entity.BdStordocEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -38,6 +40,7 @@ public class QueryU8CEntityUtil { */ public BdCorpEntity queryBdCorpByUnitCode(String unitCode) { BdCorpEntity entity = new BdCorpEntity(); + entity.setDr(0); entity.setUnitcode(unitCode); entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); List query = iBdCorpDao.query(entity); @@ -53,6 +56,7 @@ public class QueryU8CEntityUtil { */ public BdCorpEntity queryBdCorpByPkCorp(String pkCorp) { BdCorpEntity entity = new BdCorpEntity(); + entity.setDr(0); entity.setPkCorp(pkCorp); entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); List query = iBdCorpDao.query(entity); @@ -64,6 +68,82 @@ public class QueryU8CEntityUtil { } ////////////////////////////////////////////////////////////////////////////////////////公司 + ////////////////////////////////////////////////////////////////////////////////////////仓库 + @Autowired + private IBdStordocDao iBdStordocDao; + + /** + * 根据仓库编码查询仓库 + * @param storCode + * @return + */ + public BdStordocEntity queryBdStordocByCode(String storCode){ + BdStordocEntity entity = new BdStordocEntity(); + entity.setDr(0L); + entity.setStorcode(storCode); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = iBdStordocDao.query(entity); + if (query.size() >= 1) { + return query.get(0); + } else { + return null; + } + } + /** + * 根据仓库主键查询仓库 + * @param pkStordoc + * @return + */ + public BdStordocEntity queryBdStordocByPk(String pkStordoc){ + BdStordocEntity entity = new BdStordocEntity(); + entity.setDr(0L); + entity.setPkStordoc(pkStordoc); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = iBdStordocDao.query(entity); + if (query.size() >= 1) { + return query.get(0); + } else { + return null; + } + } + /** + * 根据仓库名称查询仓库 + * @param StorName + * @return + */ + public BdStordocEntity queryBdStordocByNamek(String StorName){ + BdStordocEntity entity = new BdStordocEntity(); + entity.setDr(0L); + entity.setStorname(StorName); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = iBdStordocDao.query(entity); + if (query.size() >= 1) { + return query.get(0); + } else { + return null; + } + } + /** + * 根据仓库编码+公司编码查询仓库 + * @param storCode + * @param pkCorp + * @return + */ + public BdStordocEntity queryBdStordocByCodeAndPkCorp(String storCode,String pkCorp){ + BdStordocEntity entity = new BdStordocEntity(); + entity.setDr(0L); + entity.setStorcode(storCode); + entity.setPkCorp(pkCorp); + entity.setDataSourceCode(ProfilesActiveConstant.LETS_DATE_SOURCE); + List query = iBdStordocDao.query(entity); + if (query.size() >= 1) { + return query.get(0); + } else { + return null; + } + } + ////////////////////////////////////////////////////////////////////////////////////////仓库 + ////////////////////////////////////////////////////////////////////////////////////////存货基本档案 @Autowired private IBdInvbasdocDao iBdInvbasdocDao;