ariesy 去除所有切换数据源代码

release
yefei 2 years ago
parent 31e8e31761
commit 566cd82726
  1. 5
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SellerUserServiceImpl.java
  2. 1
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysBusinessServiceImpl.java
  3. 4
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysDeptServiceImpl.java
  4. 6
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysDicttypeServiceImpl.java
  5. 5
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysIpServiceImpl.java
  6. 18
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysMenuServiceImpl.java
  7. 7
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysRoleServiceImpl.java
  8. 3
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysRulesDeptServiceImpl.java
  9. 8
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysTabulateServiceImpl.java
  10. 5
      dxhy-admin/src/main/java/com/dxhy/admin/sys/service/impl/SysUserRoleServiceImpl.java
  11. 5
      dxhy-base/src/main/java/com/dxhy/base/service/fpcj/BaseFpcjmxServiceImpl.java
  12. 1
      dxhy-base/src/main/java/com/dxhy/base/service/sqdktj/BaseStatisticalEnterpriseServiceImpl.java
  13. 2
      dxhy-common/src/main/java/com/dxhy/common/datasource/aspect/DataSourceAspect.java
  14. 32
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/CustomsInterfaceServiceImpl.java
  15. 21
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceDownServiceImpl.java
  16. 16
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/SysUserServiceImpl.java
  17. 4
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/ViolationMsgServiceImpl.java
  18. 6
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/ViolationRecordServiceImpl.java
  19. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpcjServiceImpl.java
  20. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpcjmxServiceImpl.java
  21. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpmxcxServiceImpl.java
  22. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpqsServiceImpl.java
  23. 2
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FprzybServiceImpl.java
  24. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxServiceImpl.java
  25. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxmxServiceImpl.java
  26. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/FpzhcxslServiceImpl.java
  27. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/GxfpqrServiceImpl.java
  28. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/JxsemxbbcxServiceImpl.java
  29. 2
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/LqFpycxxServiceImpl.java
  30. 2
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/RzjgqdServiceImpl.java
  31. 2
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/TtFprzhzServiceImpl.java
  32. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpbbcxServiceImpl.java
  33. 2
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YcfpcxServiceImpl.java
  34. 1
      dxhy-core/src/main/java/com/dxhy/core/service/export/impl/YqfpcxServiceImpl.java
  35. 2
      dxhy-core/src/main/java/com/dxhy/core/service/log/impl/CoreInvoiceLogServiceImpl.java
  36. 1
      dxhy-core/src/main/java/com/dxhy/core/service/log/impl/SysLogServiceImpl.java
  37. 2
      dxhy-core/src/main/java/com/dxhy/core/service/singletable/impl/CoreSaveInvoiceInfoServiceImpl.java
  38. 2
      dxhy-core/src/main/java/com/dxhy/core/task/ApplyTask.java
  39. 9
      dxhy-core/src/main/java/com/dxhy/core/task/ConfirmTask.java
  40. 22
      dxhy-core/src/main/java/com/dxhy/core/task/CustomsInterfaceTask.java
  41. 6
      dxhy-core/src/main/java/com/dxhy/core/task/DataPlatformInterfaceTask.java
  42. 5
      dxhy-core/src/main/java/com/dxhy/core/task/InvoiceDownTask.java
  43. 4
      dxhy-core/src/main/java/com/dxhy/core/task/InvoiceInterfaceTask.java
  44. 3
      dxhy-core/src/main/java/com/dxhy/core/task/SdnyClientTask.java
  45. 12
      dxhy-core/src/main/java/com/dxhy/core/task/ViolationMsgTask.java
  46. 1
      dxhy-core/src/main/java/com/dxhy/core/thread/CautionExportExpirationThread.java
  47. 1
      dxhy-core/src/main/java/com/dxhy/core/thread/CautionExportMaximalThread.java
  48. 1
      dxhy-core/src/main/java/com/dxhy/core/thread/ElecExportThread.java
  49. 1
      dxhy-core/src/main/java/com/dxhy/core/util/InvoiceQueryUtil.java
  50. 1
      dxhy-erp/src/main/java/com/dxhy/erp/service/ElectronService.java
  51. 8
      dxhy-erp/src/main/java/com/dxhy/erp/service/SignedService.java
  52. 4
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/CustomsSignServiceImpl.java
  53. 2
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/RequestRecordServiceImpl.java
  54. 1
      dxhy-erp/src/main/java/com/dxhy/erp/utils/InvoiceQueryUtil.java
  55. 1
      dxhy-erp/src/main/java/com/dxhy/erp/utils/InvoiceQueryUtilTaxNo.java
  56. 18
      dxhy-erp/src/main/java/com/dxhy/erp/utils/MyThread.java
  57. 1
      dxhy-extend/src/main/java/com/dxhy/extend/controller/ExtIndexController.java
  58. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtDefinitiveStrideYearCopServiceImpl.java
  59. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtFpmxcxServiceImpl.java
  60. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtJxsebbcxServiceImpl.java
  61. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtJxsemxbbcxServiceImpl.java
  62. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtYcfpbbcxServiceImpl.java
  63. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ExtYcfpcxServiceImpl.java
  64. 4
      dxhy-extend/src/main/java/com/dxhy/extend/service/bb/impl/ViolationLogServiceImpl.java
  65. 5
      dxhy-extend/src/main/java/com/dxhy/extend/service/caution/ExtCautionExpirationServiceImpl.java
  66. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/customs/CustomsServiceImpl.java
  67. 5
      dxhy-extend/src/main/java/com/dxhy/extend/service/messagecontrol/ExtMessageControlServiceImpl.java
  68. 2
      dxhy-extend/src/main/java/com/dxhy/extend/service/paper/ExtPaperServiceImpl.java
  69. 7
      dxhy-extend/src/main/java/com/dxhy/extend/service/pool/ExtInvoicePoolServiceImpl.java
  70. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/ExtFprzhrServiceImpl.java
  71. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/ExtQssbServiceImpl.java
  72. 3
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/ExtQstjbServiceImpl.java
  73. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/ExtRzInfoByXfServiceImpl.java
  74. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/ExtRzjgqdServiceImpl.java
  75. 1
      dxhy-extend/src/main/java/com/dxhy/extend/service/tjbb/impl/FbrzybServiceImpl.java
  76. 2
      dxhy-passengerTicket/src/main/java/com/dxhy/passengerticket/service/impl/PassengerInvoiceStatisticsServiceImpl.java
  77. 4
      dxhy-passengerTicket/src/main/java/com/dxhy/passengerticket/service/impl/PassengerTicketServiceImpl.java
  78. 1
      dxhy-sign/src/main/java/com/dxhy/sign/controller/SignFpqsController.java
  79. 1
      dxhy-sign/src/main/java/com/dxhy/sign/service/fpqs/impl/YlSignServiceImpl.java
  80. 1
      dxhy-sign/src/main/java/com/dxhy/sign/service/qsgz/impl/Rules1012ServiceImpl.java

