diff --git a/yxy/component.xml b/yxy/component.xml
new file mode 100644
index 0000000..bd348ed
--- /dev/null
+++ b/yxy/component.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/yxy/src/private/nc/impl/urmex/pub/RMGlobalCacheImpl.java b/yxy/src/private/nc/impl/urmex/pub/RMGlobalCacheImpl.java
new file mode 100644
index 0000000..ebddf05
--- /dev/null
+++ b/yxy/src/private/nc/impl/urmex/pub/RMGlobalCacheImpl.java
@@ -0,0 +1,625 @@
+package nc.impl.urmex.pub;
+
+import java.text.MessageFormat;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import nc.bs.dao.BaseDAO;
+import nc.bs.framework.common.InvocationInfoProxy;
+import nc.bs.framework.common.NCLocator;
+import nc.impl.pubapp.env.BSContext;
+import nc.itf.so.m30trantype.IM30TranTypeService;
+import nc.itf.uap.IUAPQueryBS;
+import nc.itf.uap.pf.IPFConfig;
+import nc.itf.urmex.pub.IRMGlobalCache;
+import nc.pubitf.org.IOrgUnitPubService;
+import nc.vo.bd.balatype.BalaTypeVO;
+import nc.vo.bd.currtype.CurrtypeVO;
+import nc.vo.bd.cust.CustomerVO;
+import nc.vo.bd.material.MaterialVersionVO;
+import nc.vo.bd.material.measdoc.MeasdocVO;
+import nc.vo.bd.psn.PsndocVO;
+import nc.vo.bd.rack.RackVO;
+import nc.vo.bd.stordoc.StordocVO;
+import nc.vo.bd.supplier.SupplierVO;
+import nc.vo.fibd.RecpaytypeVO;
+import nc.vo.org.DeptVO;
+import nc.vo.org.OrgVO;
+import nc.vo.pub.BusinessException;
+import nc.vo.pub.SuperVO;
+import nc.vo.pub.billtype.BilltypeVO;
+import nc.vo.pubapp.AppContext;
+import nc.vo.pubapp.pattern.exception.ExceptionUtils;
+import nc.vo.scmf.ic.mbatchcode.BatchcodeVO;
+import nc.vo.scmpub.res.billtype.SOBillType;
+import nc.vo.so.m30trantype.entity.M30TranTypeVO;
+import nc.vo.so.mreturnreason.entity.ReturnReasonVO;
+import nc.vo.bd.goodsref.GoodsRefVO;
+import nc.vo.urmex.pub.util.SqlBuilder;
+import nc.vo.urmex.pub.util.SqlUtil;
+import nc.vo.urmex.pub.util.StringUtil;
+
+
+/**
+ * @description 档案信息查询与清空
+ * @author tianglk
+ * @date 2022年3月15日 下午1:13:50
+ * @version ncc1.0
+ */
+public class RMGlobalCacheImpl implements IRMGlobalCache {
+
+ private IUAPQueryBS queryBS = null;
+
+ public final IUAPQueryBS getQueryBS() {
+ if (null == queryBS) {
+ queryBS = NCLocator.getInstance().lookup(IUAPQueryBS.class);
+ }
+ return queryBS;
+ }
+
+ BaseDAO baseDAO = null;
+
+ public final BaseDAO getBaseDAO() {
+ if (baseDAO == null) {
+ baseDAO = new BaseDAO();
+ }
+ return baseDAO;
+ }
+
+ Map cache = new ConcurrentHashMap();
+
+ private void retrieveVOByCode(String prefix, String codeField, String[] codes, Class extends SuperVO> className,
+ String condition) throws BusinessException {
+ String pk_group = InvocationInfoProxy.getInstance().getGroupId();
+ this.retrieveVOByCode(prefix, codeField, codes, className, condition, pk_group);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void retrieveVOByCode(String prefix, String codeField, String[] codes, Class extends SuperVO> className,
+ String condition, String pk_group) throws BusinessException {
+ Set codeset = new HashSet();
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, pk_group, code);
+ if (!cache.containsKey(key)) {
+ codeset.add(code);
+ }
+ }
+ if (codeset.size() > 0) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ if ("currtype_".equals(prefix)) { // 币种特殊处理
+ sb.append("pk_org", new String[] { pk_group, "~" });
+ } else {
+ sb.append("pk_group", new String[] { pk_group, "~" });
+ }
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", codeField, codeset.toArray(new String[codeset.size()])));
+ if (!StringUtil.isSEmptyOrNull(condition)) {
+ sb.append(" and ");
+ sb.append(condition);
+ }
+ Collection vos = this.getQueryBS().retrieveByClause(className, sb.toString());
+ for (SuperVO vo : vos) {
+ String code = vo.getAttributeValue(codeField).toString();
+ String key = MessageFormat.format("{0}{1}{2}", prefix, pk_group, code);
+ if (cache.containsKey(key)) {
+ SuperVO cacheVO = cache.get(key);
+ if (!cacheVO.getPrimaryKey().equals(vo.getPrimaryKey())) {
+ ExceptionUtils.wrappBusinessException(nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("4081004_0","04081004-0073", null, new String[] {code}));/*@res "编码为{0}的档案查询结果不唯一,请检查!"*/
+ }
+ }
+ cache.put(key, vo);
+ }
+ }
+ }
+
+ @Override
+ public Map getOrgVO(String[] codes) throws BusinessException {
+ String prefix = "org_";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, OrgVO.class, "isbusinessunit='Y' and islastversion='Y'");
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (OrgVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public Map getCustomerVO(String[] codes) throws BusinessException {
+ String prefix = "cust_";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, CustomerVO.class, "");
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (CustomerVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+
+
+ @Override
+ public Map getTranstypeVO(String[] codes) throws BusinessException {
+ String pk_group = InvocationInfoProxy.getInstance().getGroupId();
+ String initBillTypeKey = MessageFormat.format("initBillType_{0}", pk_group);
+ if (!cache.containsKey(initBillTypeKey)) {
+ //有可能事务回滚导致缓存不准,所以需要清空一下
+ cache.clear();
+ cache.put(initBillTypeKey, new BilltypeVO());
+ }
+ String prefix = "trantype_";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "pk_billtypecode", codes, BilltypeVO.class, "");
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, pk_group, code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (BilltypeVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getBatchcodeVO(String[] materialvids, String[] batchcodes)
+ throws BusinessException {
+ Map ret = new HashMap();
+ Map materialmap = new HashMap();
+ Map batchmap = new HashMap();
+ for (int i = 0; i < materialvids.length; i++) {
+ materialmap.put(materialvids[i], materialvids[i]);
+ batchmap.put(batchcodes[i], batchcodes[i]);
+ }
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("pk_group", InvocationInfoProxy.getInstance().getGroupId());
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "cmaterialvid", materialvids));
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "vbatchcode", batchcodes));
+ Collection vos = this.getQueryBS().retrieveByClause(BatchcodeVO.class, sb.toString());
+ for (BatchcodeVO vo : vos) {
+ String cmaterialvid = vo.getCmaterialvid();
+ String vbatchcode = vo.getVbatchcode();
+ if (materialmap.containsKey(cmaterialvid) && batchmap.containsKey(vbatchcode)) {
+ String key = cmaterialvid + "#" + vbatchcode;
+ ret.put(key, vo);
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public Map getPsndocVO(String[] codes) throws BusinessException {
+ String prefix = "psn_";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, PsndocVO.class, "");
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (PsndocVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public Map getMaterialVersionVO(String[] codes) throws BusinessException {
+ String prefix = "material_";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, MaterialVersionVO.class, "enablestate=2");
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (MaterialVersionVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getMeasdocVO(String[] codes) throws BusinessException {
+ String prefix = "measdoc_";
+ Set codeset = new HashSet();
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}", prefix, code);
+ if (!cache.containsKey(key)) {
+ codeset.add(code);
+ }
+ }
+ if (codeset.size() > 0) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "code", codeset.toArray(new String[codeset.size()])));
+ Collection vos = this.getQueryBS().retrieveByClause(MeasdocVO.class, sb.toString());
+ for (SuperVO vo : vos) {
+ String code = vo.getAttributeValue("code").toString();
+ String key = MessageFormat.format("{0}{1}", prefix, code);
+ cache.put(key, vo);
+ }
+ }
+ Map ret = new HashMap();
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}", prefix, code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (MeasdocVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public OrgVO getOrgVOByPK(String pkOrg) throws BusinessException {
+ String prefix = "org_";
+ Set set = new HashSet();
+ String key = prefix + pkOrg;
+ if (!cache.containsKey(key)) {
+ set.add(pkOrg);
+ }
+ if (set.size() > 0) {
+ IOrgUnitPubService orgService = NCLocator.getInstance().lookup(IOrgUnitPubService.class);
+ OrgVO[] orgVOs = orgService.getOrgs(new String[] { pkOrg }, new String[] { OrgVO.CODE,OrgVO.PK_VID });
+ if (orgVOs != null && orgVOs.length > 0) {
+ cache.put(key, orgVOs[0]);
+ }
+ }
+ return (OrgVO) cache.get(key);
+ }
+
+ @Override
+ public Map getSKUVO(String[] codes) throws BusinessException {
+
+ String prefix = "sku_";
+ String condition = " exists(select 1 from bd_material_v where bd_material_v.pk_source=urm_goodsref.pk_material)";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "goodscode", codes, GoodsRefVO.class, condition);
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (GoodsRefVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public M30TranTypeVO getM30TranstypeVO(String code) throws BusinessException {
+ String prefix = "m30_trantype_";
+ String key = prefix + code;
+ this.initM30TransType(prefix, key, code);
+ return (M30TranTypeVO) cache.get(key);
+ }
+
+ private void initM30TransType(String prefix, String key, String code) throws BusinessException {
+ M30TranTypeVO vo = NCLocator.getInstance().lookup(IM30TranTypeService.class)
+ .queryTranType(AppContext.getInstance().getPkGroup(), code);
+ if (null != vo) {
+ cache.put(key, vo);
+ }
+ }
+
+ /**
+ * 设置业务流程
+ */
+ @Override
+ public String getBusitypeCanStart(String csaleorgid, String destTransType) throws BusinessException {
+
+ String userId = BSContext.getInstance().getUserID();
+
+ String cbiztypeid = null;
+ try {
+
+ IPFConfig pfsrv = NCLocator.getInstance().lookup(IPFConfig.class);
+ cbiztypeid = pfsrv.retBusitypeCanStart(SOBillType.Order.getCode(), destTransType, csaleorgid, userId);
+
+ } catch (BusinessException e) {
+ ExceptionUtils.wrappException(e);
+ }
+ return cbiztypeid;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getSettleVO(String[] codes) throws BusinessException {
+ String prefix = "settle_";
+ Set codeset = new HashSet();
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}", prefix, code);
+ if (!cache.containsKey(key)) {
+ codeset.add(code);
+ }
+ }
+ if (codeset.size() > 0) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "code", codeset.toArray(new String[codeset.size()])));
+ Collection vos = this.getQueryBS().retrieveByClause(BalaTypeVO.class, sb.toString());
+ for (SuperVO vo : vos) {
+ String code = vo.getAttributeValue("code").toString();
+ String key = MessageFormat.format("{0}{1}", prefix, code);
+ cache.put(key, vo);
+ }
+ }
+ Map ret = new HashMap();
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}", prefix, code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (BalaTypeVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+
+
+ @Override
+ public Map getSupplierVO(String[] codes) throws BusinessException {
+ String prefix = "supplier_";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, SupplierVO.class, "");
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (SupplierVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getBackReasonVO(String[] codes, String[] orgIds) throws BusinessException {
+ String prefix = "backreason_";
+ Set codeSet = new HashSet();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ String orgid = orgIds[i];
+ String key1 = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ String key2 = key1 + "_" + orgid;
+ if (!cache.containsKey(key1) && !cache.containsKey(key2)) {
+ codeSet.add(code);
+ }
+ }
+ if (!codeSet.isEmpty()) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append("pk_group", new String[] { InvocationInfoProxy.getInstance().getGroupId(), "~" });
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "vreasoncode", codeSet.toArray(new String[0])));
+ Collection vos = this.getQueryBS().retrieveByClause(ReturnReasonVO.class, sb.toString());
+ for (ReturnReasonVO vo : vos) {
+ String key1 = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ vo.getVreasoncode());
+ cache.put(key1, vo);
+ String key2 = key1 + "_" + vo.getPk_org();
+ cache.put(key2, vo);
+ }
+ }
+
+ Map ret = new HashMap();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ String orgid = orgIds[i];
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (ReturnReasonVO) cache.get(key));
+ }
+ if (!StringUtil.isSEmptyOrNull(orgid)) {
+ key = key + "_" + orgid;
+ if (cache.containsKey(key)) {
+ ret.put(code, (ReturnReasonVO) cache.get(key));
+ }
+ }
+ }
+ return ret;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getDeptVO(String[] codes, String[] orgIds) throws BusinessException {
+ String prefix = "dept_";
+ Set codeSet = new HashSet();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ String orgid = orgIds[i];
+ String key1 = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ String key2 = key1 + "_" + orgid;
+ if (!cache.containsKey(key1) && !cache.containsKey(key2)) {
+ codeSet.add(code);
+ }
+ }
+ if (!codeSet.isEmpty()) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append("pk_group", new String[] { InvocationInfoProxy.getInstance().getGroupId(), "~" });
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "code", codeSet.toArray(new String[0])));
+ Collection vos = this.getQueryBS().retrieveByClause(DeptVO.class, sb.toString());
+ for (DeptVO vo : vos) {
+ String key1 = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ vo.getCode());
+ cache.put(key1, vo);
+ String key2 = key1 + "_" + vo.getPk_org();
+ cache.put(key2, vo);
+ }
+ }
+
+ Map ret = new HashMap();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ String orgid = orgIds[i];
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (DeptVO) cache.get(key));
+ }
+ if (!StringUtil.isSEmptyOrNull(orgid)) {
+ key = key + "_" + orgid;
+ if (cache.containsKey(key)) {
+ ret.put(code, (DeptVO) cache.get(key));
+ }
+ }
+ }
+ return ret;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getStordocVO(String[] codes, String[] orgIds) throws BusinessException {
+ String prefix = "stordoc_";
+ Set codeSet = new HashSet();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ String orgid = orgIds[i];
+ String key1 = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ String key2 = key1 + "_" + orgid;
+ if (!cache.containsKey(key1) && !cache.containsKey(key2)) {
+ codeSet.add(code);
+ }
+ }
+ if (!codeSet.isEmpty()) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append("pk_group", new String[] { InvocationInfoProxy.getInstance().getGroupId(), "~" });
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "code", codeSet.toArray(new String[0])));
+ Collection vos = this.getQueryBS().retrieveByClause(StordocVO.class, sb.toString());
+ for (StordocVO vo : vos) {
+ String key1 = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ vo.getCode());
+ cache.put(key1, vo);
+ String key2 = key1 + "_" + vo.getPk_org();
+ cache.put(key2, vo);
+ }
+ }
+
+ Map ret = new HashMap();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ String orgid = orgIds[i];
+ String key = MessageFormat.format("{0}{1}{2}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (StordocVO) cache.get(key));
+ }
+ if (!StringUtil.isSEmptyOrNull(orgid)) {
+ key = key + "_" + orgid;
+ if (cache.containsKey(key)) {
+ ret.put(code, (StordocVO) cache.get(key));
+ }
+ }
+ }
+ return ret;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map getRackVO(String[] codes, String[] warehouses) throws BusinessException {
+ String prefix = "rack_";
+ Set codeSet = new HashSet();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ //修改查询逻辑--2025年4月11日15点38分--存在codes与warehouses长度不一致,需要做处理 start
+ for(String warehouse:warehouses){
+ String key = MessageFormat.format("{0}{1}{2}{3}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code, warehouse);
+ if (!cache.containsKey(key)) {
+ codeSet.add(code);
+ }
+ }
+ //修改查询逻辑--2025年4月11日15点38分--存在codes与warehouses长度不一致,需要做处理 end
+ }
+ if (!codeSet.isEmpty()) {
+ SqlBuilder sb = new SqlBuilder();
+ sb.append("isnull(dr,0)", 0);
+ sb.append(" and ");
+ sb.append("pk_group", new String[] { InvocationInfoProxy.getInstance().getGroupId(), "~" });
+ sb.append(" and ");
+ sb.append(SqlUtil.getInOrExistsSql("", "code", codeSet.toArray(new String[0])));
+ Collection vos = this.getQueryBS().retrieveByClause(RackVO.class, sb.toString());
+ for (RackVO vo : vos) {
+ String key = MessageFormat.format("{0}{1}{2}{3}", prefix,
+ InvocationInfoProxy.getInstance().getGroupId(), vo.getCode(), vo.getPk_stordoc());
+ cache.put(key, vo);
+ }
+ }
+
+ Map ret = new HashMap();
+ for (int i = 0; i < codes.length; i++) {
+ String code = codes[i];
+ //修改查询逻辑--2025年4月11日15点38分--存在codes与warehouses长度不一致,需要做处理 start
+ for(String warehouse:warehouses){
+ String key = MessageFormat.format("{0}{1}{2}{3}", prefix, InvocationInfoProxy.getInstance().getGroupId(),
+ code, warehouse);
+ if (cache.containsKey(key)) {
+ ret.put(code + warehouse, (RackVO) cache.get(key));
+ }
+ }
+ //修改查询逻辑--2025年4月11日15点38分--存在codes与warehouses长度不一致,需要做处理 end
+ }
+ return ret;
+ }
+
+ @Override
+ public Map getRecpaytypeVOs(String[] codes) throws BusinessException {
+ String prefix = "recpay_";
+ String pk_group = "GLOBLE00000000000000";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, RecpaytypeVO.class, "", pk_group);
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, pk_group, code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (RecpaytypeVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public Map getCurrtypeVOs(String[] codes) throws BusinessException {
+ String prefix = "currtype_";
+ String pk_group = "GLOBLE00000000000000";
+ Map ret = new HashMap();
+ this.retrieveVOByCode(prefix, "code", codes, CurrtypeVO.class, "", pk_group);
+ for (String code : codes) {
+ String key = MessageFormat.format("{0}{1}{2}", prefix, pk_group, code);
+ if (cache.containsKey(key)) {
+ ret.put(code, (CurrtypeVO) cache.get(key));
+ }
+ }
+ return ret;
+ }
+
+ @Override
+ public void clear() throws BusinessException {
+ if (cache != null) {
+ cache.clear();
+ }
+ }
+}
\ No newline at end of file