三江-业务中台安全记录同步代码编写
This commit is contained in:
parent
683a36eeda
commit
fd42a84c2a
385
src/main/java/com/zhgd/xmgl/call/SanjiangDataCall.java
Normal file
385
src/main/java/com/zhgd/xmgl/call/SanjiangDataCall.java
Normal file
@ -0,0 +1,385 @@
|
||||
package com.zhgd.xmgl.call;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.gexin.fastjson.JSON;
|
||||
import com.google.common.base.Objects;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.SystemUserMapper;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.*;
|
||||
import com.zhgd.xmgl.modules.project.entity.Project;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
||||
import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
|
||||
import com.zhgd.xmgl.util.ProfileJudgeUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 三江业务中台远程调用
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class SanjiangDataCall {
|
||||
@Autowired
|
||||
ProjectMapper projectMapper;
|
||||
@Value("${sj.business.gateway.url:}")
|
||||
String gateWayUrl;
|
||||
@Value("${sj.business.gateway.api.key:}")
|
||||
String apiKey;
|
||||
@Autowired
|
||||
ProfileJudgeUtil profileJudgeUtil;
|
||||
@Value("${sj.upload.image.url.prefix:}")
|
||||
private String sjUploadUrlPrefix;
|
||||
@Autowired
|
||||
SystemUserMapper systemUserMapper;
|
||||
@Autowired
|
||||
EnterpriseInfoMapper enterpriseInfoMapper;
|
||||
private String apiKeyHeadName = "X-API-KEY";
|
||||
|
||||
/**
|
||||
* 判断是三江环境
|
||||
*/
|
||||
private boolean judgeSjEnvironment() {
|
||||
boolean sjjt = profileJudgeUtil.isSjjt();
|
||||
return sjjt && StringUtils.isNotBlank(gateWayUrl) && StringUtils.isNotBlank(apiKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加安全记录
|
||||
*
|
||||
* @param hiddenDangerInspectRecord
|
||||
*/
|
||||
@Async
|
||||
public void sendAddHiddenDangerInspectionRecord(HiddenDangerInspectRecord hiddenDangerInspectRecord) {
|
||||
if (judgeSjEnvironment()) {
|
||||
log.info("hiddenDangerInspectRecord:{}", hiddenDangerInspectRecord);
|
||||
String uri = "seeyon/safe/add.sj";
|
||||
String url = gateWayUrl + uri;
|
||||
String inspectionRecordBody = buildBodyInspectionRecord(hiddenDangerInspectRecord);
|
||||
log.info("url:{},body:{}", url, inspectionRecordBody);
|
||||
String result = HttpUtil.createPost(url).contentType("application/json").body(inspectionRecordBody).header(apiKeyHeadName, apiKey).execute().body();
|
||||
log.info("httpRs:{}", result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private String buildBodyInspectionRecord(HiddenDangerInspectRecord hi) {
|
||||
SjSendHiddenDangerInspectionRecord inspectionRecord = new SjSendHiddenDangerInspectionRecord();
|
||||
inspectionRecord.setId(hi.getId());
|
||||
inspectionRecord.setDutyRegion(hi.getDutyRegion());
|
||||
inspectionRecord.setHiddenDangerLevel(hi.getHiddenDangerLevel());
|
||||
inspectionRecord.setRectifyRequire(hi.getRectifyRequire());
|
||||
inspectionRecord.setDangerDesc(hi.getDangerDesc());
|
||||
inspectionRecord.setFaultLevelName(getFaultLevelName(hi.getFaultLevel()));
|
||||
inspectionRecord.setInspectTime(hi.getInspectTime());
|
||||
inspectionRecord.setChangeLimitTime(hi.getChangeLimitTime());
|
||||
inspectionRecord.setImageUrl(getImageUrl(hi.getImageUrl()));
|
||||
inspectionRecord.setChangeUserName(getUserName(hi.getChangeUser()));
|
||||
inspectionRecord.setRecordTypeName(getRecordTypeName(hi.getRecordType()));
|
||||
inspectionRecord.setReviewUserName(getUserName(hi.getReviewId()));
|
||||
inspectionRecord.setStatusName(getStatusName(hi.getStatus()));
|
||||
inspectionRecord.setEnterpriseName(getEnterpriseName(hi.getEnterpriseSn()));
|
||||
inspectionRecord.setCreateUserName(getUserName(hi.getCreateUser()));
|
||||
inspectionRecord.setDangerTypeName(getDangerTypeName(hi.getCheckItem(), hi.getCheckSubitem()));
|
||||
Project p = getProjectNumber(hi.getProjectSn());
|
||||
if (p != null) {
|
||||
inspectionRecord.setProjectNumber(p.getProjectNumber());
|
||||
inspectionRecord.setProjectName(p.getProjectName());
|
||||
}
|
||||
inspectionRecord.setCheckContent(hi.getCheckContent());
|
||||
return JSON.toJSONString(inspectionRecord);
|
||||
}
|
||||
|
||||
private Project getProjectNumber(String projectSn) {
|
||||
if (StringUtils.isBlank(projectSn)) {
|
||||
return null;
|
||||
}
|
||||
Project project = projectMapper.selectOne(new LambdaQueryWrapper<Project>().eq(Project::getProjectSn, projectSn));
|
||||
if (project == null) {
|
||||
throw new RuntimeException("安全记录的项目为空");
|
||||
}
|
||||
return project;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取隐患类型名称
|
||||
*
|
||||
* @param checkItem
|
||||
* @param checkSubitem
|
||||
* @return
|
||||
*/
|
||||
private String getDangerTypeName(String checkItem, String checkSubitem) {
|
||||
String s = checkItem;
|
||||
String separator = "/";
|
||||
if (StringUtils.isNotBlank(checkSubitem)) {
|
||||
s += separator;
|
||||
s += checkSubitem;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
private String getEnterpriseName(String enterpriseSn) {
|
||||
if (StringUtils.isBlank(enterpriseSn)) {
|
||||
return null;
|
||||
}
|
||||
EnterpriseInfo ei = enterpriseInfoMapper.selectOne(Wrappers.<EnterpriseInfo>lambdaQuery().eq(EnterpriseInfo::getEnterpriseSn, enterpriseSn));
|
||||
return ei.getEnterpriseName();
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态,1无需整改,2待整改,3待复查,4合格,5不合格
|
||||
*
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
private String getStatusName(Integer status) {
|
||||
if (status == null) {
|
||||
return null;
|
||||
}
|
||||
switch (status) {
|
||||
case 1:
|
||||
return "无需整改";
|
||||
case 2:
|
||||
return "待整改";
|
||||
case 3:
|
||||
return "待复查";
|
||||
case 4:
|
||||
return "合格";
|
||||
case 5:
|
||||
return "不合格";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类型,1隐患问题,2排查记录
|
||||
*
|
||||
* @param recordType
|
||||
* @return
|
||||
*/
|
||||
private String getRecordTypeName(Integer recordType) {
|
||||
if (recordType == null) {
|
||||
return null;
|
||||
}
|
||||
switch (recordType) {
|
||||
case 1:
|
||||
return "隐患问题";
|
||||
case 2:
|
||||
return "排查记录";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取整改人名称
|
||||
*
|
||||
* @param changeUser
|
||||
* @return
|
||||
*/
|
||||
private String getUserName(Long changeUser) {
|
||||
if (changeUser == null) {
|
||||
return null;
|
||||
}
|
||||
SystemUser systemUser = systemUserMapper.selectById(changeUser);
|
||||
if (systemUser == null) {
|
||||
return null;
|
||||
}
|
||||
return systemUser.getRealName();
|
||||
}
|
||||
|
||||
/**
|
||||
* uri添加变成url
|
||||
*
|
||||
* @param imageUrl
|
||||
* @return
|
||||
*/
|
||||
private String getImageUrl(String imageUrl) {
|
||||
String[] split = StringUtils.split(imageUrl, ",");
|
||||
if (split == null) {
|
||||
return null;
|
||||
}
|
||||
ArrayList<String> urlList = new ArrayList<>();
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
String fileUri = split[i];
|
||||
if (!StringUtils.startsWith(fileUri, "http")) {
|
||||
fileUri = sjUploadUrlPrefix + fileUri;
|
||||
}
|
||||
urlList.add(fileUri);
|
||||
}
|
||||
return StringUtils.join(urlList, ",");
|
||||
}
|
||||
|
||||
private String getFaultLevelName(String faultLevel) {
|
||||
if (faultLevel == null) {
|
||||
return null;
|
||||
}
|
||||
switch (faultLevel) {
|
||||
case "1":
|
||||
return "一般";
|
||||
case "2":
|
||||
return "重大";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除安全记录
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@Async
|
||||
public void sendDeleteHiddenDangerInspectRecord(Long id) {
|
||||
if (judgeSjEnvironment()) {
|
||||
log.info("sendDeleteHiddenDangerInspectRecord的id:{}", id);
|
||||
if (id == null) {
|
||||
return;
|
||||
}
|
||||
String uri = "seeyon/safe/delete.sj";
|
||||
String url = gateWayUrl + uri;
|
||||
SjSendHiddenDangerInspectionRecord inspectionRecord = new SjSendHiddenDangerInspectionRecord();
|
||||
inspectionRecord.setId(id);
|
||||
String inspectionRecordBody = JSON.toJSONString(inspectionRecord);
|
||||
log.info("sendDeleteHiddenDangerInspectRecord,url:{},body:{}", url, inspectionRecordBody);
|
||||
String result = HttpUtil.createPost(url).contentType("application/json").body(inspectionRecordBody).header(apiKeyHeadName, apiKey).execute().body();
|
||||
log.info("sendDeleteHiddenDangerInspectRecord,httpRs:{}", result);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新安全记录(只更改状态)
|
||||
*/
|
||||
@Async
|
||||
public void sendUpdateHiddenDangerInspectionRecord(HiddenDangerInspectRecord hi) {
|
||||
if (judgeSjEnvironment()) {
|
||||
log.info("sendUpdateHiddenDangerInspectionRecord:{}", hi);
|
||||
String uri = "seeyon/safe/update.sj";
|
||||
String url = gateWayUrl + uri;
|
||||
SjSendHiddenDangerInspectionRecord inspectionRecord = new SjSendHiddenDangerInspectionRecord();
|
||||
inspectionRecord.setId(hi.getId());
|
||||
inspectionRecord.setStatusName(getStatusName(hi.getStatus()));
|
||||
String inspectionRecordBody = JSON.toJSONString(inspectionRecord);
|
||||
log.info("url:{},body:{}", url, inspectionRecordBody);
|
||||
String result = HttpUtil.createPost(url).contentType("application/json").body(inspectionRecordBody).header(apiKeyHeadName, apiKey).execute().body();
|
||||
log.info("httpRs:{}", result);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增安全整改/复查记录
|
||||
*
|
||||
* @param hdrr
|
||||
* @param hdir
|
||||
*/
|
||||
@Async
|
||||
public void sendAddHiddenDangerRectifyRecord(HiddenDangerRectifyRecord hdrr, HiddenDangerInspectRecord hdir) {
|
||||
if (judgeSjEnvironment()) {
|
||||
log.info("sendAddHiddenDangerRectifyRecord:{}", JSON.toJSONString(hdrr));
|
||||
/*
|
||||
`type` tinyint(3) DEFAULT NULL COMMENT '类型,1整改记录,2复查记录',
|
||||
`status` tinyint(3) DEFAULT NULL COMMENT '结果,整改时候1未整改,2已整改。复查时候1复查不合格,2复查合格。',
|
||||
*/
|
||||
log.info("getType:{}", hdrr.getType());
|
||||
if (Objects.equal(hdrr.getType(), 1)) {
|
||||
String uri = "seeyon/safe/addRectification.sj";
|
||||
String url = gateWayUrl + uri;
|
||||
String body = buildBodySjSendHiddenDangerRectifyRecord(hdrr, hdir);
|
||||
log.info("url:{},body:{}", url, body);
|
||||
String result = HttpUtil.createPost(url).contentType("application/json").body(body).header(apiKeyHeadName, apiKey).execute().body();
|
||||
log.info("httpRs:{}", result);
|
||||
} else if (Objects.equal(hdrr.getType(), 2)) {
|
||||
String uri = "seeyon/safe/addReview.sj";
|
||||
String url = gateWayUrl + uri;
|
||||
String body = buildBodySjSendHiddenDangerReviewRecord(hdrr, hdir);
|
||||
log.info("url:{},body:{}", url, body);
|
||||
String result = HttpUtil.createPost(url).contentType("application/json").body(body).header(apiKeyHeadName, apiKey).execute().body();
|
||||
log.info("httpRs:{}", result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全的整改记录
|
||||
*
|
||||
* @param hd
|
||||
* @param hdir
|
||||
* @return
|
||||
*/
|
||||
private String buildBodySjSendHiddenDangerRectifyRecord(HiddenDangerRectifyRecord hd, HiddenDangerInspectRecord hdir) {
|
||||
SjSendHiddenDangerRectifyRecord r = new SjSendHiddenDangerRectifyRecord();
|
||||
r.setId(hd.getId());
|
||||
r.setUserName(getUserName(hdir.getChangeUser()));
|
||||
r.setStatusName(getRectifyRecordStatusName(hd.getStatus()));
|
||||
r.setAdditionalRemarks(hd.getAdditionalRemarks());
|
||||
r.setFileUrl(getImageUrl(hd.getFileUrl()));
|
||||
r.setInspectId(hdir.getId());
|
||||
r.setCreateTime(hd.getCreateTime());
|
||||
return JSON.toJSONString(r);
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全的复查记录
|
||||
*
|
||||
* @param hd
|
||||
* @param hdir
|
||||
* @return
|
||||
*/
|
||||
private String buildBodySjSendHiddenDangerReviewRecord(HiddenDangerRectifyRecord hd, HiddenDangerInspectRecord hdir) {
|
||||
SjSendHiddenDangerReviewRecord r = new SjSendHiddenDangerReviewRecord();
|
||||
r.setId(hd.getId());
|
||||
r.setUserName(getUserName(hdir.getReviewId()));
|
||||
r.setStatusName(getReviewRecordStatusName(hd.getStatus()));
|
||||
r.setAdditionalRemarks(hd.getAdditionalRemarks());
|
||||
r.setInspectId(hdir.getId());
|
||||
r.setCreateTime(hd.getCreateTime());
|
||||
return JSON.toJSONString(r);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取安全的整改记录的状态
|
||||
*
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
private String getRectifyRecordStatusName(Integer status) {
|
||||
if (status == null) {
|
||||
return null;
|
||||
}
|
||||
switch (status) {
|
||||
//1未整改,2已整改
|
||||
case 1:
|
||||
return "未整改";
|
||||
case 2:
|
||||
return "已整改";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取安全的复查记录的状态
|
||||
*
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
private String getReviewRecordStatusName(Integer status) {
|
||||
if (status == null) {
|
||||
return null;
|
||||
}
|
||||
switch (status) {
|
||||
//1复查不合格,2复查合格。
|
||||
case 1:
|
||||
return "复查不合格";
|
||||
case 2:
|
||||
return "复查合格";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -32,8 +32,8 @@ public class UploadFileServiceImpl implements UploadFileService {
|
||||
@Value("${basePath}")
|
||||
private String basePath;
|
||||
|
||||
@Value("${sj.upload.image.url:}")
|
||||
private String sjUploadUrl;
|
||||
@Value("${sj.upload.image.url.prefix:}")
|
||||
private String sjUploadUrlPrefix;
|
||||
|
||||
@Autowired
|
||||
private FileStorageService fileStorageService;
|
||||
@ -283,7 +283,7 @@ public class UploadFileServiceImpl implements UploadFileService {
|
||||
UploadImageVo uploadImageVo = new UploadImageVo();
|
||||
String filename = fileInfo.getFilename();
|
||||
uploadImageVo.setImgName(filename);
|
||||
uploadImageVo.setImgUrl(sjUploadUrl + filename);
|
||||
uploadImageVo.setImgUrl(sjUploadUrlPrefix + filename);
|
||||
return Result.success(uploadImageVo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
package com.zhgd.xmgl.modules.dangerous.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三江发送业务中台的安全记录
|
||||
*/
|
||||
@Data
|
||||
public class SjSendHiddenDangerInspectionRecord {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 责任区域
|
||||
*/
|
||||
private String dutyRegion;
|
||||
/**
|
||||
* 隐患级别
|
||||
*/
|
||||
private String hiddenDangerLevel;
|
||||
/**
|
||||
* 整改要求
|
||||
*/
|
||||
private String rectifyRequire;
|
||||
/**
|
||||
* 补充说明
|
||||
*/
|
||||
private String dangerDesc;
|
||||
/**
|
||||
* 事故隐患等级(一般,重大)
|
||||
*/
|
||||
private String faultLevelName;
|
||||
/**
|
||||
* 检查时间(格式:2023-03-15 10:39:26)
|
||||
*/
|
||||
private String inspectTime;
|
||||
/**
|
||||
* 整改时限(格式:2023-03-15)
|
||||
*/
|
||||
private String changeLimitTime;
|
||||
/**
|
||||
* 现场图片(相关照片)
|
||||
*/
|
||||
private String imageUrl;
|
||||
/**
|
||||
* 整改人名称
|
||||
*/
|
||||
private String changeUserName;
|
||||
/**
|
||||
* 类型(隐患问题,排查记录)
|
||||
*/
|
||||
private String recordTypeName;
|
||||
/**
|
||||
* 复查人名称
|
||||
*/
|
||||
private String reviewUserName;
|
||||
/**
|
||||
* 检查结果:(无需整改,待整改,待复查,合格,不合格)
|
||||
*/
|
||||
private String statusName;
|
||||
/**
|
||||
* 整改单位
|
||||
*/
|
||||
private String enterpriseName;
|
||||
/**
|
||||
* 检查人名称
|
||||
*/
|
||||
private String createUserName;
|
||||
/**
|
||||
* 隐患类型名称
|
||||
*/
|
||||
private String dangerTypeName;
|
||||
/**
|
||||
* 项目编号
|
||||
*/
|
||||
private String projectNumber;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 隐患明细(隐患内容)
|
||||
*/
|
||||
private String checkContent;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.zhgd.xmgl.modules.dangerous.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三江发送业务中台的安全的整改记录
|
||||
*/
|
||||
@Data
|
||||
public class SjSendHiddenDangerRectifyRecord {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 整改人
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 整改状态(已整改,未整改)
|
||||
*/
|
||||
private String statusName;
|
||||
/**
|
||||
* 相关说明
|
||||
*/
|
||||
private String additionalRemarks;
|
||||
/**
|
||||
* 相关照片
|
||||
*/
|
||||
private String fileUrl;
|
||||
/**
|
||||
* 安全检查记录id
|
||||
*/
|
||||
private Long inspectId;
|
||||
/**
|
||||
* 创建时间(格式:2023-03-15 10:39:26)
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.zhgd.xmgl.modules.dangerous.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 三江发送业务中台的安全的复查记录
|
||||
*/
|
||||
@Data
|
||||
public class SjSendHiddenDangerReviewRecord {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 复查人
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 复查状态(合格,不合格)
|
||||
*/
|
||||
private String statusName;
|
||||
/**
|
||||
* 相关说明
|
||||
*/
|
||||
private String additionalRemarks;
|
||||
/**
|
||||
* 安全检查记录id
|
||||
*/
|
||||
private Long inspectId;
|
||||
/**
|
||||
* 创建时间(格式:2023-03-15 10:39:26)
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
}
|
||||
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.call.SanjiangDataCall;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerInspectionAcceptanceTableResult;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
@ -64,6 +65,8 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl<HiddenDang
|
||||
private EnterpriseInfoMapper enterpriseInfoMapper;
|
||||
@Autowired
|
||||
private INoticeService noticeService;
|
||||
@Autowired
|
||||
SanjiangDataCall sanjiangDataCall;
|
||||
|
||||
@Override
|
||||
public void deleteHiddenDangerInspectRecord(Long id) {
|
||||
@ -74,6 +77,8 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl<HiddenDang
|
||||
QueryWrapper<DangerInspectionAcceptanceTableResult> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().eq(DangerInspectionAcceptanceTableResult::getInspectId, id);
|
||||
dangerInspectionAcceptanceTableResultMapper.delete(queryWrapper);
|
||||
|
||||
sanjiangDataCall.sendDeleteHiddenDangerInspectRecord(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -136,6 +141,8 @@ public class HiddenDangerInspectRecordServiceImpl extends ServiceImpl<HiddenDang
|
||||
if (hiddenDangerInspectRecord.getRecordType() == 1 && hiddenDangerInspectRecord.getStatus() != 1) {
|
||||
noticeService.addUserNotice(hiddenDangerInspectRecord.getChangeUser(), "您有一条安全检查待整改,检查内容:" + hiddenDangerInspectRecord.getCheckContent(), "安全管理待整改", "10");
|
||||
}
|
||||
|
||||
sanjiangDataCall.sendAddHiddenDangerInspectionRecord(hiddenDangerInspectRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.dangerous.service.impl;
|
||||
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.call.SanjiangDataCall;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerInspectRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.HiddenDangerRectifyRecord;
|
||||
@ -35,6 +36,8 @@ public class HiddenDangerRectifyRecordServiceImpl extends ServiceImpl<HiddenDang
|
||||
private HiddenDangerInspectRecordMapper hiddenDangerInspectRecordMapper;
|
||||
@Autowired
|
||||
private INoticeService noticeService;
|
||||
@Autowired
|
||||
SanjiangDataCall sanjiangDataCall;
|
||||
|
||||
@Override
|
||||
public List<EntityMap> selectHiddenDangerRectifyRecordList(Map<String, Object> map) {
|
||||
@ -87,5 +90,8 @@ public class HiddenDangerRectifyRecordServiceImpl extends ServiceImpl<HiddenDang
|
||||
}
|
||||
hiddenDangerInspectRecord.setUpdateTime(new Date());
|
||||
hiddenDangerInspectRecordMapper.updateById(hiddenDangerInspectRecord);
|
||||
|
||||
sanjiangDataCall.sendUpdateHiddenDangerInspectionRecord(hiddenDangerInspectRecord);
|
||||
sanjiangDataCall.sendAddHiddenDangerRectifyRecord(hiddenDangerRectifyRecord,hiddenDangerInspectRecord);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.call.SanjiangDataCall;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.quality.entity.QualityRectifyRecord;
|
||||
@ -38,6 +39,8 @@ import java.util.*;
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class QualityInspectionRecordServiceImpl extends ServiceImpl<QualityInspectionRecordMapper, QualityInspectionRecord> implements IQualityInspectionRecordService {
|
||||
@Autowired
|
||||
SanjiangDataCall sanjiangDataCall;
|
||||
@Autowired
|
||||
private QualityInspectionRecordMapper qualityInspectionRecordMapper;
|
||||
@Autowired
|
||||
|
||||
@ -73,21 +73,25 @@ license.licensePath=C:/jxj/prod/backEnd/license/license.lic
|
||||
license.publicKeysStorePath=C:/jxj/prod/backEnd/license/publicCerts.keystore
|
||||
|
||||
#\u4E09\u6C5F\u7EDF\u4E00\u767B\u5F55\u7684\u6570\u636E\u540C\u6B65
|
||||
#mq\u768461616\u7AEF\u53E3\u5BF9\u5E94\u7684\u5730\u5740
|
||||
#\u4E09\u6C5Fmq\u768461616\u7AEF\u53E3\u5BF9\u5E94\u7684\u5730\u5740
|
||||
uop_sync_mq_brokerurl=tcp://116.169.63.183:31089
|
||||
#mq\u7684\u7528\u6237\u540D
|
||||
#\u4E09\u6C5Fmq\u7684\u7528\u6237\u540D
|
||||
uop_sync_mq_username=admin
|
||||
#mq\u7684\u5BC6\u7801
|
||||
#\u4E09\u6C5Fmq\u7684\u5BC6\u7801
|
||||
uop_sync_mq_password=admin
|
||||
#\u5F00\u542F\u6D88\u606F\u63A5\u6536
|
||||
#\u4E09\u6C5F\u5F00\u542F\u6D88\u606F\u63A5\u6536
|
||||
c2_orguser_subscription=true
|
||||
|
||||
#\u4E09\u6C5F\u7EDF\u4E00\u767B\u5F55\u5730\u5740
|
||||
sj.unifiedAuthentication.login.url=http://116.169.63.183:30913
|
||||
#\u4E09\u6C5F\u7EDF\u4E00\u767B\u5F55\u6210\u529F\u8DF3\u8F6C\u540E\u63A5\u6536code\u7684\u5730\u5740
|
||||
#sj.unifiedAuthentication.login.code.url=http://wbtqry.natappfree.cc/xmgl/sj/unifiedAuthentication/getTokenByCode
|
||||
#\u7EDF\u4E00\u767B\u5F55\u6210\u529F\u540E\u8DF3\u8F6Curl
|
||||
#\u4E09\u6C5F\u7EDF\u4E00\u767B\u5F55\u6210\u529F\u540E\u8DF3\u8F6Curl
|
||||
sj.unifiedAuthentication.success.redirect=http://192.168.34.226:8080/index.html#/login?UID=
|
||||
#\u4E09\u6C5F\u4E1A\u52A1\u4E2D\u53F0\u7F51\u5173\u5730\u5740
|
||||
sj.business.gateway.url=http://116.169.63.183:30867/
|
||||
#\u4E09\u6C5F\u4E1A\u52A1\u4E2D\u53F0\u7F51\u5173\u5730\u5740\u7684\u8C03\u7528\u51ED\u8BC1
|
||||
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
|
||||
sj.upload.image.url.prefix=http://192.168.34.221:11111/image/
|
||||
|
||||
|
||||
sj.upload.image.url=http://192.168.34.221:11111/image/
|
||||
|
||||
@ -1,25 +1,13 @@
|
||||
#http.port=30250
|
||||
http.port=18070
|
||||
#spring.datasource.url=jdbc:mysql://124.71.178.44:3306/wisdomsite_lgdc?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
||||
#spring.datasource.url=jdbc:mysql://183.60.227.61:20246/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&serverTimezone=UTC
|
||||
#spring.datasource.url=jdbc:mysql://36.137.53.203:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
||||
#spring.datasource.url=jdbc:mysql://139.9.66.234:3386/wisdomsite_ty?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
||||
#spring.datasource.url=jdbc:mysql://182.90.224.237:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||
#spring.datasource.url=jdbc:mysql://139.9.66.234:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
|
||||
spring.datasource.url=jdbc:mysql://124.71.67.160:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||
http.port=14090
|
||||
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
|
||||
spring.datasource.username=ENC(XR4C/hvTYCUqudS49Wh/jA==)
|
||||
#spring.datasource.password=ENC(hHkiHEc6vSWjqfOtg2/2Uiihs0vX3l7V)
|
||||
spring.datasource.password=ENC(hHkiHEc6vSWjqfOtg2/2Uiihs0vX3l7V)
|
||||
server.port=8070
|
||||
#server.port=30246
|
||||
server.port=4090
|
||||
basePath=C:/jxj/prod/backEnd/itbgpImage/
|
||||
server.tomcat.basedir=C:/jxj/prod/backEnd/tempImage/
|
||||
#arcsoft.dllPath=D:/hz/wisdomSite/src/main/resources/dll
|
||||
#basePath=F:/zhgd/itbgpImage/
|
||||
#server.tomcat.basedir=F:/zhgd/tempImage/
|
||||
#arcsoft.dllPath=F:/zhgd/dll
|
||||
arcsoft.dllPath=C:/jxj/prod/backEnd/dll
|
||||
security.enable=false
|
||||
security.enable=true
|
||||
isGetStandardData=false
|
||||
isGetEnvironmentData=false
|
||||
isGetFaceFeatureDate=false
|
||||
@ -29,8 +17,6 @@ wx-appid=
|
||||
wx-AppSecret=
|
||||
mqtt-scope=zjsjTopic
|
||||
serverUrl=http://124.71.67.160:8088/
|
||||
#serverUrl=http://182.90.224.237:7000
|
||||
#serverUrl=http://127.0.0.1:6023
|
||||
#\u89C6\u9891\u5206\u6790url
|
||||
video-analysis-url=
|
||||
server.ssl.enabled=false
|
||||
@ -73,7 +59,3 @@ license.licensePath=C:/jxj/prod/backEnd/license/license.lic
|
||||
license.publicKeysStorePath=C:/jxj/prod/backEnd/license/publicCerts.keystore
|
||||
#\u9AD8\u652F\u6A21\u7684tcp\u670D\u52A1\u7AEF\u7684\u7AEF\u53E3\u53F7
|
||||
high_formwork.netty.port=15333
|
||||
#\u4E09\u6C5F\u7EDF\u4E00\u767B\u5F55\u5730\u5740
|
||||
sj.unifiedAuthentication.login.url=http://116.169.63.183:30913
|
||||
#\u4E09\u6C5F\u7EDF\u4E00\u767B\u5F55\u6210\u529F\u8DF3\u8F6C\u540E\u63A5\u6536code\u7684\u5730\u5740
|
||||
sj.unifiedAuthentication.login.code.url=http://ruau8s.natappfree.cc/test/getTokenByCode
|
||||
Loading…
x
Reference in New Issue
Block a user