@ -43,7 +43,6 @@ public class SellerUserServiceImpl extends ServiceImpl<SellerUserDao, SysUserEnt
@Override
public PageUtils queryPage(Map<String, Object> params) {
String userName = (String)params.get("userName");
DynamicContextHolder.push(DbConstant.BASICS_READ);
IPage<SysUserEntity> page = this.page(new Query<SysUserEntity>().getPage(params),
new QueryWrapper<SysUserEntity>()
.eq(org.apache.commons.lang3.StringUtils.isNoneBlank(userName), "username", userName)
@ -96,7 +95,6 @@ public class SellerUserServiceImpl extends ServiceImpl<SellerUserDao, SysUserEnt
int pageSize = Integer.parseInt(params.get("limit") + "");
params.put("currIndex", (currPage - 1) * pageSize);
params.put("pageSize", pageSize);
DynamicContextHolder.push("manage" + DbConstant.BUSINESS_READ);
int count = sellerUserDao.queryNoBindCompanyCount(userId, company, params);
List<SysDeptEntity> list = sellerUserDao.queryNoBindCompany(userId, company, params);
return new PageUtils(list, count, Integer.parseInt(params.get("limit") + ""),
@ -111,7 +109,6 @@ public class SellerUserServiceImpl extends ServiceImpl<SellerUserDao, SysUserEnt
int pageSize = Integer.parseInt(params.get("limit") + "");
params.put("currIndex", (currPage - 1) * pageSize);
params.put("pageSize", pageSize);
DynamicContextHolder.push("manage" + DbConstant.BUSINESS_READ);
int count = sellerUserDao.queryBindCompanyCount(userId, company, params);
List<SysDeptEntity> list = sellerUserDao.queryBindCompany(userId, company, params);
return new PageUtils(list, count, Integer.parseInt(params.get("limit") + ""),
@ -122,7 +119,6 @@ public class SellerUserServiceImpl extends ServiceImpl<SellerUserDao, SysUserEnt
public boolean bindCompany(Map<String, Object> params) {
String companys = params.get("company") + "";
String userId = params.get("userId") + "";
DynamicContextHolder.push("manage" + DbConstant.BUSINESS_WRITE);
String[] arr = companys.split(",");
for (String company : arr) {
SysUserCompanyEntity entity = new SysUserCompanyEntity();
@ -137,7 +133,6 @@ public class SellerUserServiceImpl extends ServiceImpl<SellerUserDao, SysUserEnt
public boolean cancelBindCompany(Map<String, Object> params) {
String companys = params.get("company") + "";
String userId = params.get("userId") + "";
DynamicContextHolder.push("manage" + DbConstant.BUSINESS_WRITE);
String[] arr = companys.split(",");
if (arr.length > 0) {
sellerUserDao.deleteCompany(arr, userId);

@ -41,7 +41,6 @@ public class SysBusinessServiceImpl extends ServiceImpl<SysBusinessDao, SysBusin
@Override
public PageUtils queryPage(Map<String, Object> params) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
String businessName = (String)params.get("businessName");
String deptId = (String)params.get("deptId");
String company = (String)params.get("company");

@ -40,7 +40,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptDao, SysDeptEntity> i
@Override
public List<SysDeptEntity> queryList(String company) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysDeptEntity> deptList = baseMapper.queryList(company);
long parentId = 0;
if (StringUtils.isNotBlank(company)) {
@ -56,7 +55,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptDao, SysDeptEntity> i
@Override
public List<SysDeptEntity> queryList(String company, long parentId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysDeptEntity> deptList = baseMapper.queryList(company);
if(parentId == -1){
parentId = 0;
@ -139,13 +137,11 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptDao, SysDeptEntity> i
@Override
public List<SysDeptEntity> queryListUser(String company) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryListUser(company);
}
@Override
public List<SysDeptEntity> queryListParentTree(String company) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysDeptEntity> deptList = baseMapper.queryListParent(company);
long parentId = 0;
if (StringUtils.isNotBlank(company)) {

@ -30,7 +30,6 @@ public class SysDicttypeServiceImpl extends ServiceImpl<SysDicttypeDao, SysDictt
@Override
public PageUtils queryPage(Map<String, Object> params) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
String dicttypename = (String)params.get("dicttypename");
String dicttypecode = (String)params.get("dicttypecode");
@ -44,21 +43,18 @@ public class SysDicttypeServiceImpl extends ServiceImpl<SysDicttypeDao, SysDictt
@Override
public Integer queryCode(String code, Long dictTypeId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return Math.toIntExact(baseMapper.selectCount(new QueryWrapper<SysDicttypeEntity>().eq("dicttypecode", code)
.ne(dictTypeId != null, "dicttypeid", dictTypeId)));
}
@Override
public SysDicttypeEntity queryDicttypeById(Long id) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectById(id);
}
@Override
public void saveDicttype(SysDicttypeEntity dict) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).insertType(dict);
}
@ -69,7 +65,6 @@ public class SysDicttypeServiceImpl extends ServiceImpl<SysDicttypeDao, SysDictt
@Override
public void updateDictType(SysDicttypeEntity dict) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).updateType(dict);
}
@ -81,7 +76,6 @@ public class SysDicttypeServiceImpl extends ServiceImpl<SysDicttypeDao, SysDictt
@Override
public void deleteDictType(Long id) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).deleteType(id);
}

@ -31,7 +31,6 @@ public class SysIpServiceImpl extends ServiceImpl<SysIpDao, SysIpEntity> impleme
@Override
public PageUtils queryPage(Map<String, Object> params) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
String deptId = (String)params.get("deptId");
IPage<SysIpEntity> page = this.page(new Query<SysIpEntity>().getPage(params),
@ -42,7 +41,6 @@ public class SysIpServiceImpl extends ServiceImpl<SysIpDao, SysIpEntity> impleme
@Override
public void saveIp(SysIpEntity ip) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
ip.setCreateTime(DateUtil.date());
ip.setUpdateTime(DateUtil.date());
Aops.getSelf(this).insert(ip);
@ -56,7 +54,6 @@ public class SysIpServiceImpl extends ServiceImpl<SysIpDao, SysIpEntity> impleme
@Override
public void update(SysIpEntity ip) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
ip.setUpdateTime(DateUtil.date());
Aops.getSelf(this).updateId(ip);
}
@ -68,7 +65,6 @@ public class SysIpServiceImpl extends ServiceImpl<SysIpDao, SysIpEntity> impleme
@Override
public void deleteBatch(Long id) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).deleteId(id);
}
@ -79,7 +75,6 @@ public class SysIpServiceImpl extends ServiceImpl<SysIpDao, SysIpEntity> impleme
@Override
public SysIpEntity queryById(Long id) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectById(id);
}

@ -64,13 +64,11 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public List<SysMenuEntity> queryListParentId(Long parentId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryListParentId(parentId);
}
@Override
public List<SysMenuEntity> queryNotButtonList() {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryNotButtonList();
}
@ -84,18 +82,15 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
}
public List<SysMenuEntity> queryMenu() {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectList(new QueryWrapper<SysMenuEntity>().orderByAsc("order_num"));
}
public List<SysMenuEntity> queryMenuRoleList(Long userId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryMenuRoleList(userId);
}
@Override
public void delete(Long menuId) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).deleteMenu(menuId);
// 查询所有菜单数据
List<SysMenuEntity> menuList = baseMapper.selectList(null);
@ -112,7 +107,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public PageUtils queryPage(Map<String, Object> params) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
String menuId = (String)params.get("menuId");
IPage<SysMenuEntity> page = this.page(new Query<SysMenuEntity>().getPage(params),
new QueryWrapper<SysMenuEntity>().eq(StringUtils.isNotBlank(menuId), "parent_id", menuId)
@ -122,7 +116,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public List<SysMenuEntity> querylistMenu(String company, Long userId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysMenuEntity> menuList;
if (StringUtils.isBlank(company)) {
menuList = baseMapper.selectList(null);
@ -135,7 +128,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public boolean saveMenu(SysMenuEntity menu) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
boolean flg = Aops.getSelf(this).insertMenu(menu);
// 查询所有菜单数据
@ -157,7 +149,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public List<SysMenuEntity> selectList() {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysMenuEntity> menuList = baseMapper.selectList(null);
return sysUserService.getChildPerms(menuList, 0);
@ -165,7 +156,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public boolean updateMenu(SysMenuEntity menu) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
boolean flg = Aops.getSelf(this).update(menu);
// 查询所有菜单数据
List<SysMenuEntity> menuList = this.selectList();
@ -206,26 +196,21 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public SysMenuEntity queryMenuById(Long id) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectById(id);
}
@Override
public List<SysMenuEntity> queryMenuLog(String menuUrl) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryMenuLog(menuUrl);
}
@Override
public SysMenuEntity queryMenuType(String url, int type, String systemCode) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryMenuType(url, type, systemCode);
}
@Override
public void saveMenuBatch(List<SysMenuEntity> menu) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).insertMenuBatch(menu);
// 查询所有菜单数据
List<SysMenuEntity> menuList = this.selectList();
@ -237,7 +222,6 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
if (StringUtils.isBlank(company)) {
return null;
}
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysMenuEntity> sysMenuEntities;
if (SysConfig.ZXQY.equals(company)) {
sysMenuEntities = this.queryMenu();
@ -274,13 +258,11 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
@Override
public List<SysMenuEntity> getQueryList(long menuId, int type) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectList(new QueryWrapper<SysMenuEntity>().eq("parent_id", menuId).eq("type", type));
}
@Override
public List<Long> queryIdList(List<Long> menuIds) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryIdList(menuIds);
}

@ -48,7 +48,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
public PageUtils queryPage(Map<String, Object> params) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
String roleName = (String)params.get("roleName");
String deptId = (String)params.get("deptId");
String company = (String)params.get("company");
@ -71,7 +70,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
public void saveRole(SysRoleEntity role) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
role.setCreateTime(DateUtil.date());
role.setUpdateTime(DateUtil.date());
Aops.getSelf(this).insertRole(role);
@ -89,7 +87,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
public void update(SysRoleEntity role) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
role.setUpdateTime(DateUtil.date());
Aops.getSelf(this).updateRole(role);
// 刷新角色缓存
@ -110,7 +107,6 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
public void deleteBatch(Long roleIds) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).deleteRole(roleIds);
}
@ -127,20 +123,17 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleDao, SysRoleEntity> i
@Override
public List<SysRoleEntity> selectCompany(String company) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper
.selectList(new QueryWrapper<SysRoleEntity>().eq(StringUtils.isNotBlank(company), "company", company));
}
@Override
public List<SysRoleEntity> queryRoleList() {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectList(null);
}
@Override
public SysRoleEntity queryRoleById(Long id) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectById(id);
}

@ -26,14 +26,12 @@ public class SysRulesDeptServiceImpl extends ServiceImpl<SysRulesDeptDao, SysRul
implements SysRulesDeptService {
@Override
public List<SysRulesDeptEntity> getRuleDept(Long ruleId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return this.baseMapper.selectList(new QueryWrapper<SysRulesDeptEntity>().eq("rule_id", ruleId));
}
@Override
public void deleteBatchRules(Long ruleId, Long deptId) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).deleteRules(ruleId, deptId);
}
@ -44,7 +42,6 @@ public class SysRulesDeptServiceImpl extends ServiceImpl<SysRulesDeptDao, SysRul
@Override
public void saveRulesDept(List<SysRulesDeptEntity> list) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).insertRulesDept(list);
}

@ -66,7 +66,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
return 2;
}
}
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).insertTablate(sysTabulateEntities);
List<SysTabulateEntity> tablates =
@ -107,7 +106,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
@Override
public int getTablateCount(String menuCode, String menuId, String tabulateName, String tabulateCode) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return Math.toIntExact(this.count(new QueryWrapper<SysTabulateEntity>().eq("menu_id", menuId)
.eq(StringUtils.isNotBlank(menuCode), "menu_code", menuCode)
.eq(StringUtils.isNotBlank(tabulateName), "tabulate_name", tabulateName)
@ -118,7 +116,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
public int updateTablate(SysTabulateEntity sysTabulateEntity) {
SysTabulateDeptEntity tabulateDeptEntity;
List<SysTabulateDeptEntity> tabulateDeptList = new ArrayList<>();
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
sysTabulateEntity.setUpdateDate(DateUtil.date());
try {
@ -160,7 +157,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
@Override
public int deleteTabulate(long tabulateId) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
try {
Aops.getSelf(this).deleteTabulateTr(tabulateId);
return 1;
@ -175,7 +171,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
@Override
public List<SysTabulateEntity> getTablate(String menuCode, String menuId, String tabulateName, String tabulateCode,
boolean defaultStatus) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.selectList(new QueryWrapper<SysTabulateEntity>().eq("menu_id", menuId)
.eq(StringUtils.isNotBlank(menuCode), "menu_code", menuCode)
.eq(StringUtils.isNotBlank(tabulateName), "tabulate_name", tabulateName)
@ -186,7 +181,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
@Override
public PageUtils queryPage(Map<String, Object> params) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
String menuId = (String)params.get("menuId");
String menuCode = (String)params.get("menuCode");
String tabulateName = (String)params.get("tabulateName");
@ -258,7 +252,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
tabulateEntity.setIndexType(false);
}
}
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
this.updateTablateList(tablateList);
return true;
} catch (Exception e) {
@ -270,7 +263,6 @@ public class SysTabulateServiceImpl extends ServiceImpl<SysTabulateDao, SysTabul
@Override
public void updateTabulateMenuId(List<TabulateMenuModel> menuIdModels) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).updateTabulateMenuIdTran(menuIdModels);
// 获取根据菜单id 获取显示列表信息,并重新创建显示列表信息

@ -26,7 +26,6 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserR
implements SysUserRoleService {
@Override
public void saveOrUpdate(Long userId, List<Long> roleIdList) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).insertUserRole(userId, roleIdList);
}
@ -52,13 +51,11 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserR
@Override
public List<Long> queryRoleIdList(Long userId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryRoleIdList(userId);
}
@Override
public int deleteBatch(Long roleIds) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
return Aops.getSelf(this).deleteUserRole(roleIds);
}
@ -69,13 +66,11 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleDao, SysUserR
@Override
public List<SysRoleEntity> queryRole(Long userId) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return baseMapper.queryRole(userId);
}
@Override
public void delete(Long userId) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
Aops.getSelf(this).deleteUser(userId);
}

