fix():U8数据同步

master
jiyufei 2 months ago
parent 1192fb4470
commit 11015adb3e

@ -17,11 +17,11 @@ spring:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置手动配置druid exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置手动配置druid
datasource: datasource:
db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM8、KingbaseES、PostgreSQL请严格按可选值填写) db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM8、KingbaseES、PostgreSQL请严格按可选值填写)
host: 192.168.0.210 host: 127.0.0.1
port: 3306 port: 3306
username: java_boot_test username: root
password: pBx5HaW6WMGSTdDf password: root
db-name: java_boot_test db-name: jnpf_yys_dev
db-schema: #金仓达梦选填 db-schema: #金仓达梦选填
prepare-url: #自定义url prepare-url: #自定义url
@ -30,23 +30,61 @@ spring:
primary: master #设置默认的数据源或者数据源组,默认值即为master primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源 strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
druid: druid:
#定时执行数据链接检测语句 防止数据库闲时超时断开链接 # 空闲时执行连接测试
test-while-idle: true #空闲时执行 test-while-idle: true
time-between-eviction-runs-millis: 60000 #执行间隔 # 连接测试最小间隔
# datasource: time-between-eviction-runs-millis: 60000
# master: # 获取连接等待3秒 根据网络情况设定
# url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC max-wait: 3000
# username: ${spring.datasource.username} # 初始化4个连接
# password: ${spring.datasource.password} initial-size: 4
# driver-class-name: com.mysql.cj.jdbc.Driver # 最大20个连接
max-active: 20
# 最少保持4个空闲连接
min-idle: 4
# 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
keep-alive: true
# 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
#filters: slf4j
slf4j:
statementLogEnabled: true
resultSetLogEnabled: false
connectionLogEnabled: false
dataSourceLogEnabled: false
statementCreateAfterLogEnabled: false
statementCloseAfterLogEnabled: false
statementExecuteAfterLogEnabled: false
#打印SQL替换参数
statementExecutableSqlLogEnable: true
statementPrepareAfterLogEnabled: false
statementPrepareCallAfterLogEnabled: false
statementParameterSetLogEnabled: false
validation-query: SELECT 1
datasource:
master:
url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
slave_1:
url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/yys-sc?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: ${spring.datasource.username}
password: ${spring.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
slave_2:
url: jdbc:sqlserver://192.168.10.246:1433;DatabaseName=UFDATA_995_2024;trustServerCertificate=true
username: sa
password: '!sql2019'
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# ===================== Redis配置 ===================== # ===================== Redis配置 =====================
# redis单机模式 # redis单机模式
redis: redis:
database: 1 #缓存库编号 database: 1 #缓存库编号
host: 192.168.0.220 # host: 222.71.165.188
host: 127.0.0.1
port: 6379 port: 6379
password: 123456 # 密码为空时,请将本行注释 # password: qweasd,.123 # 密码为空时,请将本行注释
timeout: 3000 #超时时间(单位:秒) timeout: 3000 #超时时间(单位:秒)
lettuce: #Lettuce为Redis的Java驱动包 lettuce: #Lettuce为Redis的Java驱动包
pool: pool:
@ -74,6 +112,18 @@ spring:
# min-idle: 0 # 连接池中的最小空闲连接 # min-idle: 0 # 连接池中的最小空闲连接
# max-idle: 8 # 连接池中的最大空闲连接 # max-idle: 8 # 连接池中的最大空闲连接
# SpringDoc接口文档 访问地址http://127.0.0.1:30000/doc.html
springdoc:
default-flat-param-object: true
api-docs:
enabled: true
#SpringDoc增强
#knife4j:
# basic: #接口文档访问鉴权
# enable: true
# username: jnpf
# password: 123456
config: config:
# ===================== 是否开启测试环境 ===================== # ===================== 是否开启测试环境 =====================
TestVersion: false TestVersion: false
@ -88,7 +138,7 @@ config:
enable-storage: true #启用存储 enable-storage: true #启用存储
enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高) enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
domain: "" # 访问域名例如“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名 domain: "" # 访问域名例如“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
base-path: F:/work/jnpf-resources/ # 基础路径 base-path: D:/project/jnpf-resources/ # 基础路径
path-patterns: /** # 访问路径 path-patterns: /** # 访问路径
storage-path: # 存储路径 storage-path: # 存储路径
aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写 aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写

@ -24,8 +24,10 @@ import jnpf.permission.entity.UserEntity;
import jnpf.service.YysBillMaterialService; import jnpf.service.YysBillMaterialService;
import jnpf.service.YysSubsetMaterialService; import jnpf.service.YysSubsetMaterialService;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
@ -46,6 +48,7 @@ import java.util.stream.Collectors;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysBillMaterialServiceImpl extends ServiceImpl<YysBillMaterialMapper, YysBillMaterialEntity> implements YysBillMaterialService { public class YysBillMaterialServiceImpl extends ServiceImpl<YysBillMaterialMapper, YysBillMaterialEntity> implements YysBillMaterialService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -338,12 +341,14 @@ public class YysBillMaterialServiceImpl extends ServiceImpl<YysBillMaterialMappe
if (CollectionUtils.isEmpty(query)) { if (CollectionUtils.isEmpty(query)) {
return "远程母件物料信息为空"; return "远程母件物料信息为空";
} }
log.info("母件物料信息,{}", query);
//过滤出同步过的 //过滤出同步过的
query = query.stream().filter(obj -> !syncList.contains(obj.getAutoId())).collect(Collectors.toList()); query = query.stream().filter(obj -> !syncList.contains(obj.getAutoId())).collect(Collectors.toList());
//子件物料 //子件物料
RowMapper<SyncSubsetMaterial> subMapper = new BeanPropertyRowMapper<>(SyncSubsetMaterial.class); RowMapper<SyncSubsetMaterial> subMapper = new BeanPropertyRowMapper<>(SyncSubsetMaterial.class);
String subsetSql = "select * from v_bom_opcomponent_rpt"; String subsetSql = "select * from v_bom_opcomponent_rpt";
List<SyncSubsetMaterial> subsetMaterials = this.jdbcTemplate.query(subsetSql, subMapper); List<SyncSubsetMaterial> subsetMaterials = this.jdbcTemplate.query(subsetSql, subMapper);
log.info("子件物料信息,{}", subsetMaterials);
Map<String, List<SyncSubsetMaterial>> subsetCollect = Maps.newHashMap(); Map<String, List<SyncSubsetMaterial>> subsetCollect = Maps.newHashMap();
if (CollectionUtils.isNotEmpty(subsetMaterials)) { if (CollectionUtils.isNotEmpty(subsetMaterials)) {
subsetCollect = subsetMaterials.stream().collect(Collectors.groupingBy(SyncSubsetMaterial::getBomId)); subsetCollect = subsetMaterials.stream().collect(Collectors.groupingBy(SyncSubsetMaterial::getBomId));
@ -352,6 +357,7 @@ public class YysBillMaterialServiceImpl extends ServiceImpl<YysBillMaterialMappe
RowMapper<MaterialInformationSync> materialMapper = new BeanPropertyRowMapper<>(MaterialInformationSync.class); RowMapper<MaterialInformationSync> materialMapper = new BeanPropertyRowMapper<>(MaterialInformationSync.class);
String materialSql = "select * from dbo.Inventory"; String materialSql = "select * from dbo.Inventory";
List<MaterialInformationSync> informationSyncs = this.jdbcTemplate.query(materialSql, materialMapper); List<MaterialInformationSync> informationSyncs = this.jdbcTemplate.query(materialSql, materialMapper);
log.info("物料表数据,{}", informationSyncs);
Map<String, MaterialInformationSync> materialCollect = Maps.newHashMap(); Map<String, MaterialInformationSync> materialCollect = Maps.newHashMap();
if (CollectionUtils.isNotEmpty(informationSyncs)) { if (CollectionUtils.isNotEmpty(informationSyncs)) {
materialCollect = informationSyncs.stream().collect(Collectors.toMap(MaterialInformationSync::getCInvCode, Function.identity())); materialCollect = informationSyncs.stream().collect(Collectors.toMap(MaterialInformationSync::getCInvCode, Function.identity()));
@ -364,7 +370,7 @@ public class YysBillMaterialServiceImpl extends ServiceImpl<YysBillMaterialMappe
yysBillMaterialEntity.setPieceId(material.getBomId()); yysBillMaterialEntity.setPieceId(material.getBomId());
if (MapUtils.isNotEmpty(materialCollect) && materialCollect.containsKey(material.getInvCode())) { if (MapUtils.isNotEmpty(materialCollect) && materialCollect.containsKey(material.getInvCode())) {
MaterialInformationSync sync = materialCollect.get(material.getInvCode()); MaterialInformationSync sync = materialCollect.get(material.getInvCode());
yysBillMaterialEntity.setPieceName(sync.getCInvName()); yysBillMaterialEntity.setPieceName(StringUtils.isEmpty(sync.getCInvName()) ? "无" : sync.getCInvName());
yysBillMaterialEntity.setModels(sync.getEInvStd()); yysBillMaterialEntity.setModels(sync.getEInvStd());
yysBillMaterialEntity.setUnit(sync.getCComUnitCode()); yysBillMaterialEntity.setUnit(sync.getCComUnitCode());
} }

@ -24,6 +24,7 @@ import jnpf.model.yysmaterialinformation.MaterialInformationSync;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import jnpf.service.YysInventoryQueryService; import jnpf.service.YysInventoryQueryService;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -49,6 +50,7 @@ import java.util.stream.Collectors;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysInventoryQueryServiceImpl extends ServiceImpl<YysInventoryQueryMapper, YysInventoryQueryEntity> implements YysInventoryQueryService { public class YysInventoryQueryServiceImpl extends ServiceImpl<YysInventoryQueryMapper, YysInventoryQueryEntity> implements YysInventoryQueryService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -323,12 +325,14 @@ public class YysInventoryQueryServiceImpl extends ServiceImpl<YysInventoryQueryM
if (CollectionUtils.isEmpty(query)) { if (CollectionUtils.isEmpty(query)) {
return "远程库存信息为空"; return "远程库存信息为空";
} }
log.info("库存信息,{}", query);
//过滤出同步过的 //过滤出同步过的
query = query.stream().filter(obj -> !syncList.contains(obj.getAutoId())).collect(Collectors.toList()); query = query.stream().filter(obj -> !syncList.contains(obj.getAutoId())).collect(Collectors.toList());
//物料表数据 不从自己库取数据,防止自己库未同步,从而取不到数据 //物料表数据 不从自己库取数据,防止自己库未同步,从而取不到数据
RowMapper<MaterialInformationSync> materialMapper = new BeanPropertyRowMapper<>(MaterialInformationSync.class); RowMapper<MaterialInformationSync> materialMapper = new BeanPropertyRowMapper<>(MaterialInformationSync.class);
String materialSql = "select * from dbo.Inventory"; String materialSql = "select * from dbo.Inventory";
List<MaterialInformationSync> informationSyncs = this.jdbcTemplate.query(materialSql, materialMapper); List<MaterialInformationSync> informationSyncs = this.jdbcTemplate.query(materialSql, materialMapper);
log.info("物料表数据,{}", informationSyncs);
Map<String, MaterialInformationSync> materialCollect = Maps.newHashMap(); Map<String, MaterialInformationSync> materialCollect = Maps.newHashMap();
if (CollectionUtils.isNotEmpty(informationSyncs)) { if (CollectionUtils.isNotEmpty(informationSyncs)) {
materialCollect = informationSyncs.stream().collect(Collectors.toMap(MaterialInformationSync::getCInvCode, Function.identity())); materialCollect = informationSyncs.stream().collect(Collectors.toMap(MaterialInformationSync::getCInvCode, Function.identity()));

@ -25,6 +25,7 @@ import jnpf.model.yyssupplierclass.SupplierClassSync;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import jnpf.service.YysMaterialClassService; import jnpf.service.YysMaterialClassService;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -48,6 +49,7 @@ import java.util.stream.Collectors;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysMaterialClassServiceImpl extends ServiceImpl<YysMaterialClassMapper, YysMaterialClassEntity> implements YysMaterialClassService { public class YysMaterialClassServiceImpl extends ServiceImpl<YysMaterialClassMapper, YysMaterialClassEntity> implements YysMaterialClassService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -321,16 +323,17 @@ public class YysMaterialClassServiceImpl extends ServiceImpl<YysMaterialClassMap
if (org.apache.commons.collections4.CollectionUtils.isEmpty(query)) { if (org.apache.commons.collections4.CollectionUtils.isEmpty(query)) {
return "远程物料分类信息为空"; return "远程物料分类信息为空";
} }
log.info("物料分类数据,{}", JsonUtil.getListToJsonArray(query));
//过滤出同步过的 //过滤出同步过的
List<String> list = masterDataService.getMaterialClassIds(); List<String> list = masterDataService.getMaterialClassIds();
//顶级分类 //顶级分类
Map<String, String> topCollect = query.stream() Map<String, String> topCollect = query.stream()
.filter(obj -> obj.getCInvCCode().equals("1")) .filter(obj -> obj.getIInvCGrade().equals("1"))
.collect(Collectors.toMap(MaterialClassSync::getCInvCCode, MaterialClassSync::getCInvCName)); .collect(Collectors.toMap(MaterialClassSync::getCInvCCode, MaterialClassSync::getCInvCName));
//二级分类 //二级分类
Map<String, String> secondCollect = query.stream() Map<String, String> secondCollect = query.stream()
.filter(obj -> obj.getCInvCCode().equals("1")) .filter(obj -> obj.getIInvCGrade().equals("2"))
.collect(Collectors.toMap(MaterialClassSync::getCInvCCode, MaterialClassSync::getCInvCName)); .collect(Collectors.toMap(MaterialClassSync::getCInvCCode, MaterialClassSync::getCInvCName));
List<YysMaterialClassEntity> result = Lists.newArrayList(); List<YysMaterialClassEntity> result = Lists.newArrayList();

@ -31,6 +31,7 @@ import jnpf.model.QueryModel;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel; import jnpf.base.model.ColumnDataModel;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -61,6 +62,7 @@ import jnpf.permission.entity.UserEntity;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysMaterialInformationServiceImpl extends ServiceImpl<YysMaterialInformationMapper, YysMaterialInformationEntity> implements YysMaterialInformationService { public class YysMaterialInformationServiceImpl extends ServiceImpl<YysMaterialInformationMapper, YysMaterialInformationEntity> implements YysMaterialInformationService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -344,6 +346,7 @@ public class YysMaterialInformationServiceImpl extends ServiceImpl<YysMaterialIn
if (org.apache.commons.collections4.CollectionUtils.isEmpty(query)) { if (org.apache.commons.collections4.CollectionUtils.isEmpty(query)) {
return "远程物料信息为空"; return "远程物料信息为空";
} }
log.info("物料信息数据,{}", query);
//过滤出同步过的 //过滤出同步过的
List<String> list = masterDataService.getMaterialInfoIds(); List<String> list = masterDataService.getMaterialInfoIds();
List<YysMaterialInformationEntity> result = Lists.newArrayList(); List<YysMaterialInformationEntity> result = Lists.newArrayList();

@ -24,6 +24,7 @@ import jnpf.model.yyssupplierinformation.SupplierInfoSync;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import jnpf.service.YysSupplierClassService; import jnpf.service.YysSupplierClassService;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -46,6 +47,7 @@ import java.util.stream.Collectors;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysSupplierClassServiceImpl extends ServiceImpl<YysSupplierClassMapper, YysSupplierClassEntity> implements YysSupplierClassService { public class YysSupplierClassServiceImpl extends ServiceImpl<YysSupplierClassMapper, YysSupplierClassEntity> implements YysSupplierClassService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -319,6 +321,7 @@ public class YysSupplierClassServiceImpl extends ServiceImpl<YysSupplierClassMap
if (org.apache.commons.collections4.CollectionUtils.isEmpty(query)) { if (org.apache.commons.collections4.CollectionUtils.isEmpty(query)) {
return "远程供应商分类信息为空"; return "远程供应商分类信息为空";
} }
log.info("供应商分类信息数据,{}", query);
List<String> list = masterDataService.getSupplierClassIds(); List<String> list = masterDataService.getSupplierClassIds();
//顶级分类 //顶级分类
Map<String, String> collect = query.stream() Map<String, String> collect = query.stream()

@ -23,6 +23,7 @@ import jnpf.model.yyssupplierinformation.YysSupplierInformationPagination;
import jnpf.permission.entity.UserEntity; import jnpf.permission.entity.UserEntity;
import jnpf.service.YysSupplierInformationService; import jnpf.service.YysSupplierInformationService;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -45,6 +46,7 @@ import java.util.stream.Collectors;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysSupplierInformationServiceImpl extends ServiceImpl<YysSupplierInformationMapper, YysSupplierInformationEntity> implements YysSupplierInformationService { public class YysSupplierInformationServiceImpl extends ServiceImpl<YysSupplierInformationMapper, YysSupplierInformationEntity> implements YysSupplierInformationService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -318,6 +320,7 @@ public class YysSupplierInformationServiceImpl extends ServiceImpl<YysSupplierIn
if (CollectionUtils.isEmpty(query)) { if (CollectionUtils.isEmpty(query)) {
return "远程供应商信息为空"; return "远程供应商信息为空";
} }
log.info("供应商信息数据,{}", query);
//过滤出同步过的 //过滤出同步过的
List<String> list = masterDataService.getSupplierIds(); List<String> list = masterDataService.getSupplierIds();
List<YysSupplierInformationEntity> result = Lists.newArrayList(); List<YysSupplierInformationEntity> result = Lists.newArrayList();

@ -31,6 +31,7 @@ import jnpf.model.QueryModel;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel; import jnpf.base.model.ColumnDataModel;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.BeanPropertyRowMapper;
@ -61,6 +62,7 @@ import jnpf.permission.entity.UserEntity;
* 2024-08-08 * 2024-08-08
*/ */
@Service @Service
@Slf4j
public class YysUnitInformationServiceImpl extends ServiceImpl<YysUnitInformationMapper, YysUnitInformationEntity> implements YysUnitInformationService { public class YysUnitInformationServiceImpl extends ServiceImpl<YysUnitInformationMapper, YysUnitInformationEntity> implements YysUnitInformationService {
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil generaterSwapUtil;
@ -323,6 +325,7 @@ public class YysUnitInformationServiceImpl extends ServiceImpl<YysUnitInformatio
if (CollectionUtils.isEmpty(query)) { if (CollectionUtils.isEmpty(query)) {
return "远程单位信息为空"; return "远程单位信息为空";
} }
log.info("单位信息数据,{}", query);
RowMapper<UnitGroupSync> groupSyncRowMapper = new BeanPropertyRowMapper<>(UnitGroupSync.class); RowMapper<UnitGroupSync> groupSyncRowMapper = new BeanPropertyRowMapper<>(UnitGroupSync.class);
String groupSql = "select * from dbo.ComputationGroup"; String groupSql = "select * from dbo.ComputationGroup";
List<UnitGroupSync> groupSyncs = this.jdbcTemplate.query(groupSql, groupSyncRowMapper); List<UnitGroupSync> groupSyncs = this.jdbcTemplate.query(groupSql, groupSyncRowMapper);

Loading…
Cancel
Save