bug修复

This commit is contained in:
guo 2023-08-08 11:58:52 +08:00
parent 120a474e0f
commit 3d48696eee
17 changed files with 53 additions and 52 deletions

View File

@ -2,7 +2,7 @@ package com.zhgd.sjmq.listener;
import com.chinacreator.c2.uop.sync.receiver.UopMQMessageReceiverServiceImpl; import com.chinacreator.c2.uop.sync.receiver.UopMQMessageReceiverServiceImpl;
import com.zhgd.sjmq.service.UopCustomMessageReceiverServiceImpl; import com.zhgd.sjmq.service.UopCustomMessageReceiverServiceImpl;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -27,11 +27,11 @@ public class UopModifyMessageReceiveListener {
@Value("${c2_orguser_subscription:}") @Value("${c2_orguser_subscription:}")
private String c2_orguser_subscription; private String c2_orguser_subscription;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@PostConstruct @PostConstruct
public void start() { public void start() {
if (profileJudgeUtil.isSjjt()) { if (environmentUtil.isSjjt()) {
if (receiver != null) { if (receiver != null) {
receiver.stop(); receiver.stop();
} }
@ -50,7 +50,7 @@ public class UopModifyMessageReceiveListener {
@PreDestroy @PreDestroy
public void end() { public void end() {
if (profileJudgeUtil.isSjjt()) { if (environmentUtil.isSjjt()) {
receiver.stop(); receiver.stop();
log.info("关闭mq"); log.info("关闭mq");
} }

View File

@ -9,7 +9,7 @@ import com.zhgd.xmgl.modules.project.entity.ProjectUfaceConfig;
import com.zhgd.xmgl.modules.basicdata.entity.ThirdPartyPlatformService; import com.zhgd.xmgl.modules.basicdata.entity.ThirdPartyPlatformService;
import com.zhgd.xmgl.modules.project.mapper.ProjectUfaceConfigMapper; import com.zhgd.xmgl.modules.project.mapper.ProjectUfaceConfigMapper;
import com.zhgd.xmgl.modules.basicdata.mapper.ThirdPartyPlatformServiceMapper; import com.zhgd.xmgl.modules.basicdata.mapper.ThirdPartyPlatformServiceMapper;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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;
@ -34,7 +34,7 @@ public class AsyncEnvironment {
@Autowired @Autowired
private ThirdPartyPlatformServiceMapper thirdPartyPlatformServiceMapper; private ThirdPartyPlatformServiceMapper thirdPartyPlatformServiceMapper;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Value("${govt.host:}") @Value("${govt.host:}")
public String govtHost; public String govtHost;
@ -47,7 +47,7 @@ public class AsyncEnvironment {
@Async("environmentNoiseDataExecutor") @Async("environmentNoiseDataExecutor")
public void sendEnvironmentNoiseData(DustNoiseData dustNoiseData, EnvironmentDev environmentDev) { public void sendEnvironmentNoiseData(DustNoiseData dustNoiseData, EnvironmentDev environmentDev) {
try { try {
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
/*QueryWrapper<ProjectUfaceConfig> queryWrapper =new QueryWrapper<>(); /*QueryWrapper<ProjectUfaceConfig> queryWrapper =new QueryWrapper<>();
queryWrapper.lambda().eq(ProjectUfaceConfig::getProjectSn, environmentDev.getProjectSn()); queryWrapper.lambda().eq(ProjectUfaceConfig::getProjectSn, environmentDev.getProjectSn());
ProjectUfaceConfig tempProjectUfaceConfig=projectUfaceConfigMapper.selectOne(queryWrapper); ProjectUfaceConfig tempProjectUfaceConfig=projectUfaceConfigMapper.selectOne(queryWrapper);

View File

@ -13,7 +13,7 @@ import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
import com.zhgd.xmgl.modules.worker.mapper.DepartmentInfoMapper; import com.zhgd.xmgl.modules.worker.mapper.DepartmentInfoMapper;
import com.zhgd.xmgl.modules.worker.mapper.TeamInfoMapper; import com.zhgd.xmgl.modules.worker.mapper.TeamInfoMapper;
import com.zhgd.xmgl.modules.worker.service.IWorkerAttendancePresenceService; import com.zhgd.xmgl.modules.worker.service.IWorkerAttendancePresenceService;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
@ -43,14 +43,14 @@ public class AsyncSendAttendance {
@Autowired @Autowired
private WkServiceuCall wkServiceuCall; private WkServiceuCall wkServiceuCall;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Autowired @Autowired
private GovtOpenApiService govtOpenApiService; private GovtOpenApiService govtOpenApiService;
@Async("sendAttendanceExecutor") @Async("sendAttendanceExecutor")
public void saveAndSendAttendance(WorkerAttendance workerAttendance, WorkerInfo info){ public void saveAndSendAttendance(WorkerAttendance workerAttendance, WorkerInfo info){
try { try {
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 向政务平台发送数据 // 向政务平台发送数据
govtOpenApiService.workerAttendanceSync(workerAttendance); govtOpenApiService.workerAttendanceSync(workerAttendance);
} }

View File

@ -23,7 +23,7 @@ import com.zhgd.xmgl.modules.sanjiang.entity.SjImageProgress;
import com.zhgd.xmgl.modules.sanjiang.entity.SjSendSjImageProgress; import com.zhgd.xmgl.modules.sanjiang.entity.SjSendSjImageProgress;
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo; import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper; import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -50,7 +50,7 @@ public class SanjiangDataCall {
@Value("${sj.business.gateway.api.key:}") @Value("${sj.business.gateway.api.key:}")
String apiKey; String apiKey;
@Autowired @Autowired
ProfileJudgeUtil profileJudgeUtil; EnvironmentUtil environmentUtil;
@Value("${sj.upload.image.url.prefix:}") @Value("${sj.upload.image.url.prefix:}")
private String sjUploadUrlPrefix; private String sjUploadUrlPrefix;
@Autowired @Autowired
@ -63,7 +63,7 @@ public class SanjiangDataCall {
* 判断是三江环境 * 判断是三江环境
*/ */
private boolean judgeSjEnvironment() { private boolean judgeSjEnvironment() {
boolean sjjt = profileJudgeUtil.isSjjt(); boolean sjjt = environmentUtil.isSjjt();
return sjjt && StringUtils.isNotBlank(gateWayUrl) && StringUtils.isNotBlank(apiKey); return sjjt && StringUtils.isNotBlank(gateWayUrl) && StringUtils.isNotBlank(apiKey);
} }

View File

@ -4,6 +4,7 @@ import cn.hutool.crypto.SecureUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gexin.fastjson.JSON;
import com.zhgd.annotation.OperLog; import com.zhgd.annotation.OperLog;
import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.jeecg.common.api.vo.Result;
import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.jeecg.common.mybatis.EntityMap;
@ -125,7 +126,7 @@ public class ProjectController {
@ApiOperation(value = " 三江业务中台添加项目", notes = "三江业务中台添加项目", httpMethod = "POST") @ApiOperation(value = " 三江业务中台添加项目", notes = "三江业务中台添加项目", httpMethod = "POST")
@PostMapping(value = "/sj/business/add") @PostMapping(value = "/sj/business/add")
public Result addSjProject(@RequestBody @Validate SjProjectDto dto) { public Result addSjProject(@RequestBody @Validate SjProjectDto dto) {
log.info("addSjProject{}", dto); log.info("addSjProject{}", JSON.toJSONString(dto));
Project project = new Project(); Project project = new Project();
BeanUtils.copyProperties(dto, project); BeanUtils.copyProperties(dto, project);
project.setCompanySn("B386480F85E84592B8E102224D090794"); project.setCompanySn("B386480F85E84592B8E102224D090794");
@ -143,7 +144,7 @@ public class ProjectController {
@ApiOperation(value = " 三江业务中台更新项目根据项目编号projectNumber更新", notes = "三江业务中台更新项目根据项目编号projectNumber更新", httpMethod = "POST") @ApiOperation(value = " 三江业务中台更新项目根据项目编号projectNumber更新", notes = "三江业务中台更新项目根据项目编号projectNumber更新", httpMethod = "POST")
@PostMapping(value = "/sj/business/update") @PostMapping(value = "/sj/business/update")
public Result updateSjProject(@RequestBody @Validate SjProjectDto dto) { public Result updateSjProject(@RequestBody @Validate SjProjectDto dto) {
log.info("updateSjProject{}", dto); log.info("updateSjProject{}", JSON.toJSONString(dto));
Project project = new Project(); Project project = new Project();
BeanUtils.copyProperties(dto, project); BeanUtils.copyProperties(dto, project);
project.setCompanySn("B386480F85E84592B8E102224D090794"); project.setCompanySn("B386480F85E84592B8E102224D090794");

View File

@ -28,7 +28,7 @@ import com.zhgd.xmgl.modules.project.entity.vo.ActualProgressVO;
import com.zhgd.xmgl.modules.project.enums.LevelNameEnum; import com.zhgd.xmgl.modules.project.enums.LevelNameEnum;
import com.zhgd.xmgl.modules.project.mapper.ProgressTaskMapper; import com.zhgd.xmgl.modules.project.mapper.ProgressTaskMapper;
import com.zhgd.xmgl.modules.project.service.ProgressTaskService; import com.zhgd.xmgl.modules.project.service.ProgressTaskService;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.mpxj.MPXJException; import net.sf.mpxj.MPXJException;
import net.sf.mpxj.ProjectFile; import net.sf.mpxj.ProjectFile;
@ -90,7 +90,7 @@ public class ProgressTaskServiceImpl extends ServiceImpl<ProgressTaskMapper, Pro
private String basement = "地下室底板"; private String basement = "地下室底板";
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -489,7 +489,7 @@ public class ProgressTaskServiceImpl extends ServiceImpl<ProgressTaskMapper, Pro
* @return * @return
*/ */
private boolean isBIMAsyncEnable() { private boolean isBIMAsyncEnable() {
return profileJudgeUtil.isZjsj() || profileJudgeUtil.isShahu(); return environmentUtil.isZjsj() || environmentUtil.isShahu();
} }
private BIMProgressTaskRqBody buildBimTask(ProgressTask progressTask, String major, String floorName, String district, String building) { private BIMProgressTaskRqBody buildBimTask(ProgressTask progressTask, String major, String floorName, String district, String building) {
@ -504,9 +504,9 @@ public class ProgressTaskServiceImpl extends ServiceImpl<ProgressTaskMapper, Pro
body.setDistrict(district); body.setDistrict(district);
body.setBuilding(building); body.setBuilding(building);
body.setProgressTaskId(progressTask.getId()); body.setProgressTaskId(progressTask.getId());
if (profileJudgeUtil.isZjsj()) { if (environmentUtil.isZjsj()) {
body.setProjectId(1); body.setProjectId(1);
} else if (profileJudgeUtil.isShahu()) { } else if (environmentUtil.isShahu()) {
body.setProjectId(2); body.setProjectId(2);
} }
String sign = getBimProgressTaskRqBodyMd5Sign(body); String sign = getBimProgressTaskRqBodyMd5Sign(body);

View File

@ -60,8 +60,8 @@ import com.zhgd.xmgl.modules.video.mapper.VideoItemMapper;
import com.zhgd.xmgl.modules.worker.entity.UfaceDev; import com.zhgd.xmgl.modules.worker.entity.UfaceDev;
import com.zhgd.xmgl.modules.worker.service.*; import com.zhgd.xmgl.modules.worker.service.*;
import com.zhgd.xmgl.util.AddressUtil; import com.zhgd.xmgl.util.AddressUtil;
import com.zhgd.xmgl.util.EnvironmentUtil;
import com.zhgd.xmgl.util.MessageUtil; import com.zhgd.xmgl.util.MessageUtil;
import com.zhgd.xmgl.util.ProfileJudgeUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -98,7 +98,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
@Autowired @Autowired
private SystemAreasMapper systemAreasMapper; private SystemAreasMapper systemAreasMapper;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Autowired @Autowired
private ProjectMapper projectMapper; private ProjectMapper projectMapper;
@Autowired @Autowired

View File

@ -21,7 +21,7 @@ import com.zhgd.xmgl.modules.worker.entity.WorkerType;
import com.zhgd.xmgl.modules.worker.service.ITeamInfoService; import com.zhgd.xmgl.modules.worker.service.ITeamInfoService;
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService; import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
import com.zhgd.xmgl.modules.worker.service.IWorkerTypeService; import com.zhgd.xmgl.modules.worker.service.IWorkerTypeService;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
@ -55,7 +55,7 @@ public class ProjectOperationsAnalysisServiceImpl extends ServiceImpl<ProjectOpe
@Autowired @Autowired
GovtOpenApiService govtOpenApiService; GovtOpenApiService govtOpenApiService;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -81,7 +81,7 @@ public class ProjectOperationsAnalysisServiceImpl extends ServiceImpl<ProjectOpe
baseMapper.deleteById(projectOperationsAnalysis.getId()); baseMapper.deleteById(projectOperationsAnalysis.getId());
} }
this.saveBatch(analysisList); this.saveBatch(analysisList);
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 同步到政务平台 // 同步到政务平台
govtOpenApiService.projectOperationsAnalysisUpdateSync(analysisList); govtOpenApiService.projectOperationsAnalysisUpdateSync(analysisList);
} }

View File

@ -91,7 +91,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
@Autowired @Autowired
private GovtOpenApiService govtOpenApiService; private GovtOpenApiService govtOpenApiService;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Autowired @Autowired
private ICompanyService companyService; private ICompanyService companyService;
@ -122,7 +122,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
String nowTime = sdf1.format(new Date()); String nowTime = sdf1.format(new Date());
workerAttendanceMapper.insert(workerAttendance); workerAttendanceMapper.insert(workerAttendance);
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 向政务平台发送数据 // 向政务平台发送数据
govtOpenApiService.workerAttendanceSync(workerAttendance); govtOpenApiService.workerAttendanceSync(workerAttendance);
} }
@ -470,7 +470,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
workerAttendance.setCardType(7); workerAttendance.setCardType(7);
workerAttendance.setImageUrl(MapUtils.getString(map, "photoUrl")); workerAttendance.setImageUrl(MapUtils.getString(map, "photoUrl"));
workerAttendanceMapper.insert(workerAttendance); workerAttendanceMapper.insert(workerAttendance);
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 向政务平台发送数据 // 向政务平台发送数据
govtOpenApiService.workerAttendanceSync(workerAttendance); govtOpenApiService.workerAttendanceSync(workerAttendance);
} }
@ -753,7 +753,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
workerAttendance.setDevSn(devSn); workerAttendance.setDevSn(devSn);
workerAttendance.setPassType(type); workerAttendance.setPassType(type);
workerAttendance.setCardType(2); workerAttendance.setCardType(2);
if (profileJudgeUtil.isJlw()) { if (environmentUtil.isJlw()) {
workerAttendance.setIsStatistics(0); workerAttendance.setIsStatistics(0);
} else { } else {
workerAttendance.setIsStatistics(1); workerAttendance.setIsStatistics(1);
@ -766,7 +766,7 @@ public class WorkerAttendanceServiceImpl extends ServiceImpl<WorkerAttendanceMap
workerAttendance.setAttendanceType(1); workerAttendance.setAttendanceType(1);
workerAttendanceMapper.insert(workerAttendance); workerAttendanceMapper.insert(workerAttendance);
//asyncSendAttendance.saveAndSendAttendance(workerAttendance,info); //asyncSendAttendance.saveAndSendAttendance(workerAttendance,info);
if (profileJudgeUtil.isJlw()) { if (environmentUtil.isJlw()) {
// 向政务平台发送数据 // 向政务平台发送数据
govtOpenApiService.workerAttendanceSync(workerAttendance); govtOpenApiService.workerAttendanceSync(workerAttendance);
workerAttendancePresenceService.addWorkerAttendancePresence(workerAttendance); workerAttendancePresenceService.addWorkerAttendancePresence(workerAttendance);

View File

@ -107,7 +107,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
@Autowired @Autowired
private GovtOpenApiService govtOpenApiService; private GovtOpenApiService govtOpenApiService;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Value("${basePath}") @Value("${basePath}")
private String basePath; private String basePath;
@ -273,7 +273,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
if (isGetFaceFeatureDate) { if (isGetFaceFeatureDate) {
workerPhotoFeaturesService.saveWorkerPhotoFeatures(workerInfo); workerPhotoFeaturesService.saveWorkerPhotoFeatures(workerInfo);
} }
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 同步到政务平台 // 同步到政务平台
govtOpenApiService.workerInfoAddSync(workerInfo); govtOpenApiService.workerInfoAddSync(workerInfo);
} }
@ -321,7 +321,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
if (isGetFaceFeatureDate) { if (isGetFaceFeatureDate) {
workerPhotoFeaturesService.saveWorkerPhotoFeatures(workerInfo); workerPhotoFeaturesService.saveWorkerPhotoFeatures(workerInfo);
} }
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 同步到政务平台 // 同步到政务平台
govtOpenApiService.workerInfoAddSync(workerInfo); govtOpenApiService.workerInfoAddSync(workerInfo);
} }
@ -343,7 +343,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
//上传住建 //上传住建
asyncWorker.sendExitWorkById(workerInfo, 1); asyncWorker.sendExitWorkById(workerInfo, 1);
workerInfoMapper.deleteById(id); workerInfoMapper.deleteById(id);
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 同步 // 同步
govtOpenApiService.workerInfoDelSync(workerInfo); govtOpenApiService.workerInfoDelSync(workerInfo);
} }

View File

@ -16,8 +16,8 @@ import com.zhgd.xmgl.modules.worker.entity.WorkerMonthAttendanceStatistics;
import com.zhgd.xmgl.modules.worker.mapper.*; import com.zhgd.xmgl.modules.worker.mapper.*;
import com.zhgd.xmgl.modules.worker.service.IWorkerMonthAttendanceStatisticsService; import com.zhgd.xmgl.modules.worker.service.IWorkerMonthAttendanceStatisticsService;
import com.zhgd.xmgl.util.DateUtil; import com.zhgd.xmgl.util.DateUtil;
import com.zhgd.xmgl.util.EnvironmentUtil;
import com.zhgd.xmgl.util.JxlExcelUtils; import com.zhgd.xmgl.util.JxlExcelUtils;
import com.zhgd.xmgl.util.ProfileJudgeUtil;
import com.zhgd.xmgl.util.ReflectUtils; import com.zhgd.xmgl.util.ReflectUtils;
import lombok.extern.log4j.Log4j; import lombok.extern.log4j.Log4j;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
@ -57,7 +57,7 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
@Autowired @Autowired
private GovtOpenApiService govtOpenApiService; private GovtOpenApiService govtOpenApiService;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
@Override @Override
@ -148,7 +148,7 @@ public class WorkerMonthAttendanceStatisticsServiceImpl extends ServiceImpl<Work
workerMonthAttendanceDurationMapper.insert(duration); workerMonthAttendanceDurationMapper.insert(duration);
//workerMonthAttendanceDurationMapper.insertMonthAttendanceDuration(param); //workerMonthAttendanceDurationMapper.insertMonthAttendanceDuration(param);
} }
if (profileJudgeUtil.isJlwProd()) { if (environmentUtil.isJlwProd()) {
// 同步到湖里政务平台 // 同步到湖里政务平台
WorkerMonthAttendanceStatistics syncData = workerMonthAttendanceStatisticsMapper.selectByCondition(param); WorkerMonthAttendanceStatistics syncData = workerMonthAttendanceStatisticsMapper.selectByCondition(param);
if (ObjectUtil.isNotNull(syncData)) { if (ObjectUtil.isNotNull(syncData)) {

View File

@ -10,7 +10,7 @@ import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.MiddleGcjkd;
import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.MiddleGcxx; import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.MiddleGcxx;
import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.VideoItemConfigBo; import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.VideoItemConfigBo;
import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo; import com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -32,13 +32,13 @@ public class MiddleService {
@Autowired @Autowired
private VideoItemMapper videoItemMapper; private VideoItemMapper videoItemMapper;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
/** /**
* 同步项目结构化数据到北京市政局 * 同步项目结构化数据到北京市政局
*/ */
public void syncProject() { public void syncProject() {
if (profileJudgeUtil.isYlwwProd()) { if (environmentUtil.isYlwwProd()) {
//从中间库接口获取所有项目 //从中间库接口获取所有项目
String url = ipPort + "/middle/middleGcxx/list"; String url = ipPort + "/middle/middleGcxx/list";
log.info("getMiddleProject{}", url); log.info("getMiddleProject{}", url);
@ -80,7 +80,7 @@ public class MiddleService {
* 同步视频点位结构化数据到北京市政局 * 同步视频点位结构化数据到北京市政局
*/ */
public void syncMiddleGcjkd() { public void syncMiddleGcjkd() {
if (profileJudgeUtil.isYlwwProd()) { if (environmentUtil.isYlwwProd()) {
//从中间库接口获取所有监控点位 //从中间库接口获取所有监控点位
String url = ipPort + "/middle/middleGcjkd/list"; String url = ipPort + "/middle/middleGcjkd/list";
log.info("getMiddleProject{}", url); log.info("getMiddleProject{}", url);

View File

@ -1,7 +1,7 @@
package com.zhgd.xmgl.modules.yunlianwanwu.middle.task; package com.zhgd.xmgl.modules.yunlianwanwu.middle.task;
import com.zhgd.xmgl.modules.yunlianwanwu.middle.service.MiddleService; import com.zhgd.xmgl.modules.yunlianwanwu.middle.service.MiddleService;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.javacrumbs.shedlock.core.SchedulerLock; import net.javacrumbs.shedlock.core.SchedulerLock;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -18,7 +18,7 @@ public class MiddleTask {
@Autowired @Autowired
private MiddleService middleService; private MiddleService middleService;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
/** /**
* 云联万物同步结构化数据任务每天同步一次 * 云联万物同步结构化数据任务每天同步一次

View File

@ -7,7 +7,7 @@ import com.zhgd.xmgl.entity.sj.JwtPayloadUserInfo;
import com.zhgd.xmgl.entity.sj.TokenResponse; import com.zhgd.xmgl.entity.sj.TokenResponse;
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser; import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper; import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import com.zhgd.xmgl.util.sj.JwtRsaUtils; import com.zhgd.xmgl.util.sj.JwtRsaUtils;
import com.zhgd.xmgl.util.sj.SjUnifiedAuthenticationHttpUtil; import com.zhgd.xmgl.util.sj.SjUnifiedAuthenticationHttpUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -54,7 +54,7 @@ public class JwtTokenFilter extends OncePerRequestFilter {
@Autowired @Autowired
private StringRedisTemplate redisTemplate; private StringRedisTemplate redisTemplate;
@Autowired @Autowired
private ProfileJudgeUtil profileJudgeUtil; private EnvironmentUtil environmentUtil;
public static ThreadLocal<JwtPayloadUserInfo> sjUser = new ThreadLocal<>(); public static ThreadLocal<JwtPayloadUserInfo> sjUser = new ThreadLocal<>();
@ -66,7 +66,7 @@ public class JwtTokenFilter extends OncePerRequestFilter {
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
if (securityEnable) { if (securityEnable) {
//三江统一认证3.登录过滤器判断回调地址获取code调用获取令牌首页根据令牌获取登录数据信息 //三江统一认证3.登录过滤器判断回调地址获取code调用获取令牌首页根据令牌获取登录数据信息
if (profileJudgeUtil.isSjjt()) { if (environmentUtil.isSjjt()) {
try { try {
validateSjProfile(request, response, filterChain); validateSjProfile(request, response, filterChain);
} catch (InvalidKeySpecException e) { } catch (InvalidKeySpecException e) {

View File

@ -1,6 +1,6 @@
package com.zhgd.xmgl.security; package com.zhgd.xmgl.security;
import com.zhgd.xmgl.util.ProfileJudgeUtil; import com.zhgd.xmgl.util.EnvironmentUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -44,7 +44,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
private boolean securityEnable; private boolean securityEnable;
@Autowired @Autowired
ProfileJudgeUtil profileJudgeUtil; EnvironmentUtil environmentUtil;
@Autowired @Autowired
public WebSecurityConfig(JwtAuthenticationEntryPoint unauthorizedHandler, public WebSecurityConfig(JwtAuthenticationEntryPoint unauthorizedHandler,
@ -70,7 +70,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http.headers().frameOptions().disable(); http.headers().frameOptions().disable();
if (securityEnable) { if (securityEnable) {
if (profileJudgeUtil.isGxlt()) { if (environmentUtil.isGxlt()) {
http.authorizeRequests() http.authorizeRequests()
//请求路径允许访问 //请求路径允许访问
.antMatchers("/xmgl/project/getProjectInfoBySn").permitAll(); .antMatchers("/xmgl/project/getProjectInfoBySn").permitAll();

View File

@ -11,7 +11,7 @@ import java.util.stream.Stream;
*/ */
@Component @Component
@Slf4j @Slf4j
public class ProfileJudgeUtil { public class EnvironmentUtil {
@Value("${active.environment.name}") @Value("${active.environment.name}")
private String activeEnvironment; private String activeEnvironment;

View File

@ -95,4 +95,4 @@ sj.business.gateway.url=http://116.169.63.183:30867/
sj.business.gateway.api.key=nDmkHCxlQzCqE-xfYteXMw sj.business.gateway.api.key=nDmkHCxlQzCqE-xfYteXMw
#\u4E09\u6C5F\u56FE\u7247\u8BBF\u95EE\u8DEF\u5F84\uFF08\u7528\u4E8E\u63A8\u9001\u4E1A\u52A1\u4E2D\u53F0\uFF09 #\u4E09\u6C5F\u56FE\u7247\u8BBF\u95EE\u8DEF\u5F84\uFF08\u7528\u4E8E\u63A8\u9001\u4E1A\u52A1\u4E2D\u53F0\uFF09
sj.upload.image.url.prefix=http://192.168.34.221:11111/image/ sj.upload.image.url.prefix=http://192.168.34.221:11111/image/
active.environment.name=sjjt-dev