@ -61,8 +61,6 @@ public class BaseFpcjmxServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoic
@Override
public String selectCjmxByGfshAndCjrq(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
String[] titlelist = {"序号", "发票代码", "发票号码","全电发票号码", "开票日期", "购方名称", "销方名称", "金额", "税额"};
String[] titleprop = {"xh", "fpdm", "fphm","qdfphm", "kprq", "gfmc", "xfmc", "je", "se"};
@ -137,7 +135,6 @@ public class BaseFpcjmxServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoic
@Override
public String selectWbfpmx(Map<String, Object> pramsMap, int curr, int size) {
List<BaseTDxRecordInvoice> resultList = new ArrayList<>();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
String company = (String)pramsMap.get("company");
String menuId = (String)pramsMap.get("menuId");
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);
@ -252,7 +249,6 @@ public class BaseFpcjmxServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoic
}
this.saveInvoiceDetail(invoiceDetailList);
} else if (FplxEnum.JDC.getFplxDm().equals(invoiceType)) {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
JSONObject jdcInvoiceDetailJson = detailArray.getJSONObject(0);
String invoiceCode = jdcInvoiceDetailJson.getString("invoiceCode");
@ -264,7 +260,6 @@ public class BaseFpcjmxServiceImpl extends MpBaseServiceImpl<BaseTDxRecordInvoic
this.saveJdcDetail(jdcInvoiceDetail);
}
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
// 根据uuid更新明细是否存在标志
super.baseMapper.updateDetailYesornoByUuid(uuid);
}

@ -72,7 +72,6 @@ public class BaseStatisticalEnterpriseServiceImpl extends MpBaseServiceImpl<Base
@Override
public String selectEnterpriseByGfsbhAndSkssq(Map<String, Object> pramsMap, int curr, int size, int count) {
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String tjflag = (String)pramsMap.get("tjflag");

@ -49,8 +49,6 @@ public class DataSourceAspect {
value = targetDataSource.name();
}
DynamicContextHolder.push(value);
log.debug("set datasource is {}", value);
}
try {

@ -175,7 +175,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
// 随机生成32位批次号
String batchNo = getBatchNo();
stateData.setBatchNo(batchNo);
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
stateData.setStatusChangeDateBegin(getStateBeginTime(taxno, "12"));
stateData.setStatusChangeDateEnd(getEndTime());
stateData.setStartRow(1);
@ -246,16 +245,13 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
try {
// 查询数据库 遍历数据源
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<String> dbList = confirmDao.getDbSource();
for (String db : dbList) {
String dataExchangeId = getDataExchangeId();
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 查询认证申请记录表中状态为N的批次号
List<TDxCustomsApplyRecord> list = tDxCustomsRecordDao.getBatchNo("1");
if (list != null && list.size() > 0) {
for (TDxCustomsApplyRecord tDxCustomsApplyRecord : list) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", tDxCustomsApplyRecord.getGfTaxNo()));
if (baseSysDeptCfg != null) {
@ -314,7 +310,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
// 转换失败原因
String failCode = exchangeFailCode(legalizeResult.getFailureReason());
legalizeResult.setFailureReason(failCode);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
if ("2".equals(legalizeResult.getRzlx())) {
// 退税认证
customsLog.setType("7");
@ -382,7 +377,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
}
} catch (Exception e) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
tDxHttpLog.setStatus("2");
confirmDao.insert(tDxHttpLog);
e.printStackTrace();
@ -408,22 +402,18 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
tDxHttpLog.setType("13");
try {
// 查询数据库 遍历数据源
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<String> dbList = confirmDao.getDbSource();
for (String db : dbList) {
String dataExchangeId = getDataExchangeId();
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 查询汇总需要发送认证缴款书的税号
List<String> taxList = tDxCustomsRecordDao.getNeedSendTaxNo();
for (String taxno : taxList) {
TAcOrg org = selectIdAndKey(taxno);
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", taxno));
if (baseSysDeptCfg != null) {
continue;
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 通过税号查询发票数据
// 查询需要发送认证的缴款书
int count = tDxCustomsRecordDao.getApplyCustomsCount(taxno);
@ -482,7 +472,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
tDxHttpLog.setResText(responseJson);
tDxHttpLog.setResDate(new Date());
log.info("响应请求数据为=" + responseJson);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
try {
if (responseJson != null) {
ResponesJson gatherData =
@ -530,23 +519,19 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
tDxHttpLog.setType("15");
try {
// 查询数据库 遍历数据源
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<String> dbList = confirmDao.getDbSource();
for (String db : dbList) {
// 流水号
String dataExchangeId = getDataExchangeId();
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 查询汇总需要发送录入缴款书的税号
List<String> taxList = tDxCustomsRecordDao.getNeedUploadTaxNo();
for (String taxno : taxList) {
TAcOrg org = selectIdAndKey(taxno);
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh",taxno));
if (baseSysDeptCfg != null) {
continue;
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 通过税号查询发票数据// 查询需要发送录入的缴款书
int count = tDxCustomsRecordDao.getUploadCustomsCount(taxno);
if (count > 0) {
@ -594,7 +579,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
tDxHttpLog.setResText(responseJson);
tDxHttpLog.setResDate(new Date());
log.info("响应请求数据为=" + responseJson);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
try {
if (responseJson != null) {
ResponesJson gatherData =
@ -644,16 +628,13 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
try {
// 查询数据库 遍历数据源
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<String> dbList = confirmDao.getDbSource();
for (String db : dbList) {
String dataExchangeId = getDataExchangeId();
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 查询录入申请记录表中状态为N的批次号
List<TDxCustomsApplyRecord> list = tDxCustomsRecordDao.getBatchNo("2");
if (list != null && list.size() > 0) {
for (TDxCustomsApplyRecord tDxCustomsApplyRecord : list) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", tDxCustomsApplyRecord.getGfTaxNo()));
if (baseSysDeptCfg != null) {
@ -723,7 +704,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
} else if ("5".equals(uploadBackInfo.getAuthState())) {
updateRecord.setCollectUploadStatus("3");
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
tDxCustomsRecordDao.updateUploadResult(updateRecord);
tDxCustomsRecordDao.updateApply(uploadBackInfo.getCustomsCode(), "2");
@ -732,7 +712,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
}
} catch (Exception e) {
DynamicContextHolder.push(DbConstant.BUSINESS_WRITE);
tDxHttpLog.setStatus("2");
confirmDao.insert(tDxHttpLog);
e.printStackTrace();
@ -778,7 +757,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
private String getBeginTime(String taxno, String db) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
String lastTime = tDxCustomsRecordDao.selectLastCustomsDate(taxno);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
if (lastTime == null || "".equals(lastTime)) {
@ -852,7 +830,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
private TAcOrg selectIdAndKey(String taxno) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
// 通过税号查询id和Key
return confirmDao.findIdAndKeyByTaxno(taxno);
}
@ -874,7 +851,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
for (CustomsInfo info : list) {
// 判断库里是否已经存在,存在则只更新状态更新时间,认证状态以及相关字段更新
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
TDxCustomsRecordJob entity = tDxCustomsRecordDao.getByCustomsCode(info.getCustomsNo());
int export = tDxCustomsRecordDao.getExportByCustomsCode(info.getCustomsNo());
@ -960,7 +936,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
if (flag) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
tDxCustomsRecordDao.updateCustoms(entity);
}
@ -974,7 +949,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
record.setCompany(company);
record.setGfName(taxName);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
tDxCustomsRecordDao.insert(record);
CustomsLog customsLog = new CustomsLog();
customsLog.setCustomsCode(info.getCustomsNo());
@ -988,7 +962,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
httpLog.setStatus("1");
httpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
confirmDao.insert(httpLog);
if (logList.size() > 0) {
@ -996,7 +969,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
} catch (Exception e) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
httpLog.setStatus("2");
httpLog.setTotal(total);
confirmDao.insert(httpLog);
@ -1045,13 +1017,11 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
default:
break;
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
tDxCustomsRecordDao.updateCustomsState(state);
}
} else {
// 更新发票数据
state.setBdkStatus("0");
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
tDxCustomsRecordDao.updateCustomsState(state);
}
@ -1066,7 +1036,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
}
tDxHttpLog.setStatus("1");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
confirmDao.insert(tDxHttpLog);
if (logList.size() > 0) {
logService.toCustomsLog(logList);
@ -1075,7 +1044,6 @@ public class CustomsInterfaceServiceImpl implements CustomsInterfaceService {
} catch (Exception e) {
tDxHttpLog.setStatus("2");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
confirmDao.insert(tDxHttpLog);
e.printStackTrace();
}

@ -112,7 +112,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
collectData.setTaxno(taxno);
collectData.setDataType(dataType);
collectData.setInvoiceType(invoiceType[i]);
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
String dataStr = JSONObject.toJSONString(collectData);
log.info("data:" + dataStr);
String base64Data = Base64.encode(dataStr);
@ -150,7 +149,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
httpLog.setStatus("0");
httpLog.setCompany(company);
httpLog.setInvoiceType(invoiceType[i]);
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
// 根据data里判断是否需要继续请求
JSONArray array = JSONArray.parseArray(dataJson);
@ -210,7 +208,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
httpLog.setStatus("0");
httpLog.setCompany(company);
httpLog.setInvoiceType(invoiceType[i]);
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
invoiceDownDao.insert(httpLog);
}
}
@ -284,10 +281,8 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
@Override
public void parse(String taxno, String db) throws IOException {
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
List<TDxHttpLogInvoiceDown> logs = getNotParseHttpLogs(taxno);
if (logs != null && logs.size() > 0) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
this.updateNotParseHttpLogsStatus(logs);
for (TDxHttpLogInvoiceDown tDxHttpLog : logs) {
String responseJson = tDxHttpLog.getResText();
@ -306,7 +301,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
if ("0".equals(gather.getInvoiceNum())) {
tDxHttpLog.setStatus("1");
tDxHttpLog.setTotal("0");
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttoLogById(tDxHttpLog);
continue;
}
@ -322,7 +316,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
} else {
tDxHttpLog.setStatus("1");
tDxHttpLog.setTotal("0");
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttoLogById(tDxHttpLog);
}
}
@ -343,12 +336,10 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
if (flg) {
tDxHttpLog.setStatus("2");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttpLogById(tDxHttpLog);
} else {
tDxHttpLog.setStatus("1");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttpLogById(tDxHttpLog);
}
}
@ -367,12 +358,10 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
if (flg) {
tDxHttpLog.setStatus("2");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttpLogById(tDxHttpLog);
} else {
tDxHttpLog.setStatus("1");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttpLogById(tDxHttpLog);
}
}
@ -404,7 +393,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
String no = invoice.getInvoiceNo();
invoice.setUuid(code + no);
invoice.setCompany(company);
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
// 判断是否有数据
TDxRecordInvoiceJobEntity record = null;
if ("1".equals(tDxHttpLog.getDataType())) {
@ -413,7 +401,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
if ("2".equals(tDxHttpLog.getDataType())) {
record = tDxRecordInvoiceJobDao.findSaleInvoiceByCodeAndNo(code, no);
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
if (record != null) {
if ("0".equals(record.getSourceSystem()) || "1".equals(record.getSourceSystem())
|| !record.getInvoiceStatus().equals(invoice.getInvoiceStatus())) {
@ -719,7 +706,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
String invoiceNo = dataPlatformInvoiceInfo.getInvoiceNo();
// 判断库里有无 有-更新 无-插入
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
TDxRecordInvoiceJobEntity invoice = null;
if ("1".equals(tDxHttpLog.getDataType())) {
invoice = tDxRecordInvoiceJobDao.findInvoiceByCodeAndNo(invoiceCode, invoiceNo);
@ -757,14 +743,12 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
} catch (Exception e) {
tDxHttpLog.setStatus("2");
tDxHttpLog.setTotal("0");
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttpLogById(tDxHttpLog);
e.printStackTrace();
return;
}
tDxHttpLog.setStatus("1");
tDxHttpLog.setTotal(total);
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateHttpLogById(tDxHttpLog);
}
@ -818,7 +802,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
} else {
invoice.setDetailYesorno("0");
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
invoiceDownDao.updateRecordInvoice(invoice);
}
if ("2".equals(tDxHttpLog.getDataType())) {
@ -829,7 +812,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
} else {
invoice.setDetailYesorno("0");
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
if (invoice.getBuyerName() != null) {
invoice.setBuyerName(changeBrackets(invoice.getBuyerName()));
}
@ -852,7 +834,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
private void insertDataPlatformLog(RecordInvoiceDownModel dataPlatformInvoiceInfo, String db) {
// 插入日志信息
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
DataPlatformInvoiceLog data = new DataPlatformInvoiceLog();
data.setInvoiceCode(dataPlatformInvoiceInfo.getInvoiceCode());
data.setInvoiceNo(dataPlatformInvoiceInfo.getInvoiceNo());
@ -910,7 +891,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
invoice.setCompany(dataPlatformInvoiceInfo.getCompany());
//记录通道来源
invoice.setTdly("1");
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
dataPlatformRecordDao.insert(invoice);
}
if ("2".equals(tDxHttpLog.getDataType())) {
@ -929,7 +909,6 @@ public class InvoiceDownServiceImpl implements InvoiceDownService {
if (invoice.getGfName() != null) {
invoice.setGfName(changeBrackets(invoice.getGfName()));
}
DynamicContextHolder.push(db + DbConstant.BUSINESS_WRITE);
dataPlatformSaleRecordDao.insert(invoice);
}
}

@ -62,22 +62,18 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
@Override
public void getLicenseCode() {
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
List<SysUserEntity> userList = this.baseMapper.getSpCode();
if (userList != null && userList.size() > 0) {
for (SysUserEntity entity : userList) {
if (StringUtils.isBlank(entity.getAuthorizeCode())) {
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
SysUserEntity user = this.baseMapper.getSpCodeByAuthCode(entity.getTaxno(), entity.getSpCode());
if (user != null) {
entity.setAuthorizeCode(user.getAuthorizeCode());
entity.setLastDate(user.getLastDate());
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
this.baseMapper.updateById(entity);
continue;
}
}
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
SysDeptEntity dept = sysDeptService.getById(entity.getDeptId());
List<NameValuePair> list = new ArrayList<>();
list.add(new BasicNameValuePair("uid", uid));
@ -116,7 +112,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
updateEntity.setAuthorizeCode(zcm);
updateEntity.setLastDate(new SimpleDateFormat("yyyyMMdd").parse(jzsj));
updateEntity.setMessage("success");
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
QueryWrapper<SysUserEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("taxno", entity.getTaxno());
queryWrapper.eq("sp_code", entity.getSpCode());
@ -124,7 +119,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
this.baseMapper.update(updateEntity, queryWrapper);
} else {
entity.setMessage(message);
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
this.baseMapper.updateById(entity);
}
@ -140,19 +134,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
@Override
public void getFpzyztp() {
try {
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
List<SysUserEntity> userList = this.baseMapper.listUser();
if (userList != null && userList.size() > 0) {
for (SysUserEntity entity : userList) {
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
SysUserEntity user = this.baseMapper.listUserByTaxno(entity.getTaxno());
if (user != null) {
entity.setFpzyztp(user.getFpzyztp());
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
this.baseMapper.updateById(entity);
continue;
}
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
SysDeptEntity dept = sysDeptService.getById(entity.getDeptId());
if (dept != null) {
String accessToken = getToken();
@ -192,7 +182,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
String fpzyztp = dataObject.getString("FPZYZTP");
if (StringUtils.isNotBlank(fpzyztp)) {
entity.setFpzyztp(fpzyztp);
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
this.baseMapper.updateById(entity);
}
}
@ -210,19 +199,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
@Override
public void getSignatureId() {
try {
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
List<SysUserEntity> userList = this.baseMapper.listUserToSignatureId();
if (userList != null && userList.size() > 0) {
for (SysUserEntity entity : userList) {
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
SysUserEntity user = this.baseMapper.listUserToSignatureIdByTaxno(entity.getTaxno());
if (user != null) {
entity.setSignatureId(user.getSignatureId());
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
this.baseMapper.updateById(entity);
continue;
}
DynamicContextHolder.push("business" + DbConstant.BASICS_READ);
SysDeptEntity dept = sysDeptService.getById(entity.getDeptId());
if (dept != null) {
String accessToken = getToken();
@ -259,7 +244,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUserEntity> i
String qzid = dataObject.getString("QZID");
if (StringUtils.isNotBlank(qzid)) {
entity.setSignatureId(qzid);
DynamicContextHolder.push("business" + DbConstant.BASICS_WRITE);
this.baseMapper.updateById(entity);
}
}

@ -49,7 +49,6 @@ public class ViolationMsgServiceImpl implements ViolationMsgService {
for (SysDept dept : deptList) {
List<String> orgList = violationTaxnoService.selectTaxnoByCompany(dept.getCompany());
if (orgList != null && orgList.size() > 0) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", orgList));
if (baseSysDeptCfg != null) {
@ -59,7 +58,6 @@ public class ViolationMsgServiceImpl implements ViolationMsgService {
int year = localDate.getYear() - 2;
List<TDxViolationTaxno> taxnoList = violationTaxnoService.selectViolationTaxno(dept.getCompany(),
year + "-01-01", orgList, dept.getDbName());
DynamicContextHolder.push(dept.getDbName() + DbConstant.BUSINESS_WRITE);
violationTaxnoService.insertTaxno(taxnoList, dept.getCompany());
}
}
@ -68,14 +66,12 @@ public class ViolationMsgServiceImpl implements ViolationMsgService {
@Override
public void getViolation() {
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ);
// List<TDxViolationTaxno> list =
// violationTaxnoService.list(Wrappers.<TDxViolationTaxno>query().groupBy("xf_tax_no"));
List<TDxViolationTaxno> list = violationTaxnoService.selectViolationTaxnoByXf();
if (list != null && list.size() > 0) {
Map<String, List<String>> map = new HashMap<>();
for (TDxViolationTaxno tax : list) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", tax.getGfTaxNo()));
if (baseSysDeptCfg != null) {

@ -57,10 +57,8 @@ public class ViolationRecordServiceImpl extends ServiceImpl<TDxViolationRecordDa
@Override
public void sendViolationRequest(String gfTaxNo, List<String> xfTaxNoList) {
DynamicContextHolder.push(DbConstant.BASICS_READ);// 切换数据源
SysDept sysDept = this.baseMapper.selectDeptIdAndKey(gfTaxNo);
if (sysDept != null) {
DynamicContextHolder.push(sysDept.getDbName() + DbConstant.BUSINESS_READ);// 切换数据源
// 请求通用头
GlobalInfo globalInfo = new GlobalInfo();
// 请求通用
@ -133,7 +131,6 @@ public class ViolationRecordServiceImpl extends ServiceImpl<TDxViolationRecordDa
violationRecord.setCreateDate(new Date());
list.add(violationRecord);
}
DynamicContextHolder.push(sysDept.getDbName() + DbConstant.BUSINESS_WRITE);// 切换数据源
this.saveBatch(list);
tDxHttpLogDao.insert(httpLog);
}
@ -151,7 +148,6 @@ public class ViolationRecordServiceImpl extends ServiceImpl<TDxViolationRecordDa
BatchData batchData = new BatchData();// 批次号类
try {
String dataExchangeId = getDataExchangeId();// 流水号
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ);
List<TDxViolationRecord> list = this.baseMapper.selectRecordNoResult();// 查询认证申请记录表中状态为N的批次号
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
@ -208,7 +204,6 @@ public class ViolationRecordServiceImpl extends ServiceImpl<TDxViolationRecordDa
}
}
if (violationLogs.size() > 0) {
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE);
//先删除在添加
violationLogService.remove(new QueryWrapper<TDxViolationLog>().eq("xf_tax_no", violationLogs.get(0).getXfTaxNo()));
violationLogService.saveBatch(violationLogs);
@ -218,7 +213,6 @@ public class ViolationRecordServiceImpl extends ServiceImpl<TDxViolationRecordDa
violationRecord.setUpdateDate(new Date());
QueryWrapper<TDxViolationRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("batch_no", batchNo);
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE);
this.update(violationRecord, queryWrapper);
if (xfList != null && xfList.size() > 0) {
this.baseMapper.updateRecordValid(xfList);

@ -46,7 +46,6 @@ public class FpcjServiceImpl extends MpBaseServiceImpl<FpcjhzLbDao, FpcjCjhzResp
json.put("total", "0");
json.put("datalist", new ArrayList<FpcjCjhzRespVO>());
} else {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 合计信息,仅第一页时需要统计,减少数据库压力
if (curr == 1) {
String hjsl = "0";

@ -47,7 +47,6 @@ public class FpcjmxServiceImpl extends MpBaseServiceImpl<TDxRecordInvoiceDao, TD
// 未从getUserInfo()获取到购方税号信息
json.put("datalist", new ArrayList<FpcjWbfpmxRespVO>());
} else {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 合计信息,仅第一页时需要统计,减少数据库压力
if (curr == 1) {

@ -44,7 +44,6 @@ public class FpmxcxServiceImpl extends MpBaseServiceImpl<BbfpmxDao, BbfpmxcxResp
JSONObject json = new JSONObject();
try {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
PageHelper.startPage(curr, size);
pramsMap.put("dxhyTertiary", dxhyTertiary);

@ -51,7 +51,6 @@ public class FpqsServiceImpl extends MpBaseServiceImpl<TDxRecordInvoiceDao, TDxR
@Override
public JSONObject selectQsfpList(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();

@ -37,7 +37,6 @@ public class FprzybServiceImpl extends MpBaseServiceImpl<FprzybDao, FprzybRespVO
public JSONObject selectByGfshAndRznf(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
String zjsl = "0";
String zjje = "0";
String zjse = "0";
@ -99,7 +98,6 @@ public class FprzybServiceImpl extends MpBaseServiceImpl<FprzybDao, FprzybRespVO
@Override
public JSONObject selectRzfphzByRznf(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
String zjsl = "0";
String zjje = "0";

@ -40,7 +40,6 @@ public class FpzhcxServiceImpl extends MpBaseServiceImpl<BbfpzhDao, BbfpzhcxResp
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String gfsh = (String) pramsMap.get("gfsh");

@ -65,7 +65,6 @@ public class FpzhcxmxServiceImpl extends MpBaseServiceImpl<BbfpzhmxDao, Bbfpzhmx
json.put("total", "0");
json.put("datalist", new ArrayList<BbfpzhmxcxRespVO>());
} else {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
PageHelper.startPage(curr, size);
pramsMap.put("dxhyAdmin", dxhyAdmin);

@ -43,7 +43,6 @@ public class FpzhcxslServiceImpl extends MpBaseServiceImpl<BbfpzhslDao, Bbfpzhsl
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String gfsh = (String) pramsMap.get("gfsh");

@ -42,7 +42,6 @@ public class GxfpqrServiceImpl extends MpBaseServiceImpl<GxfpqrDao, FpRzRespVO>
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {
List<String> gfshList = (List<String>)pramsMap.get("gfsh");

@ -29,7 +29,6 @@ public class JxsemxbbcxServiceImpl extends MpBaseServiceImpl<JxsemxbbDao, Jxsemx
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {

@ -41,7 +41,6 @@ public class LqFpycxxServiceImpl extends MpBaseServiceImpl<LqFpycxxDao, TdxLqDkF
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {
@ -85,7 +84,6 @@ public class LqFpycxxServiceImpl extends MpBaseServiceImpl<LqFpycxxDao, TdxLqDkF
@Override
public JSONObject selectCustomYcxxByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {
LambdaQueryWrapper<TdxLqDkCustomFpycxx> lambdaQueryWrapper = new LambdaQueryWrapper();

@ -40,8 +40,6 @@ public class RzjgqdServiceImpl extends MpBaseServiceImpl<RzjgqdDao, RzjgqdRespVO
public JSONObject rzjgByGfshAndSkssq(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
PageHelper.startPage(curr, size);
List<RzjgqdRespVO> pageList = super.baseMapper.rzjgByGfshAndSkssq(pramsMap);
PageInfo<RzjgqdRespVO> pageInfo = new PageInfo<>(pageList);

@ -24,8 +24,6 @@ public class TtFprzhzServiceImpl extends MpBaseServiceImpl<TtFprzhzDao, TtFprzhz
@Override
public JSONObject queryInvoiceCertification(Map<String, Object> params, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(params.get("dbName") + DbConstant.BUSINESS_READ);
PageHelper.startPage(curr, size);
List<TtFprzhzRespVo> pageList = this.baseMapper.queryInvoiceList(params);
PageInfo<TtFprzhzRespVo> pageInfo = new PageInfo<>(pageList);

@ -44,7 +44,6 @@ public class YcfpbbcxServiceImpl extends MpBaseServiceImpl<BbycfpbbcxDao, Bbycfp
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {

@ -39,8 +39,6 @@ public class YcfpcxServiceImpl extends MpBaseServiceImpl<BbycfpcxDao, BbycfpcxRe
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {
List<String> gfshList = (List<String>)pramsMap.get("gfsh");

@ -39,7 +39,6 @@ public class YqfpcxServiceImpl extends MpBaseServiceImpl<BbyqfpDao, BbyqfpRespVO
@Override
public JSONObject selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
JSONObject json = new JSONObject();
try {
PageHelper.startPage(curr, size);

@ -27,7 +27,6 @@ public class CoreInvoiceLogServiceImpl extends ServiceImpl<InvoiceLogDao, Invoic
@Override
public void saveLog(List<InvoiceLogEntity> logs) {
List<InvoiceLogEntity> invoiceLogs = new ArrayList<>();
DynamicContextHolder.push(DbConstant.BASICS_READ);
for (InvoiceLogEntity invoiceLogEntity : logs) {
if ("1".equals(invoiceLogEntity.getType())) {
Integer logNum = recordInvoiceJobDao.getInvoiceLog(invoiceLogEntity.getInvoiceCode(),
@ -40,7 +39,6 @@ public class CoreInvoiceLogServiceImpl extends ServiceImpl<InvoiceLogDao, Invoic
}
}
if (invoiceLogs.size() > 0) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
this.insertLog(invoiceLogs);
}
}

@ -19,7 +19,6 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogDao, SysLogEntity> impl
@Override
public void saveLog(List<SysLogEntity> logs) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
this.insertLog(logs);
}

@ -77,7 +77,6 @@ public class CoreSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl<TDxRecordI
// 机动车票
if (vehicleSaleInvoice != null) {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
this.saveVehicleSaleInvoice(vehicleSaleInvoice, invoiceStatistics, uuid, invoiceCode, invoiceNo,
queryInvoiceResult);
}
@ -94,7 +93,6 @@ public class CoreSaveInvoiceInfoServiceImpl extends MpBaseServiceImpl<TDxRecordI
invoiceDetail.saveBatch(recordInvoiceDetail, batchSize);
// 保存税率表,更新明细存在标志
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
this.saveVehicleSaleInvoice(null, invoiceStatistics, uuid, invoiceCode, invoiceNo, queryInvoiceResult);
}

@ -29,12 +29,10 @@ public class ApplyTask {
public void applyStat() {
log.info("申请统计定时任务开始--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("applyTask", "applyStat");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
applyService.getDataForApply();
log.info("申请统计定时任务结束--");

@ -29,12 +29,10 @@ public class ConfirmTask {
public void taxnoBelongGet() {
log.info("属期获取定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("confirmTask", "taxnoBelongGet");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
confirmService.getTaxCurrent();
log.info("属期获取定时任务结束--");
@ -43,7 +41,6 @@ public class ConfirmTask {
} finally {
log.info("属期获取--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -51,12 +48,10 @@ public class ConfirmTask {
public void ltgalizeResult() {
log.info("认证结果获取定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("confirmTask", "ltgalizeResult");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
confirmService.getLtgalizeResult();
log.info("认证结果获取定时任务结束--");
@ -65,7 +60,6 @@ public class ConfirmTask {
} finally {
log.info("认证结果获取--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -73,12 +67,10 @@ public class ConfirmTask {
public void applyLtgalize() {
log.info("申请认证定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("confirmTask", "applyLtgalize");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
confirmService.invoiceLegalize();
log.info("申请认证定时任务结束--");
@ -87,7 +79,6 @@ public class ConfirmTask {
} finally {
log.info("申请认证--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}

@ -51,20 +51,16 @@ public class CustomsInterfaceTask {
public void getCustoms() throws InterruptedException {
log.info("获取海关缴款书开始!--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("customsInterfaceTasks", "getCustoms");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<TAcOrg> taxnoList = confirmDao.getTaxno();
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(taxnoList.size()), new ThreadPoolExecutor.CallerRunsPolicy());
for (TAcOrg org : taxnoList) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", org.getTaxno()));
if (baseSysDeptCfg != null) {
@ -88,7 +84,6 @@ public class CustomsInterfaceTask {
} finally {
log.info("获取海关缴款书--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -97,22 +92,18 @@ public class CustomsInterfaceTask {
public void getCustomsState() throws InterruptedException {
log.info("缴款书状态获取接口执行开始-");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("customsInterfaceTasks", "getCustomsState");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<TAcOrg> list = confirmDao.getTaxno();
// 准备请求参数
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(list.size()), new ThreadPoolExecutor.CallerRunsPolicy());
for (TAcOrg org : list) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", org.getTaxno()));
if (baseSysDeptCfg != null) {
@ -134,7 +125,6 @@ public class CustomsInterfaceTask {
} finally {
log.info("缴款书状态获取--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -143,13 +133,11 @@ public class CustomsInterfaceTask {
public void customsLtgalizeResult() {
log.info("缴款书认证结果获取定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("customsInterfaceTasks", "customsLtgalizeResult");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
customsInterfaceService.getLtgalizeResult();
log.info("缴款书认证结果获取定时任务结束--");
@ -158,7 +146,6 @@ public class CustomsInterfaceTask {
} finally {
log.info("缴款书认证结果--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -166,13 +153,11 @@ public class CustomsInterfaceTask {
public void applyCustomsLtgalize() {
log.info("缴款书申请认证定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("customsInterfaceTasks", "applyCustomsLtgalize");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
customsInterfaceService.customsLegalize();
log.info("缴款书申请认证定时任务结束--");
@ -181,7 +166,6 @@ public class CustomsInterfaceTask {
} finally {
log.info("缴款书申请认证--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -190,13 +174,11 @@ public class CustomsInterfaceTask {
public void customsEntryResult() {
log.info("缴款书录入结果获取定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("customsInterfaceTasks", "customsEntryResult");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
customsInterfaceService.customsEntryResult();
log.info("缴款书录入结果获取定时任务结束--");
@ -205,7 +187,6 @@ public class CustomsInterfaceTask {
} finally {
log.info("缴款书录入结果获取--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -213,13 +194,11 @@ public class CustomsInterfaceTask {
public void customsEntry() {
log.info("缴款书申请录入定时任务启动--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("customsInterfaceTasks", "customsEntry");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
customsInterfaceService.customsEntry();
log.info("缴款书申请录入定时任务结束--");
@ -228,7 +207,6 @@ public class CustomsInterfaceTask {
} finally {
log.info("缴款书申请录入--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}

@ -45,7 +45,6 @@ public class DataPlatformInterfaceTask {
*/
public String collectJX() throws InterruptedException {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<TAcOrg> list = dataPlatformCollectService.getOrgTaxno();
log.info("--对接数据平台采集任务开始--");
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,
@ -86,7 +85,6 @@ public class DataPlatformInterfaceTask {
*/
public String collectXX() throws InterruptedException {
log.info("--对接数据平台采集任务开始--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<TAcOrg> list = dataPlatformCollectService.getOrgTaxno();
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(list.size() * 7), new ThreadPoolExecutor.CallerRunsPolicy());
@ -130,10 +128,8 @@ public class DataPlatformInterfaceTask {
log.info("数据平台发票解析任务执行开始-");
// 查询数据库 遍历数据源
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<String> dbList = confirmDao.getDbSource();
for (String db : dbList) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
List<String> taxnoes = dataPlatformCollectService.getNeedParseTaxno();
if (taxnoes.size() > 0) {
@ -160,7 +156,6 @@ public class DataPlatformInterfaceTask {
* 获取状态信息 --进项
*/
public String syncJXStatus() throws InterruptedException {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<TAcOrg> list = dataPlatformCollectService.getOrgTaxno();
// 准备请求参数
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,
@ -189,7 +184,6 @@ public class DataPlatformInterfaceTask {
*/
public String syncXXStatus() throws InterruptedException {
log.info("--对接数据平台销项获取状态开始--");
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<TAcOrg> list = dataPlatformCollectService.getOrgTaxno();
// 准备请求参数
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,

@ -110,22 +110,18 @@ public class InvoiceDownTask {
public void parseDownInvoices() throws InterruptedException {
log.info("发票解析任务执行开始-");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("invoiceDownTask", "parseInvoices");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
// 准备请求参数
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 15, 5, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(30), new ThreadPoolExecutor.CallerRunsPolicy());
// 查询数据库 遍历数据源
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<String> dbList = confirmDao.getDbSource();
for (String db : dbList) {
DynamicContextHolder.push(db + DbConstant.BUSINESS_READ);
List<String> taxnos = invoiceDownService.getNoParse();
if (taxnos != null && taxnos.size() > 0) {
for (String taxno : taxnos) {
@ -144,7 +140,6 @@ public class InvoiceDownTask {
} finally {
log.info("发票解析--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}

@ -67,12 +67,10 @@ public class InvoiceInterfaceTask {
public void getInvoices() throws InterruptedException {
log.info("发票获取接口执行开始-");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("invoiceInterfaceTask", "getInvoices");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
// 准备请求参数
// 需判断 设置不认证状态
@ -94,7 +92,6 @@ public class InvoiceInterfaceTask {
String aceId = org.getAceId();
String aceKey = org.getAceKey();
String company = org.getCompany();
DynamicContextHolder.push(DbConstant.BASICS_READ);
//判断是否为大企业税号
BasisSysDeptCfg baseSysDeptCfg = basisSysDeptCfgDao.selectOne(new QueryWrapper<BasisSysDeptCfg>().eq("nsrsbh", taxno));
if (baseSysDeptCfg == null) {
@ -113,7 +110,6 @@ public class InvoiceInterfaceTask {
} finally {
log.info("发票获取接口--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}

@ -70,12 +70,10 @@ public class SdnyClientTask extends AbstractController {
public void getSdnyClient() throws InterruptedException {
log.info("获取山东能源Client定时任务开始");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("sdnyClientTask", "getSdnyClient");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
// 准备请求参数
// 需判断 设置不认证状态
@ -127,7 +125,6 @@ public class SdnyClientTask extends AbstractController {
} finally {
log.info("获取山东能源Client定时任务--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}

@ -25,13 +25,11 @@ public class ViolationMsgTask {
// @Scheduled(cron = "0 0/5 * * * ?")
public void selectViolationTaxno() {
log.info("===============获取违规信息税号开始============");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("violationMsgTask", "selectViolationTaxno");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
violationMsgService.selectViolationTaxno();
log.info("=============违规信息税号执行结束=============");
@ -41,7 +39,6 @@ public class ViolationMsgTask {
} finally {
log.info("违规信息税号--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -50,12 +47,10 @@ public class ViolationMsgTask {
// @Scheduled(cron = "0 0/5 * * * ?")
public void getViolation() {
log.info("===============申请违规信息开始============");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity = scheduleJobService.queryByBeanName("violationMsgTask", "getViolation");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
violationMsgService.getViolation();
log.info("=============申请违规信息执行结束=============");
@ -65,7 +60,6 @@ public class ViolationMsgTask {
} finally {
log.info("申请违规信息--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
@ -73,13 +67,11 @@ public class ViolationMsgTask {
public void getViolationResult() {
log.info("===============获取违规结果开始============");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("violationMsgTask", "getViolationResult");
if (scheduleJobEntity != null && "0".equals(scheduleJobEntity.getJobStatus())) {
try {
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
violationMsgService.getViolationResult();
log.info("=============获取违规结果执行结束=============");
@ -89,20 +81,17 @@ public class ViolationMsgTask {
} finally {
log.info("获取违规结果--重置执行状态");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}
}
public void violationTDxRecordInvoice(){
log.info("ViolationMsgTask.violationTDxRecordInvoice.starting");
DynamicContextHolder.push(DbConstant.BASICS_READ);
ScheduleJobEntity scheduleJobEntity =
scheduleJobService.queryByBeanName("violationMsgTask","violationTDxRecordInvoice");
if(scheduleJobEntity!=null && "0".equals(scheduleJobEntity.getJobStatus())){
try{
scheduleJobEntity.setJobStatus("1");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
violationMsgService.updateTdxRecodeInvoce();
log.info("ViolationMsgTask.violationTDxRecordInvoice.ending");
@ -111,7 +100,6 @@ public class ViolationMsgTask {
}finally {
log.info("ViolationMsgTask.violationTDxRecordInvoice.reset");
scheduleJobEntity.setJobStatus("0");
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
scheduleJobService.updateById(scheduleJobEntity);
}
}

@ -137,7 +137,6 @@ public class CautionExportExpirationThread extends BaseThread {
excelFile.append(ftpFileName.toString());
// 递归导出数据到excel,切换到read数据库
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
this.cicleExport(reqVO, default_curr, excelFile.toString(), exportLog);
// FTP文件存储路径

@ -144,7 +144,6 @@ public class CautionExportMaximalThread extends BaseThread {
excelFile.append(ftpFileName.toString());
// 递归导出数据到excel
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
this.cicleExport(reqVO, default_curr, excelFile.toString(), exportLog, jsonObject);
// FTP文件存储路径

@ -134,7 +134,6 @@ public class ElecExportThread extends BaseThread {
excelFile.append(ftpFileName.toString());
// 递归导出数据到excel
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
this.cicleExport(reqVO, default_curr, excelFile.toString(), exportLog, jsonObject);
// FTP文件存储路径

@ -148,7 +148,6 @@ public class InvoiceQueryUtil {
// 请求通用
Authorize authorize = new Authorize();
BaseQueJson bqj = new BaseQueJson();
DynamicContextHolder.push(DbConstant.BASICS_READ);
// 通过税号获取id和key
log.info("查验一张发票信息税号为 taxNo{}",taxNo);
TAcOrg tacOrg = confirmDao.findIdAndKeyByTaxno(taxNo);

@ -66,7 +66,6 @@ public class ElectronService {
SimpleDateFormat aDate = new SimpleDateFormat("yyyy-MM-dd");
List<Map<String, String>> returnList = new ArrayList<>();
List<Map<String, String>> idList = (List<Map<String, String>>)requestMap.get("data");
DynamicContextHolder.push("business" + DbConstant.BUSINESS_READ);
for (Map<String, String> idMap : idList) {
Map<String, String> map = new HashMap<>(16);
InvoiceElectron invoiceElectron = invoiceElectronDao.selectByRequestId(idMap.get("request_id"));

@ -273,7 +273,6 @@ public class SignedService {
response.setContentType("application/json; charset=utf-8");
return "{\"globalInfo\":" + globalJson + ",\"returnStateInfo\":" + runJson + "}";
}
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.getOrg(data.getBuyerTaxNo());
String dbName = null;
if (deptEntity != null && deptEntity.getDbName() != null) {
@ -287,7 +286,6 @@ public class SignedService {
response.setContentType("application/json; charset=utf-8");
return "{\"globalInfo\":" + globalJson + ",\"returnStateInfo\":" + runJson + "}";
}
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
list = this.selectByCollect(data.getSignedDateBegin(), data.getSignedDateEnd(), data.getBuyerTaxNo());
log.debug("================" + list);
for (RecordInvoice record : list) {
@ -312,7 +310,6 @@ public class SignedService {
}
infos.add(invoiceInfo);
}
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
Integer count =
this.selectByCount(data.getSignedDateBegin(), data.getSignedDateEnd(), data.getBuyerTaxNo());
GatherData gatherData = new GatherData();
@ -469,7 +466,6 @@ public class SignedService {
response.setContentType("application/json; charset=utf-8");
return "{\"globalInfo\":" + globalJson + ",\"returnStateInfo\":" + runJson + "}";
}
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.getOrg(yLgfTaxNo);
String dbName = null;
if (deptEntity != null && deptEntity.getDbName() != null) {
@ -483,7 +479,6 @@ public class SignedService {
response.setContentType("application/json; charset=utf-8");
return "{\"globalInfo\":" + globalJson + ",\"returnStateInfo\":" + runJson + "}";
}
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
record = selectByRecordInvoice(data.getInvoiceNo(), data.getInvoiceCode());
if (record != null) {
invoiceInfo = getInvoiceInfo(record);
@ -562,7 +557,6 @@ public class SignedService {
response.setContentType("application/json; charset=utf-8");
return "{\"globalInfo\":" + globalJson + ",\"returnStateInfo\":" + runJson + "}";
}
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.getOrg(data.getBuyerTaxNo());
String dbName = null;
if (deptEntity != null && deptEntity.getDbName() != null) {
@ -576,8 +570,6 @@ public class SignedService {
response.setContentType("application/json; charset=utf-8");
return "{\"globalInfo\":" + globalJson + ",\"returnStateInfo\":" + runJson + "}";
}
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
Integer count =
this.selectByCount(data.getSignedDateBegin(), data.getSignedDateEnd(), data.getBuyerTaxNo());
run.setReturnCode("0000");

@ -40,8 +40,6 @@ public class CustomsSignServiceImpl extends MpBaseServiceImpl<CustomsRecordDao,
private ScanIdUtils scanIdUtils;
@Override
public ReimburseReq customsSignInvoice(ReimburseReq reimburseReq, SysDeptEntity deptEntity) {
DynamicContextHolder.push(StringUtils.defaultString(ObjectUtil.fixNull(deptEntity.getDbName()), "business")
+ DbConstant.BUSINESS_READ);
LambdaQueryWrapper<TdxCustoms> customsLambdaQueryWrapper = new LambdaQueryWrapper<>();
customsLambdaQueryWrapper.eq(TdxCustoms::getCustomsCode, reimburseReq.getInvoiceNo());
TdxCustoms tDxCustoms = customsService.getOne(customsLambdaQueryWrapper);
@ -153,8 +151,6 @@ public class CustomsSignServiceImpl extends MpBaseServiceImpl<CustomsRecordDao,
}
//缴款书数据存储
private void customsSignInvoice(TdxCustomsRecord record, SysDeptEntity deptEntity,ReimburseReq reimburseReq) {
DynamicContextHolder.push(StringUtils.defaultString(ObjectUtil.fixNull(deptEntity.getDbName()), "business")
+ DbConstant.BUSINESS_WRITE);
LambdaQueryWrapper<TdxCustoms> tdxCustomsWrapper = new LambdaQueryWrapper<>();
tdxCustomsWrapper.eq(TdxCustoms::getCustomsCode, reimburseReq.getInvoiceNo());
TdxCustoms tDxCustoms = customsService.getOne(tdxCustomsWrapper);

@ -146,7 +146,6 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao
@Override
public ResponseEntity<?> reCall(RequestRecord requestRecord) {
try {
DynamicContextHolder.push(dbname + DbConstant.BUSINESS_READ);
RequestRecord dbRecord = requestRecordDao.selectById(requestRecord.getId());
log.info("数据库匹配信息:{}", JSONObject.toJSONString(dbRecord));
if (dbRecord == null) {
@ -172,7 +171,6 @@ public class RequestRecordServiceImpl extends MpBaseServiceImpl<RequestRecordDao
Object invokeResponse = null;
R data = new R(1000, "default success");
try {
DynamicContextHolder.push(dbname + DbConstant.BUSINESS_WRITE);
List<String> arglist = JSONObject.parseObject(dbRecord.getActiveCallRequestDetail(), List.class);
List<Object> args = new ArrayList<>();
arglist.forEach(strArg -> args.add(JSONObject.parseObject(strArg, recordenum.getArgClass()[arglist.indexOf(strArg)])));

@ -176,7 +176,6 @@ public class InvoiceQueryUtil {
log.info("-发票查验入参-data:{}", dataStr);
//根据标识判断是否需要获取数据库权限数据
if(enterprisePermissionFlag){
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.findIdAndKey(buyerTaxNo);
secretId= deptEntity.getAceId();
secretKey= deptEntity.getAceKey();

@ -150,7 +150,6 @@ public class InvoiceQueryUtilTaxNo {
// 请求通用
Authorize authorize = new Authorize();
BaseQueJson bqj = new BaseQueJson();
DynamicContextHolder.push(DbConstant.BASICS_READ);
JSONObject requestData = new JSONObject();
//根据标识判断是否需要获取数据库权限数据
if(enterprisePermissionFlag){

@ -88,7 +88,6 @@ public class MyThread extends Thread {
this.scanIdUtils = (ScanIdUtils)ApplicationContextRegister.getApplicationContext().getBean("scanIdUtils");
this.invoiceQueryUtil =
(InvoiceQueryUtil)ApplicationContextRegister.getApplicationContext().getBean("invoiceQueryUtil");
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.getOrg(ylgfTaxNo);
if (deptEntity != null && deptEntity.getDbName() != null) {
@ -212,7 +211,6 @@ public class MyThread extends Thread {
invoiceDate =
invoiceDate.substring(0, 4) + "-" + invoiceDate.substring(4, 6) + "-" + invoiceDate.substring(6);
}
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
InvoiceElectron selectElectron =
invoiceElectronDao.selectElectron(electron.getInvoiceCode(), electron.getInvoiceNo());
if (selectElectron == null) {
@ -349,7 +347,6 @@ public class MyThread extends Thread {
try {
if (record != null) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.getOrg(record.getGfTaxNo());
if (deptEntity != null) {
@ -426,13 +423,11 @@ public class MyThread extends Thread {
this.map.get("request_id"), this.map.get("vendor_id"));
} else {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
RecordInvoice recordInvoice =
recordInvoiceDao.selectOne(new QueryWrapper<RecordInvoice>().eq("uuid", electron.getUuid()));
if (recordInvoice != null) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity deptEntity = sysDeptDao.getOrg(recordInvoice.getGfTaxNo());
if (deptEntity != null) {
@ -496,7 +491,6 @@ public class MyThread extends Thread {
}
public int updateByQsDate(String uuid) {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByQsDate(uuid);
}
@ -504,33 +498,27 @@ public class MyThread extends Thread {
public int updateByInfo(String gfTaxNo, String xfTaxNo, BigDecimal totalAmount, BigDecimal taxAmount,
BigDecimal invoiceAmount, Date invoiceDate, String invoiceCode, String invoiceNo, String gfName,
String xfName) {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByInfo(gfTaxNo, xfTaxNo, totalAmount, taxAmount, invoiceAmount, invoiceDate,
invoiceCode, invoiceNo, gfName, xfName);
}
public int updateByInvoice(InvoiceElectron invoice) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByInvoice(invoice);
}
public int updateByRecordInvoice(int invoiceStatus, String uuid) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByRecordInvoice(invoiceStatus, uuid);
}
public int updateByRecordInvoiceRequestId(String uuid, String requestId, String vendorId) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByRecordInvoiceRequestId(uuid, requestId, vendorId);
}
public int insertImgLog(ElectronLog log) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.insertImgLog(log);
}
public int insertRecordInvoice(RecordInvoice recordInvoice) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
RecordInvoice uuid =
recordInvoiceDao.selectOne(new QueryWrapper<RecordInvoice>().eq("uuid", recordInvoice.getUuid()));
if (uuid != null) {
@ -703,33 +691,27 @@ public class MyThread extends Thread {
}
public void insertImg(InvoiceImgSavePo invoiceImg) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
invoiceImgDao.insert(invoiceImg);
}
public int saveInvoice(InvoiceElectron electron) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.insert(electron);
}
public int updateByNote(String note, String uuid) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByNote(uuid, note);
}
public int updateByCheckReturnCode(String note, String uuid, String returnCode, String requestId, String vendorId)
throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByCheckReturnCode(uuid, note, returnCode, requestId, vendorId);
}
public int updateByRequestId(String uuid, String requestId, String vendorId, String oldRequestId) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByRequestId(uuid, requestId, vendorId, oldRequestId);
}
public int updateByTimes(String uuid, String note, Date createDate, String scanId) throws Exception {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_WRITE);
return invoiceElectronDao.updateByTimes(createDate, note, uuid, scanId);
}

@ -45,7 +45,6 @@ public class ExtIndexController extends AbstractController {
public ResponseEntity<R> getOrgType() {
List<String> gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
if (gfshList.size() > 0) {
DynamicContextHolder.push(getUserInfo().getDbName() + DbConstant.BUSINESS_READ);
Integer orgNum = indexStatisticsService.getOrgType(gfshList);
log.info("查询到的数量为:{}",orgNum);
if (orgNum != null && orgNum > 0) {

@ -71,7 +71,6 @@ public class ExtDefinitiveStrideYearCopServiceImpl implements ExtDefinitiveStrid
String[] titlelist = {"序号", "签收日期", "签收状态", "签收人", "发票代码", "发票号码", "开票日期", "购方名称", "销方名称", "金额", "税额"};
String[] titleprop = {"xh", "qsDate", "qsStatus", "userName", "invoiceCode", "invoiceNo", "invoiceDate",
"gfName", "xfName", "invoiceAmount", "taxAmount"};
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 需要设置返回列表标题时调用
JSONObject json = this.setTitleList(titlelist, titleprop);

@ -39,7 +39,6 @@ public class ExtFpmxcxServiceImpl extends MpBaseServiceImpl<ExtBbfpmxDao, ExtBbf
public String selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
long enter = System.currentTimeMillis();
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String company = (String) pramsMap.get("company");
String menuId = (String) pramsMap.get("menuId");

@ -37,7 +37,6 @@ public class ExtJxsebbcxServiceImpl extends MpBaseServiceImpl<ExtJxsebbDao, ExtJ
@Override
public String selectByPramsMap(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {

@ -33,7 +33,6 @@ public class ExtJxsemxbbcxServiceImpl extends MpBaseServiceImpl<ExtJxsemxbbDao,
@Override
public String selectByPramsMap(Map<String, Object> pramsMap) {
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {

@ -53,7 +53,6 @@ public class ExtYcfpbbcxServiceImpl extends MpBaseServiceImpl<ExtBbycfpbbcxDao,
@Override
public String selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
pramsMap.put("dxhyAdmin", dxhyAdmin);

@ -49,7 +49,6 @@ public class ExtYcfpcxServiceImpl extends MpBaseServiceImpl<ExtBbycfpcxDao, ExtB
public String selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
long enter = System.currentTimeMillis();
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String company = (String)pramsMap.get("company");

@ -43,7 +43,6 @@ public class ViolationLogServiceImpl extends MpBaseServiceImpl<ViolationLogDao,
@Override
public String selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json;
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String company = (String)pramsMap.get("company");
String menuId = (String)pramsMap.get("menuId");
@ -77,7 +76,6 @@ public class ViolationLogServiceImpl extends MpBaseServiceImpl<ViolationLogDao,
@Override
public String selectRiskSupplier(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "供应商税号", "供应商名称", "发票张数", "总金额"};
@ -136,7 +134,6 @@ public class ViolationLogServiceImpl extends MpBaseServiceImpl<ViolationLogDao,
@Override
public String selectRiskSupplierInfo(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"处罚时间", "违规类型", "违法手段"};
@ -157,7 +154,6 @@ public class ViolationLogServiceImpl extends MpBaseServiceImpl<ViolationLogDao,
@Override
public String selectRiskInvoice(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "风险类别", "发票类型", "发票代码", "发票号码", "发票状态", "管理状态", "开票日期", "销方名称", "销方税号", "金额",
"税额", "价税合计", "备注", "抵扣税额", "认证状态", "认证类型"};

@ -61,7 +61,6 @@ public class ExtCautionExpirationServiceImpl extends MpBaseServiceImpl<ExtTdxRec
*/
@Override
public String listExpiration(ExtCautionExpirationReqVO reqVO, UserInfo userInfo) {
DynamicContextHolder.push(reqVO.getUserInfo().getDbName() + DbConstant.BUSINESS_READ);
String company = reqVO.getCompany();
String menuId = reqVO.getMenuId();
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);
@ -158,8 +157,6 @@ public class ExtCautionExpirationServiceImpl extends MpBaseServiceImpl<ExtTdxRec
*/
@Override
public String listAnomalyInvoice(ExtCautionAbnormalReqVO reqVO) {
DynamicContextHolder.push(reqVO.getUserInfo().getDbName() + DbConstant.BUSINESS_READ);
String company = reqVO.getCompany();
String menuId = reqVO.getMenuId();
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);
@ -301,8 +298,6 @@ public class ExtCautionExpirationServiceImpl extends MpBaseServiceImpl<ExtTdxRec
*/
@Override
public String listMaximalInvoice(ExtCautionMaximalReqVO reqVO) {
DynamicContextHolder.push(reqVO.getUserInfo().getDbName() + DbConstant.BUSINESS_READ);
String company = reqVO.getCompany();
String menuId = reqVO.getMenuId();
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);

@ -41,7 +41,6 @@ public class CustomsServiceImpl extends MpBaseServiceImpl<CustomsDao, CustomsRec
*/
@Override
public String selectByPramsMap(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 表头
String[] titlelist = {"序号", "缴款书号码", "管理状态", "填发日期", "缴款单位名称", "缴款单位税号", "税款金额", "抵扣税款金额",
"稽核结果", "是否申请核对", "核对结果", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间",

@ -33,13 +33,11 @@ public class ExtMessageControlServiceImpl extends MpBaseServiceImpl<ExtMessageCo
@Override
public void insertMessage(ExtSysMessagecontrol vo) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
extSysMessagecontrolDao.insert(vo);
}
@Override
public Object queryMessageContol(String userName, Integer curr, Integer size, String operationStatus) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
JSONObject json = new JSONObject();
try {
PageHelper.startPage(curr, size);
@ -60,19 +58,16 @@ public class ExtMessageControlServiceImpl extends MpBaseServiceImpl<ExtMessageCo
@Override
public int queryCount(String userName) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
return extMessageControlDao.queryCount(userName);
}
@Override
public int updateOperationStatusById(ExtSysMessagecontrol vo) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
return extMessageControlDao.updateOperationStatusById(vo);
}
@Override
public int updateOperationStatusAll(ExtSysMessagecontrol vo) {
DynamicContextHolder.push(DbConstant.BASICS_WRITE);
return extMessageControlDao.updateOperationStatusAll(vo);
}

@ -28,7 +28,6 @@ public class ExtPaperServiceImpl extends MpBaseServiceImpl<ExtPaperDao, ExtBuyIn
@Override
public String listBuyInvoicePaper(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "采集时间", "采集来源", "数量合计", "金额合计", "税额合计"};
String[] titleprop = {"xh", "collectDate", "sourceSystem", "allCount", "invoiceAmount", "taxAmount",};
@ -76,7 +75,6 @@ public class ExtPaperServiceImpl extends MpBaseServiceImpl<ExtPaperDao, ExtBuyIn
@Override
public String selectInvoicePaper(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "入池结果", "发票类型", "发票代码", "发票号码", "开票日期", "购方名称", "销方名称", "金额", "税额", "价税合计"};
String[] titleprop = {"xh", "poolStatus", "invoiceType", "invoiceCode", "invoiceNo", "invoiceDate",

@ -53,7 +53,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
public String listAddTax(Map<String, Object> pramsMap, int curr, int size) {
long enter = System.currentTimeMillis();
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "销方名称", "销方税号", "金额", "税额", "有效税额",
"价税合计", "认证状态", "认证类型", "认证日期", "认证方式", "认证人", "采集状态", "底账库采集时间", "采集来源", "签收方式", "签收状态", "签收日期", "签收人",
@ -225,7 +224,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
public Object listOther(Map<String, Object> pramsMap, int curr, int size) {
long enter = System.currentTimeMillis();
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist =
{"序号", "发票类型", "发票代码", "发票号码", "开票日期", "金额", "签收状态", "签收日期", "签收方式", "签收人", "业务单号"
@ -316,7 +314,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
@Override
public Object listSaleInvoice(Map<String, Object> pramsMap, int curr, int size) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "发票状态", "开票日期", "购方名称", "购方税号", "金额", "税额", "价税合计",
"清单标志", "备注", "优惠政策类型", "采集状态", "采集时间", "采集来源", "签收方式", "对接系统", "签收状态", "签收日期", "签收人", "入账月份",
@ -459,7 +456,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
"txt50","zname","lifnr","kunnr","zname2","matnr","msl","runit",
"mwskz","kbetr","zhslj","zhsld","kdauf","kdpos","kbbh","ktype","lastReceiveTime"};
json = super.setTitleList(titlelist, titleProp);
DynamicContextHolder.push("business_business_read");
PageHelper.startPage(pullRecordReq.getCurr(),pullRecordReq.getSize());
List<PullRecordModel> recordList=super.baseMapper.getPullRecord(pullRecordReq);
PageInfo<PullRecordModel> pageInfo = new PageInfo<>(recordList);
@ -483,7 +479,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
@Override
public Object amortizeRecord(Map<String, Object> pramsMap) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "业务单号", "已摊销金额", "剩余金额", "报销人"};
String[] titleprop = {"xh", "amortizeDocumentNumber", "amortizeAmount", "remainAmortizeAmount", "bxr"};
@ -512,7 +507,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
@Override
public List<String> getGfshList(List<String> gfshList, List<String> companyCodes) {
DynamicContextHolder.push(DbConstant.BASICS_READ);
List<SysDeptEntity> taxnoList = sysAuthDao.queryTaxnoList();
List<SysDeptEntity> parentIdList = sysAuthDao.queryParentIdList();
@ -547,7 +541,6 @@ public class ExtInvoicePoolServiceImpl extends MpBaseServiceImpl<ExtInvoicePoolD
@Override
public Object incentiveFlagList(String dbName) {
JSONObject json = new JSONObject();
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
List<String> incentiveFlagList = super.baseMapper.listIncentiveFlag();
json.put("incentiveFlagList", incentiveFlagList);
return super.responseResult(json);

@ -38,7 +38,6 @@ public class ExtFprzhrServiceImpl extends MpBaseServiceImpl<ExtFprzhrDao, ExtFpr
String company = (String)pramsMap.get("company");
String menuId = (String)pramsMap.get("menuId");
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 需要设置返回列表标题时调用
List<String> gfshList = (List<String>)pramsMap.get("gfsh");
if (gfshList == null || gfshList.size() == 0) {

@ -76,7 +76,6 @@ public class ExtQssbServiceImpl extends MpBaseServiceImpl<ExtQssbDao, ExtQssbRes
String menuId = (String)pramsMap.get("menuId");
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
String hjje = "0";
String hjse = "0";
// 分页获取明细列表

@ -74,7 +74,6 @@ public class ExtQstjbServiceImpl extends MpBaseServiceImpl<ExtQstjbDao, ExtQstjb
@Override
public String selectQstjbByCxtj(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 需要设置返回列表标题时调用
String company = (String)pramsMap.get("company");
String menuId = (String)pramsMap.get("menuId");
@ -139,8 +138,6 @@ public class ExtQstjbServiceImpl extends MpBaseServiceImpl<ExtQstjbDao, ExtQstjb
String menuId = (String)pramsMap.get("menuId");
JSONObject json = tabulateRedisService.getTabulateMenu(company, menuId);
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
String hjje = "0";
String hjse = "0";

@ -27,7 +27,6 @@ public class ExtRzInfoByXfServiceImpl extends MpBaseServiceImpl<ExtRzInfoByXfDao
public String rzInfoByXf(Map<String, Object> pramsMap) {
String[] titlelist = {"销方名称", "销方税号", "发票数量", "合计金额", "合计税额", "合计抵扣税额"};
String[] titleprop = {"xfName", "xfTaxNo", "fpsl", "hjje", "hjse", "hjdk"};
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 需要设置返回列表标题时调用
JSONObject json = super.setTitleList(titlelist, titleprop);

@ -71,7 +71,6 @@ public class ExtRzjgqdServiceImpl extends MpBaseServiceImpl<ExtRzjgqdDao, ExtRzj
@Override
public String rzjgByGfshAndSkssq(Map<String, Object> pramsMap, int curr, int size) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 需要设置返回列表标题时调用
String company = (String)pramsMap.get("company");
String menuId = (String)pramsMap.get("menuId");

@ -40,7 +40,6 @@ public class FbrzybServiceImpl extends MpBaseServiceImpl<ExtFprzybDao, ExtFprzyb
@Override
public String selectByGfshAndRznf(Map<String, Object> pramsMap) {
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
// 需要设置返回列表标题时调用
String company = (String)pramsMap.get("company");
String menuId = (String)pramsMap.get("menuId");

@ -42,7 +42,6 @@ public class PassengerInvoiceStatisticsServiceImpl implements PassengerInvoiceSt
public Map<String, Object> selectLegalizedInvoiceCard(Map<String, Object> selectMonthMap,
Map<String, Object> selectYearMap, String dbName) {
Map<String, Object> mothodMap = new HashMap<>();
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
InvoiceAmountVo invVo = passengerInvoiceStatisticsDao.selectLegalizedInvoiceCard(selectMonthMap);
if (invVo != null) {
mothodMap.put("monthTaxAmount", AmountFormatUtil
@ -67,7 +66,6 @@ public class PassengerInvoiceStatisticsServiceImpl implements PassengerInvoiceSt
Map<String, Object> selectYearMap, String dbName) {
log.info("进入客票发票卡片查询");
Map<String, Object> mothodMap = new HashMap<>();
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
selectMonthMap.put("dxhyAdmin", dxhyAdmin);
selectMonthMap.put("dxhyTertiary", dxhyTertiary);
InvoiceAmountVo invVo = passengerInvoiceStatisticsDao.selectpassengerTicketMonthCar(selectMonthMap);

@ -36,7 +36,6 @@ public class PassengerTicketServiceImpl extends MpBaseServiceImpl<PassengerTicke
@Override
public Map<String, Object> selectcertifiedInvoiceList(Map<String, Object> params, Integer curr, Integer size,
String dbNmae) {
DynamicContextHolder.push(dbNmae + DbConstant.BUSINESS_READ);
Map<String, Object> map = new HashMap<>();
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "开票日期", "购方税号", "购方名称", "销方税号", "销方名称", "金额", "税额", "价税合计",
"发票状态", "签收状态", "认证状态", "税款所属期", "来源系统"};
@ -88,7 +87,6 @@ public class PassengerTicketServiceImpl extends MpBaseServiceImpl<PassengerTicke
String dbName) {
log.info("进入其他发票列表查询");
Map<String, Object> map = new HashMap<>();
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
try {
String[] titlelist = {"序号", "发票类型", "发票代码", "发票号码", "开票日期", "销方名称", "购方名称", "金额", "税额", "价税合计", "发票状态",
"签收状态", "认证状态", "税款所属期", "来源系统"};
@ -136,7 +134,6 @@ public class PassengerTicketServiceImpl extends MpBaseServiceImpl<PassengerTicke
@Override
public List<InvoiceMainBody> selectInvoiceMainBody(String invoiceNo, String invoiceCode, String dbName) {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
List<InvoiceMainBody> list = passengerTicketDao.selectInvoiceMainBody(invoiceNo, invoiceCode);
List<InvoiceMainBody> returnList = returnInvoiceList(list);
return returnList;
@ -144,7 +141,6 @@ public class PassengerTicketServiceImpl extends MpBaseServiceImpl<PassengerTicke
@Override
public List<InvoiceMainBody> selectPassengerTheme(String selectId, String dbName) {
DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
List<InvoiceMainBody> list = passengerTicketDao.selectPassengerTheme(selectId);
List<InvoiceMainBody> returnList = returnInvoiceList(list);
List<InvoiceMainBody> returnNewList = returnThousandList(returnList);

@ -944,7 +944,6 @@ public class SignFpqsController extends AbstractController {
JSONArray invoiceArray = invoiceDetail.getJSONArray("invoices");
// 处理每个图片,下载到本地临时文件夹内
DynamicContextHolder.push(getUserInfo().getDbName() + DbConstant.BUSINESS_READ);
for (int i = 0; i < invoiceArray.size(); i++) {
JSONObject object = invoiceArray.getJSONObject(i);

@ -68,7 +68,6 @@ public class YlSignServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao, T
// 需要设置返回列表标题时调用
JSONObject json = super.setTitleList(titlelist, titleprop);
DynamicContextHolder.push(pramsMap.get("dbName") + DbConstant.BUSINESS_READ);
pramsMap.put("dxhyAdmin", dxhyAdmin);
// 合计信息,仅第一页时需要统计,减少数据库压力
if (curr == 1) {

@ -23,7 +23,6 @@ public class Rules1012ServiceImpl implements RulesService {
@Override
public String validationRules(UserInfo userInfo, String qsType, Map<String, String> pramsMap, TDxRecordInvoice recordInvoice, String invoiceType) {
// 购方银行账号校验
DynamicContextHolder.push(DbConstant.BASICS_READ);
if (StringUtils.isNotBlank(recordInvoice.getGfTaxNo())) {
SysDeptEntity sysDeptEntity =
sysDeptDao.selectOne(new QueryWrapper<SysDeptEntity>().eq("taxno", recordInvoice.getGfTaxNo()).eq("org_type", "5"));

Loading…
Cancel
Save