bug修复

This commit is contained in:
GUO 2024-05-05 17:59:06 +08:00
parent c2753f4b02
commit a215665d59
7 changed files with 69 additions and 32 deletions

View File

@ -152,7 +152,7 @@ public class AsyncHikvision {
asyncHikvision.addCarInfoForHikvisionAsyc(carInfo, now);
}
@Async
@Async("carInfoExecutor")
public void addCarInfoForHikvisionAsyc(CarInfo carInfo, Date now) {
try {
ThreadLocalUtil.addInKey("now", now);
@ -190,7 +190,7 @@ public class AsyncHikvision {
asyncHikvision.editCarInfoForHikvisionAsync(carInfo, old, now);
}
@Async
@Async("carInfoExecutor")
public void editCarInfoForHikvisionAsync(CarInfo carInfo, CarInfo old, Date now) {
try {
ThreadLocalUtil.addInKey("now", now);
@ -209,7 +209,7 @@ public class AsyncHikvision {
asyncHikvision.deleteCarInfoForHikvisionAsync(carInfo, now);
}
@Async
@Async("carInfoExecutor")
public void deleteCarInfoForHikvisionAsync(CarInfo carInfo, Date now) {
try {
ThreadLocalUtil.addInKey("now", now);
@ -220,7 +220,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void addEnterpriseInfoForHikvision(EnterpriseInfo enterpriseInfo) {
try {
hikvisionCall.addEnterpriseInfoForHikvision(enterpriseInfo);
@ -246,7 +246,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void editEnterpriseInfoForHikvision(EnterpriseInfo enterpriseInfo) {
try {
hikvisionCall.editEnterpriseInfoForHikvision(enterpriseInfo);
@ -256,7 +256,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void deleteEnterpriseInfoForHikvision(String enterpriseId, String projectSn) {
try {
hikvisionCall.deleteEnterpriseInfoForHikvision(enterpriseId, projectSn);
@ -269,7 +269,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void editTeamInfoForHikvision(TeamInfo teamInfo) {
try {
hikvisionCall.editTeamInfoForHikvision(teamInfo);
@ -279,7 +279,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void deleteTeamInfoForHikvision(TeamInfo teamInfo) {
try {
hikvisionCall.deleteTeamInfoForHikvision(teamInfo);
@ -289,7 +289,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void addTeamInfoForHikvision(TeamInfo teamInfo) {
try {
hikvisionCall.addTeamInfoForHikvision(teamInfo);
@ -299,7 +299,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void editDepartmentInfoForHikvision(DepartmentInfo teamInfo) {
try {
hikvisionCall.editDepartmentInfoForHikvision(teamInfo);
@ -309,7 +309,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void addDepartmentInfoForHikvision(DepartmentInfo teamInfo) {
try {
hikvisionCall.addDepartmentInfoForHikvision(teamInfo);
@ -319,7 +319,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void deleteDepartmentInfoForHikvision(DepartmentInfo teamInfo) {
try {
hikvisionCall.deleteDepartmentInfoForHikvision(teamInfo);
@ -329,7 +329,7 @@ public class AsyncHikvision {
}
}
@Async
@Async("carInfoExecutor")
public void editProjectForHikvision(Project project) {
try {
hikvisionCall.editProjectForHikvision(project);
@ -344,7 +344,7 @@ public class AsyncHikvision {
*
* @param projectVideoConfig
*/
@Async
@Async("carInfoExecutor")
public void addVqdForHikvision(ProjectVideoConfig projectVideoConfig) {
try {
List<VideoItem> videoItems = videoItemMapper.selectList(new LambdaQueryWrapper<VideoItem>()

View File

@ -345,4 +345,25 @@ public class AsyncConfig {
executor.initialize();
return executor;
}
@Bean("carInfoExecutor")
public ThreadPoolTaskExecutor carInfoExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
/** 核心线程数(默认线程数) */
executor.setCorePoolSize(maxPoolSize);
/** 最大线程数 */
executor.setMaxPoolSize(maxPoolSize);
executor.setQueueCapacity(100000);
/** 允许线程空闲时间(单位:默认为秒) */
executor.setKeepAliveSeconds(60);
/** 线程池名前缀 */
executor.setThreadNamePrefix("carInfoExecutor-");
// 线程池对拒绝任务的处理策略
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
// 初始化
executor.initialize();
return executor;
}
}

View File

@ -1,16 +1,14 @@
package com.zhgd.xmgl.modules.worker.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
/**
* @Description: 劳务人员保险
* @author pds
@ -22,7 +20,7 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel(value="WorkerInsurance实体类",description="WorkerInsurance")
public class WorkerInsurance implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value="id")
@ -60,4 +58,8 @@ public class WorkerInsurance implements Serializable {
@Excel(name = "保险到期时间", width = 15)
@ApiModelProperty(value="保险到期时间")
private java.lang.String expireTime ;
/**证书图片路径*/
@Excel(name = "证书图片路径", width = 15)
@ApiModelProperty(value="证书图片路径")
private java.lang.String photoUrl ;
}

View File

@ -261,7 +261,7 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
}
xzSecurityQualityInspectionRecordMapper.insert(xzSecurityQualityInspectionRecord);
if (xzSecurityQualityInspectionRecord.getRecordType() == 1 && xzSecurityQualityInspectionRecord.getStatus() == 2) {
noticeService.addUserNotice(xzSecurityQualityInspectionRecord.getChangeId(), "您有一条安全检查待整改,问题:" + xzSecurityQualityInspectionRecord.getDangerItemContent(), "安全管理待整改", "11");
noticeService.addUserNotice(xzSecurityQualityInspectionRecord.getChangeId(), "您有一条安全检查待整改,问题:" + xzSecurityQualityInspectionRecord.getDangerItemContent(), "安全管理待整改", "10");
}
deductScoreIf(xzSecurityQualityInspectionRecord);

View File

@ -79,7 +79,7 @@ public class XzSecurityXzSecurityQualityRectifyRecordServiceImpl extends Service
//已整改时候需要复查
if (xzSecurityQualityRectifyRecord.getStatus() == 2) {
xzSecurityQualityInspectionRecord.setStatus(3);
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getReviewId(), "您有一条安全检查的整改结果需要复查,请及时查看。", "安全管理整改结果待复查", "11");
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getReviewId(), "您有一条安全检查的整改结果需要复查,请及时查看。", "安全管理整改结果待复查", "10");
} else {
xzSecurityQualityInspectionRecord.setStatus(2);
}
@ -87,19 +87,19 @@ public class XzSecurityXzSecurityQualityRectifyRecordServiceImpl extends Service
//复查合格时候需要核验
if (xzSecurityQualityRectifyRecord.getStatus() == 2) {
xzSecurityQualityInspectionRecord.setStatus(4);
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getVerifyManId(), "您有一条安全检查的整改结果需要核验,请及时查看。", "安全管理整改结果核验通知", "11");
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getVerifyManId(), "您有一条安全检查的整改结果需要核验,请及时查看。", "安全管理整改结果核验通知", "10");
} else {
xzSecurityQualityInspectionRecord.setStatus(2);
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getChangeId(), "您提交的安全检查的整改结果复查不通过,请及时重新整改。", "安全管理整改结果复查通知", "11");
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getChangeId(), "您提交的安全检查的整改结果复查不通过,请及时重新整改。", "安全管理整改结果复查通知", "10");
}
} else {
//核验合格时候则该记录合格
if (xzSecurityQualityRectifyRecord.getStatus() == 2) {
xzSecurityQualityInspectionRecord.setStatus(5);
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getChangeId(), "您提交的安全检查的整改结果已通过核验。", "安全管理整改结果核验通知", "11");
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getChangeId(), "您提交的安全检查的整改结果已通过核验。", "安全管理整改结果核验通知", "10");
} else {
xzSecurityQualityInspectionRecord.setStatus(2);
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getChangeId(), "您提交的安全检查的整改结果核验不通过,请及时重新整改。", "安全管理整改结果核验通知", "11");
noticeService.addUserNotice(tempXzSecurityQualityInspectionRecord.getChangeId(), "您提交的安全检查的整改结果核验不通过,请及时重新整改。", "安全管理整改结果核验通知", "10");
}
}
xzSecurityQualityInspectionRecordMapper.updateById(xzSecurityQualityInspectionRecord);

View File

@ -9,12 +9,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhgd.jeecg.common.execption.OpenAlertException;
import com.zhgd.jeecg.common.system.query.QueryGenerator;
import com.zhgd.xmgl.modules.rt.entity.RtRiskInventoryType;
import com.zhgd.xmgl.modules.xz.entity.XzProjectOrg;
import com.zhgd.xmgl.modules.xz.mapper.XzProjectOrgMapper;
import com.zhgd.xmgl.modules.xz.service.IXzProjectOrgService;
import com.zhgd.xmgl.util.PageUtil;
import com.zhgd.xmgl.util.RefUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -65,6 +65,12 @@ public class XzProjectOrgServiceImpl extends ServiceImpl<XzProjectOrgMapper, XzP
@Override
public void add(XzProjectOrg xzProjectOrg) {
List<XzProjectOrg> dictionaries = baseMapper.selectList(new LambdaQueryWrapper<XzProjectOrg>()
.eq(XzProjectOrg::getDeptName, xzProjectOrg.getDeptName())
.eq(XzProjectOrg::getProjectSn, xzProjectOrg.getProjectSn()));
if (CollectionUtils.isNotEmpty(dictionaries)) {
throw new OpenAlertException("组织机构名称不能重复");
}
xzProjectOrg.setId(null);
boolean top = xzProjectOrg.getParentId() == null || xzProjectOrg.getParentId() == 0;
if (top) {
@ -89,6 +95,14 @@ public class XzProjectOrgServiceImpl extends ServiceImpl<XzProjectOrgMapper, XzP
if (oldPo == null) {
throw new OpenAlertException("部门不存在");
}
List<XzProjectOrg> dictionaries = baseMapper.selectList(new LambdaQueryWrapper<XzProjectOrg>()
.eq(XzProjectOrg::getDeptName, xzProjectOrg.getDeptName())
.eq(XzProjectOrg::getProjectSn, xzProjectOrg.getProjectSn())
.ne(XzProjectOrg::getId, xzProjectOrg.getId())
);
if (CollectionUtils.isNotEmpty(dictionaries)) {
throw new OpenAlertException("组织机构名称不能重复");
}
if (Objects.equals(xzProjectOrg.getStatus(), 1)) {
List<XzProjectOrg> cOrgs = xzProjectOrgMapper.selectList(new LambdaQueryWrapper<XzProjectOrg>()
.eq(XzProjectOrg::getParentId, xzProjectOrg.getId())

View File

@ -103,10 +103,10 @@ swagger.enable=true
#\u4E2A\u63A8\u914D\u7F6E
getui.baseUrl=https://restapi.getui.com/v2/
# 新配置
getui.appId=vTqRdzRpeI8SnXKDawStZ3
getui.appKey=wlPjAki13R8STuofcjnXM1
getui.appSecret=Wy3FFyaXzb9MUl94FMrLo1
getui.masterSecret=zZ5bMTOjUe5v3MFhm8gLL
getui.appId=Hl0bAepqhhAXcpcQqOuJ55
getui.appKey=skHP0xOulH7OFQ0mFGP5k1
getui.appSecret=vcF3ObJ8HD7rPKDe47QdG9
getui.masterSecret=b5uvWer4j68IMzVj1eh9zA
#判断考勤回调是否需要图片,1是
# 人员考勤图片类型 1base64
imageType=1