Commit 7c35976f by hulei

SettleContext调整为多实体模式

parent c8c2c2e2
......@@ -33,13 +33,13 @@ import java.util.Objects;
@Component
public class SettleContext {
private final String ETY_EXTKEY = "CEB";
private final String ETG_EXTKEY = "CEBGRP";
// private final String ETY_EXTKEY = "CEB";
// private final String ETG_EXTKEY = "CEBGRP";
private final static List<String> US_LOCALE_LIST = Arrays.asList("LE", "LI", "BE", "BR");
private Ety ety;
private Etg etg;
// private Ety ety;
// private Etg etg;
@Autowired
private EtyMapper etyMapper;
......@@ -73,11 +73,11 @@ public class SettleContext {
@Autowired
private AtpBchCacheService atpBchCacheService;
@PostConstruct
public void loadEtyAndEtg() {
ety = etyMapper.getEtyByExtkey(ETY_EXTKEY);
etg = etgMapper.getEtgByExtkey(ETG_EXTKEY);
}
// @PostConstruct
// public void loadEtyAndEtg() {
// ety = etyMapper.getEtyByExtkey(ETY_EXTKEY);
// etg = etgMapper.getEtgByExtkey(ETG_EXTKEY);
// }
private static ThreadLocal<SettleSession> userSessionThreadLocal = new ThreadLocal<>();
......@@ -243,7 +243,7 @@ public class SettleContext {
if (userVo == null) {
throw new CommonServiceException("找不到 " + sessionUserVo.getLogName() + " 用户信息!");
}
userVo.setEty(ETY_EXTKEY);
// userVo.setEty(userVo.getEtyextkey());
// 填充用户信息
settleSession.setUserVo(userVo);
......@@ -269,6 +269,9 @@ public class SettleContext {
Atp atp = atpMapper.getAtpByCod(settleSession.getTransName());
settleSession.setAtp(atp);
Ety ety = etyMapper.getEtyByExtkey(usr.getEty());
Etg etg = etgMapper.getEtgByExtkey(ety.getEtg());
settleSession.setEty(ety);
settleSession.setEtg(etg);
......@@ -387,7 +390,7 @@ public class SettleContext {
if (userVo == null) {
throw new CommonServiceException("找不到 " + sessionUserVo.getLogName() + " 用户信息!");
}
userVo.setEty(ETY_EXTKEY);
// userVo.setEty(ETY_EXTKEY);
// 填充用户信息
settleSession.setUserVo(userVo);
......@@ -413,6 +416,8 @@ public class SettleContext {
Atp atp = atpMapper.getAtpByCod(settleSession.getTransName());
settleSession.setAtp(atp);
Ety ety = etyMapper.getEtyByExtkey(usr.getEty());
Etg etg = etgMapper.getEtgByExtkey(ety.getEtg());
settleSession.setEty(ety);
settleSession.setEtg(etg);
......@@ -463,7 +468,7 @@ public class SettleContext {
if (userVo == null) {
throw new CommonServiceException("找不到 " + sessionUserVo.getLogName() + " 用户信息!");
}
userVo.setEty(ETY_EXTKEY);
// userVo.setEty(ETY_EXTKEY);
// 填充用户信息
settleSession.setUserVo(userVo);
......@@ -489,6 +494,8 @@ public class SettleContext {
Atp atp = atpMapper.getAtpByCod(settleSession.getTransName());
settleSession.setAtp(atp);
Ety ety = etyMapper.getEtyByExtkey(usr.getEty());
Etg etg = etgMapper.getEtgByExtkey(ety.getEtg());
settleSession.setEty(ety);
settleSession.setEtg(etg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment