合并解决冲突或升级jdk17语法
This commit is contained in:
parent
34677b8e07
commit
c53b2fb77a
@ -7,7 +7,6 @@ import com.zhgd.jeecg.common.mybatis.EntityMap;
|
|||||||
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
|
import com.zhgd.xmgl.modules.project.entity.ProjectEnterprise;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
||||||
import com.zhgd.xmgl.modules.xz.entity.XzProjectOrg;
|
import com.zhgd.xmgl.modules.xz.entity.XzProjectOrg;
|
||||||
import lombok.Data;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@ -90,4 +89,7 @@ public interface ProjectEnterpriseMapper extends BaseMapper<ProjectEnterprise> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<XzProjectOrg> getChildren(Long id);
|
List<XzProjectOrg> getChildren(Long id);
|
||||||
|
|
||||||
|
@DataScope(enable = false)
|
||||||
|
int existProjectBySocialCodeAndProjectSn(@Param("socialCode") String socialCode, @Param("projectSn") String projectSn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -231,4 +231,11 @@
|
|||||||
select * from project_enterprise
|
select * from project_enterprise
|
||||||
where find_in_set(#{id}, ancestors)
|
where find_in_set(#{id}, ancestors)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="existProjectBySocialCodeAndProjectSn" resultType="int">
|
||||||
|
select * from
|
||||||
|
project_enterprise pe
|
||||||
|
join enterprise_info ei on ei.id=pe.project_sn
|
||||||
|
where pe.project_sn=#{projectSn} and ei.social_code=#{socialCode}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import com.zhgd.xmgl.async.AsyncWorker;
|
|||||||
import com.zhgd.xmgl.base.CompanyVo;
|
import com.zhgd.xmgl.base.CompanyVo;
|
||||||
import com.zhgd.xmgl.call.api.WorkerManufacturer;
|
import com.zhgd.xmgl.call.api.WorkerManufacturer;
|
||||||
import com.zhgd.xmgl.call.factory.WorkerManufacturerFactory;
|
import com.zhgd.xmgl.call.factory.WorkerManufacturerFactory;
|
||||||
|
import com.zhgd.xmgl.constant.Cts;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.impl.CompanyServiceImpl;
|
import com.zhgd.xmgl.modules.basicdata.service.impl.CompanyServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.ExamTrain;
|
import com.zhgd.xmgl.modules.exam.entity.ExamTrain;
|
||||||
@ -75,7 +76,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
@Override
|
@Override
|
||||||
public EnterpriseInfo saveEnterpriseInfo(EnterpriseInfo enterpriseInfo) {
|
public EnterpriseInfo saveEnterpriseInfo(EnterpriseInfo enterpriseInfo) {
|
||||||
QueryWrapper<EnterpriseInfo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<EnterpriseInfo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(EnterpriseInfo::getSocialCode, enterpriseInfo.getSocialCode());
|
queryWrapper.lambda().eq(EnterpriseInfo::getSocialCode, enterpriseInfo.getSocialCode()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
EnterpriseInfo tempEnterpriseInfo = enterpriseInfoMapper.selectOne(queryWrapper);
|
EnterpriseInfo tempEnterpriseInfo = enterpriseInfoMapper.selectOne(queryWrapper);
|
||||||
if (enterpriseInfo.getParentEnterpriseId() == null) {
|
if (enterpriseInfo.getParentEnterpriseId() == null) {
|
||||||
enterpriseInfo.setParentEnterpriseId(0L);
|
enterpriseInfo.setParentEnterpriseId(0L);
|
||||||
@ -255,7 +255,7 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
if (tempEnterpriseInfo != null) {
|
if (tempEnterpriseInfo != null) {
|
||||||
QueryWrapper<ProjectEnterprise> queryWrapper1 = new QueryWrapper<>();
|
QueryWrapper<ProjectEnterprise> queryWrapper1 = new QueryWrapper<>();
|
||||||
queryWrapper1.lambda().eq(ProjectEnterprise::getEnterpriseId, tempEnterpriseInfo.getId())
|
queryWrapper1.lambda().eq(ProjectEnterprise::getEnterpriseId, tempEnterpriseInfo.getId())
|
||||||
.eq(ProjectEnterprise::getProjectSn, enterpriseInfo.getProjectSn());
|
.eq(ProjectEnterprise::getProjectSn, enterpriseInfo.getProjectSn()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count = Math.toIntExact(projectEnterpriseMapper.selectCount(queryWrapper1));
|
int count = Math.toIntExact(projectEnterpriseMapper.selectCount(queryWrapper1));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("existsEnterpriseErr"));
|
throw new OpenAlertException(MessageUtil.get("existsEnterpriseErr"));
|
||||||
@ -284,7 +284,7 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
} else {
|
} else {
|
||||||
ProjectEnterprise pOrg = projectEnterpriseMapper.selectOne(new LambdaQueryWrapper<ProjectEnterprise>()
|
ProjectEnterprise pOrg = projectEnterpriseMapper.selectOne(new LambdaQueryWrapper<ProjectEnterprise>()
|
||||||
.eq(ProjectEnterprise::getEnterpriseId, projectEnterprise.getParentEnterpriseId())
|
.eq(ProjectEnterprise::getEnterpriseId, projectEnterprise.getParentEnterpriseId())
|
||||||
.eq(ProjectEnterprise::getProjectSn, projectEnterprise.getProjectSn())
|
.eq(ProjectEnterprise::getProjectSn, projectEnterprise.getProjectSn()).last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
||||||
);
|
);
|
||||||
if (pOrg == null) {
|
if (pOrg == null) {
|
||||||
throw new OpenAlertException("上级不存在");
|
throw new OpenAlertException("上级不存在");
|
||||||
@ -320,21 +320,21 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
String enterpriseId = MapUtils.getString(map, "enterpriseId");
|
String enterpriseId = MapUtils.getString(map, "enterpriseId");
|
||||||
String projectSn = MapUtils.getString(map, "projectSn");
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId)
|
wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId)
|
||||||
.eq(TeamInfo::getProjectSn, projectSn);
|
.eq(TeamInfo::getProjectSn, projectSn).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count = Math.toIntExact(teamInfoMapper.selectCount(wrapper));
|
int count = Math.toIntExact(teamInfoMapper.selectCount(wrapper));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("notDeleteEnterpriseErr"));
|
throw new OpenAlertException(MessageUtil.get("notDeleteEnterpriseErr"));
|
||||||
}
|
}
|
||||||
Integer dCount = Math.toIntExact(departmentInfoMapper.selectCount(new LambdaQueryWrapper<DepartmentInfo>()
|
Integer dCount = Math.toIntExact(departmentInfoMapper.selectCount(new LambdaQueryWrapper<DepartmentInfo>()
|
||||||
.eq(DepartmentInfo::getEnterpriseId, enterpriseId)
|
.eq(DepartmentInfo::getEnterpriseId, enterpriseId)
|
||||||
.eq(DepartmentInfo::getProjectSn, projectSn)
|
.eq(DepartmentInfo::getProjectSn, projectSn).last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
||||||
));
|
));
|
||||||
if (dCount > 0) {
|
if (dCount > 0) {
|
||||||
throw new OpenAlertException("企业下存在部门,不允许删除");
|
throw new OpenAlertException("企业下存在部门,不允许删除");
|
||||||
}
|
}
|
||||||
Integer parentEnterpriseNum = Math.toIntExact(projectEnterpriseMapper.selectCount(new QueryWrapper<ProjectEnterprise>().lambda()
|
Integer parentEnterpriseNum = Math.toIntExact(projectEnterpriseMapper.selectCount(new QueryWrapper<ProjectEnterprise>().lambda()
|
||||||
.eq(ProjectEnterprise::getParentEnterpriseId, enterpriseId)
|
.eq(ProjectEnterprise::getParentEnterpriseId, enterpriseId)
|
||||||
.eq(ProjectEnterprise::getProjectSn, projectSn)));
|
.eq(ProjectEnterprise::getProjectSn, projectSn).last(Cts.IGNORE_DATA_SCOPE_CONDITION)));
|
||||||
if (parentEnterpriseNum != 0) {
|
if (parentEnterpriseNum != 0) {
|
||||||
throw new OpenAlertException("企业下存在子企业,不允许删除");
|
throw new OpenAlertException("企业下存在子企业,不允许删除");
|
||||||
}
|
}
|
||||||
@ -375,9 +375,11 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
public EnterpriseInfo updateEnterpriseInfo(EnterpriseInfo enterpriseInfo) {
|
public EnterpriseInfo updateEnterpriseInfo(EnterpriseInfo enterpriseInfo) {
|
||||||
QueryWrapper<EnterpriseInfo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<EnterpriseInfo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(EnterpriseInfo::getSocialCode, enterpriseInfo.getSocialCode())
|
queryWrapper.lambda().eq(EnterpriseInfo::getSocialCode, enterpriseInfo.getSocialCode())
|
||||||
.ne(EnterpriseInfo::getId, enterpriseInfo.getId());
|
.ne(EnterpriseInfo::getId, enterpriseInfo.getId()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count = Math.toIntExact(enterpriseInfoMapper.selectCount(queryWrapper));
|
int count = Math.toIntExact(enterpriseInfoMapper.selectCount(queryWrapper));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
|
// count = projectEnterpriseMapper.existProjectBySocialCodeAndProjectSn(enterpriseInfo.getSocialCode(), enterpriseInfo.getProjectSn());
|
||||||
|
// throw new OpenAlertException("企业信用代码已存在,请使用新增企业方式");
|
||||||
throw new OpenAlertException(MessageUtil.get("existsEnterpriseSocialCodeErr"));
|
throw new OpenAlertException(MessageUtil.get("existsEnterpriseSocialCodeErr"));
|
||||||
}
|
}
|
||||||
//企业如果选择有父级时候,需要排除企业和父级企业存在相互绑定的情况
|
//企业如果选择有父级时候,需要排除企业和父级企业存在相互绑定的情况
|
||||||
@ -385,7 +387,7 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
QueryWrapper<ProjectEnterprise> qu = new QueryWrapper<>();
|
QueryWrapper<ProjectEnterprise> qu = new QueryWrapper<>();
|
||||||
qu.lambda().eq(ProjectEnterprise::getEnterpriseId, enterpriseInfo.getParentEnterpriseId())
|
qu.lambda().eq(ProjectEnterprise::getEnterpriseId, enterpriseInfo.getParentEnterpriseId())
|
||||||
.eq(ProjectEnterprise::getParentEnterpriseId, enterpriseInfo.getId())
|
.eq(ProjectEnterprise::getParentEnterpriseId, enterpriseInfo.getId())
|
||||||
.eq(ProjectEnterprise::getProjectSn, enterpriseInfo.getProjectSn());
|
.eq(ProjectEnterprise::getProjectSn, enterpriseInfo.getProjectSn()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count1 = Math.toIntExact(projectEnterpriseMapper.selectCount(qu));
|
int count1 = Math.toIntExact(projectEnterpriseMapper.selectCount(qu));
|
||||||
if (count1 > 0) {
|
if (count1 > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("enterpriseBoundErr"));
|
throw new OpenAlertException(MessageUtil.get("enterpriseBoundErr"));
|
||||||
@ -567,7 +569,7 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
}
|
}
|
||||||
QueryWrapper<TeamInfo> wrapper = new QueryWrapper<>();
|
QueryWrapper<TeamInfo> wrapper = new QueryWrapper<>();
|
||||||
Long enterpriseId = enterpriseInfo.getId();
|
Long enterpriseId = enterpriseInfo.getId();
|
||||||
wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId);
|
wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count = Math.toIntExact(teamInfoMapper.selectCount(wrapper));
|
int count = Math.toIntExact(teamInfoMapper.selectCount(wrapper));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("notDeleteEnterpriseErr"));
|
throw new OpenAlertException(MessageUtil.get("notDeleteEnterpriseErr"));
|
||||||
|
|||||||
@ -106,7 +106,6 @@ import java.math.RoundingMode;
|
|||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
@ -550,14 +549,14 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
public WorkerInfo saveWorkerInfo(WorkerInfo workerInfo) {
|
public WorkerInfo saveWorkerInfo(WorkerInfo workerInfo) {
|
||||||
QueryWrapper<WorkerInfo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WorkerInfo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
queryWrapper.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
||||||
.eq(WorkerInfo::getIdCard, workerInfo.getIdCard());
|
.eq(WorkerInfo::getIdCard, workerInfo.getIdCard()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count = Math.toIntExact(workerInfoMapper.selectCount(queryWrapper));
|
int count = Math.toIntExact(workerInfoMapper.selectCount(queryWrapper));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("existsIDCardErr"));
|
throw new OpenAlertException(MessageUtil.get("existsIDCardErr"));
|
||||||
}
|
}
|
||||||
String locationCardno = workerInfo.getLocationCardno();
|
String locationCardno = workerInfo.getLocationCardno();
|
||||||
if (StringUtils.isNotBlank(locationCardno)) {
|
if (StringUtils.isNotBlank(locationCardno)) {
|
||||||
Integer cardCount = Math.toIntExact(workerInfoMapper.selectCount(new LambdaQueryWrapper<WorkerInfo>().eq(WorkerInfo::getLocationCardno, locationCardno)));
|
Integer cardCount = Math.toIntExact(workerInfoMapper.selectCount(new LambdaQueryWrapper<WorkerInfo>().eq(WorkerInfo::getLocationCardno, locationCardno).last(Cts.IGNORE_DATA_SCOPE_CONDITION)));
|
||||||
if (cardCount > 0) {
|
if (cardCount > 0) {
|
||||||
throw new OpenAlertException("定位标签号已存在");
|
throw new OpenAlertException("定位标签号已存在");
|
||||||
}
|
}
|
||||||
@ -567,7 +566,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
}
|
}
|
||||||
QueryWrapper<WorkerInfo> qw = new QueryWrapper<>();
|
QueryWrapper<WorkerInfo> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
qw.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
||||||
.eq(WorkerInfo::getAttendanceNumber, workerInfo.getAttendanceNumber());
|
.eq(WorkerInfo::getAttendanceNumber, workerInfo.getAttendanceNumber()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count2 = Math.toIntExact(workerInfoMapper.selectCount(qw));
|
int count2 = Math.toIntExact(workerInfoMapper.selectCount(qw));
|
||||||
if (count2 > 0) {
|
if (count2 > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("AttendanceCardExistErr"));
|
throw new OpenAlertException(MessageUtil.get("AttendanceCardExistErr"));
|
||||||
@ -641,7 +640,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
QueryWrapper<WorkerInfo> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<WorkerInfo> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
queryWrapper.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
||||||
.eq(WorkerInfo::getIdCard, workerInfo.getIdCard())
|
.eq(WorkerInfo::getIdCard, workerInfo.getIdCard())
|
||||||
.ne(WorkerInfo::getId, workerInfo.getId());
|
.ne(WorkerInfo::getId, workerInfo.getId()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
ThreadLocalUtil.addInKey("now", new Date());
|
ThreadLocalUtil.addInKey("now", new Date());
|
||||||
int count = Math.toIntExact(workerInfoMapper.selectCount(queryWrapper));
|
int count = Math.toIntExact(workerInfoMapper.selectCount(queryWrapper));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
@ -649,7 +648,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
}
|
}
|
||||||
String locationCardno = workerInfo.getLocationCardno();
|
String locationCardno = workerInfo.getLocationCardno();
|
||||||
if (StringUtils.isNotBlank(locationCardno)) {
|
if (StringUtils.isNotBlank(locationCardno)) {
|
||||||
Integer cardCount = Math.toIntExact(workerInfoMapper.selectCount(new LambdaQueryWrapper<WorkerInfo>().eq(WorkerInfo::getLocationCardno, locationCardno).ne(WorkerInfo::getId, workerInfo.getId())));
|
Integer cardCount = Math.toIntExact(workerInfoMapper.selectCount(new LambdaQueryWrapper<WorkerInfo>().eq(WorkerInfo::getLocationCardno, locationCardno).ne(WorkerInfo::getId, workerInfo.getId()).last(Cts.IGNORE_DATA_SCOPE_CONDITION)));
|
||||||
if (cardCount > 0) {
|
if (cardCount > 0) {
|
||||||
throw new OpenAlertException("定位标签号已存在");
|
throw new OpenAlertException("定位标签号已存在");
|
||||||
}
|
}
|
||||||
@ -660,7 +659,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
QueryWrapper<WorkerInfo> qw = new QueryWrapper<>();
|
QueryWrapper<WorkerInfo> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
qw.lambda().eq(WorkerInfo::getProjectSn, workerInfo.getProjectSn())
|
||||||
.eq(WorkerInfo::getAttendanceNumber, workerInfo.getAttendanceNumber())
|
.eq(WorkerInfo::getAttendanceNumber, workerInfo.getAttendanceNumber())
|
||||||
.ne(WorkerInfo::getId, workerInfo.getId());
|
.ne(WorkerInfo::getId, workerInfo.getId()).last(Cts.IGNORE_DATA_SCOPE_CONDITION);
|
||||||
int count2 = Math.toIntExact(workerInfoMapper.selectCount(qw));
|
int count2 = Math.toIntExact(workerInfoMapper.selectCount(qw));
|
||||||
if (count2 > 0) {
|
if (count2 > 0) {
|
||||||
throw new OpenAlertException(MessageUtil.get("AttendanceCardExistErr"));
|
throw new OpenAlertException(MessageUtil.get("AttendanceCardExistErr"));
|
||||||
@ -1926,7 +1925,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
WorkerType workerType = workerTypeMapper.selectById(entityMap.get("workerTypeId"));
|
WorkerType workerType = workerTypeMapper.selectById(entityMap.get("workerTypeId"));
|
||||||
List<WorkerSafeEducation> workerSafeEducations = workerSafeEducationMapper.selectList(Wrappers.<WorkerSafeEducation>lambdaQuery()
|
List<WorkerSafeEducation> workerSafeEducations = workerSafeEducationMapper.selectList(Wrappers.<WorkerSafeEducation>lambdaQuery()
|
||||||
.eq(WorkerSafeEducation::getProjectSn, projectSn)
|
.eq(WorkerSafeEducation::getProjectSn, projectSn)
|
||||||
.eq(WorkerSafeEducation::getEduType, 1)
|
.eq(WorkerSafeEducation::getEduType, 1).last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
||||||
.orderByDesc(WorkerSafeEducation::getAddTime));
|
.orderByDesc(WorkerSafeEducation::getAddTime));
|
||||||
if (workerSafeEducations == null || workerSafeEducations.size() == 0) {
|
if (workerSafeEducations == null || workerSafeEducations.size() == 0) {
|
||||||
throw new OpenAlertException("该人员未参加过入场安全教育培训!");
|
throw new OpenAlertException("该人员未参加过入场安全教育培训!");
|
||||||
@ -2487,7 +2486,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
public String getWorkerInfoByDev(GetWorkerInfoByDevDto dto) {
|
public String getWorkerInfoByDev(GetWorkerInfoByDevDto dto) {
|
||||||
String deviceId = dto.getDeviceId();
|
String deviceId = dto.getDeviceId();
|
||||||
UfaceDev dev = ufaceDevMapper.selectOne(new LambdaQueryWrapper<UfaceDev>()
|
UfaceDev dev = ufaceDevMapper.selectOne(new LambdaQueryWrapper<UfaceDev>()
|
||||||
.eq(UfaceDev::getDevSn, deviceId));
|
.eq(UfaceDev::getDevSn, deviceId).last(Cts.IGNORE_DATA_SCOPE_CONDITION));
|
||||||
if (dev == null) {
|
if (dev == null) {
|
||||||
throw new OpenAlertException("设备编号不存在");
|
throw new OpenAlertException("设备编号不存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,7 @@ public class WebSecurityConfig {
|
|||||||
}
|
}
|
||||||
authorizeRequests
|
authorizeRequests
|
||||||
.requestMatchers(
|
.requestMatchers(
|
||||||
|
"/xmgl/cache/clearAll",
|
||||||
"/xmgl/videoScreenshot/captureScreenshotSync",
|
"/xmgl/videoScreenshot/captureScreenshotSync",
|
||||||
"/xmgl/policeCameraItemFile/*",
|
"/xmgl/policeCameraItemFile/*",
|
||||||
"/xmgl/workTicketOrderApp/*",
|
"/xmgl/workTicketOrderApp/*",
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public class HighFormworkTask {
|
|||||||
* 济南拓兴获取高支模数据
|
* 济南拓兴获取高支模数据
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "* */5 * * * ?")
|
@Scheduled(cron = "* */5 * * * ?")
|
||||||
@SchedulerLock(name = "getHighFormworkDatas", lockAtMostFor = 1000 * 60, lockAtLeastFor = 1000 * 60)
|
@SchedulerLock(name = "getHighFormworkDatas", lockAtMostFor = "PT1M", lockAtLeastFor = "PT1M")
|
||||||
public void getHighFormworkDatas() {
|
public void getHighFormworkDatas() {
|
||||||
List<Project> projectList = projectService.list(new LambdaQueryWrapper<Project>().isNotNull(Project::getJntxAppKey).isNotNull(Project::getJntxAppSecret).ne(Project::getJntxAppKey, "").ne(Project::getJntxAppSecret, ""));
|
List<Project> projectList = projectService.list(new LambdaQueryWrapper<Project>().isNotNull(Project::getJntxAppKey).isNotNull(Project::getJntxAppSecret).ne(Project::getJntxAppKey, "").ne(Project::getJntxAppSecret, ""));
|
||||||
for (Project project : projectList) {
|
for (Project project : projectList) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user