Browse Source

整改

master
DX 1 month ago
parent
commit
27118a9689
  1. 8
      yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java
  2. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterpriseinspections/vo/EnterpriseInspectionsRespVO.java
  3. 3
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/home/HomeServiceImpl.java
  4. 35
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/inspectionslog/InspectionsLogServiceImpl.java
  5. 2
      yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/taskinfo/TaskInfoMapper.xml

8
yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java

@ -48,10 +48,10 @@ public class JobServiceImpl implements JobService {
@Transactional(rollbackFor = Exception.class)
public Long createJob(JobSaveReqVO createReqVO) throws SchedulerException {
validateCronExpression(createReqVO.getCronExpression());
// 1.1 校验唯一性
if (jobMapper.selectByHandlerName(createReqVO.getHandlerName()) != null) {
throw exception(JOB_HANDLER_EXISTS);
}
// 1.1 校验唯一性 todo 留个坑 我的定时任务只是参数和时间不同 用的是同一个处理器
// if (jobMapper.selectByHandlerName(createReqVO.getHandlerName()) != null) {
// throw exception(JOB_HANDLER_EXISTS);
// }
// 1.2 校验 JobHandler 是否存在
validateJobHandlerExists(createReqVO.getHandlerName());

4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterpriseinspections/vo/EnterpriseInspectionsRespVO.java

@ -20,6 +20,10 @@ public class EnterpriseInspectionsRespVO {
@ExcelProperty("任务ID")
private Long taskId;
@Schema(description = "转管人员Id", example = "29150")
@ExcelProperty("转管人员Id")
private Long userId;
@Schema(description = "任务名称", example = "29150")
@ExcelProperty("任务名称")
private String taskName;

3
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/home/HomeServiceImpl.java

@ -52,6 +52,9 @@ public class HomeServiceImpl implements HomeService{
enterpriseDOLambdaQueryWrapper.between(EnterpriseDO::getCreateTime, weekDate[0], weekDate[1]);
}
enterpriseDOLambdaQueryWrapper.eq(homeSelectVO.getDeptId() != null, EnterpriseDO::getDepartmentId, homeSelectVO.getDeptId());
final Long enterpriseCount = enterpriseMapper.selectCount(enterpriseDOLambdaQueryWrapper);
homeCountResVO.setEnterpriseCount(enterpriseCount);

35
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/inspectionslog/InspectionsLogServiceImpl.java

@ -255,9 +255,10 @@ public class InspectionsLogServiceImpl implements InspectionsLogService {
final List<InspectionsLogAppListVO> inspectionsLogAppListVO = this.getInspectionsLogAppListVO(item.getId());
if (inspectionsLogAppListVO != null) {
List<String> inspectCollect = inspectionsLogAppListVO.stream().filter(item2 -> item2.getIsInspect() == true).map(map3 -> map3.getRealName()).collect(Collectors.toList());
item.setCooperateWithName(String.join(",", inspectCollect));
List<String> withCollect = inspectionsLogAppListVO.stream().filter(item2 -> item2.getIsInspect() == false).map(map3 -> map3.getRealName()).collect(Collectors.toList());
item.setInspectName(String.join(",", withCollect));
item.setInspectName(String.join(",", inspectCollect));
item.setCooperateWithName(String.join(",", withCollect));
}
}
});
@ -331,21 +332,21 @@ public class InspectionsLogServiceImpl implements InspectionsLogService {
//插入图片
fileInfoService.saveFilesByDictData(createReqVO.getFileIds(), 644l,2l, updateObj.getId().toString());
if (createReqVO.getStatus() == 3 && createReqVO.getCorrectionTime() != null ) {
try {
JobSaveReqVO jobSaveReqVO = new JobSaveReqVO();
jobSaveReqVO.setName("整改任务到期提醒");
jobSaveReqVO.setHandlerName("inspectionsSendStartMessageJob");
jobSaveReqVO.setHandlerParam(updateObj.getId().toString());
jobSaveReqVO.setCronExpression(this.generateCronExpression(createReqVO.getCorrectionTime()));
jobSaveReqVO.setRetryCount(0);
jobSaveReqVO.setRetryInterval(0);
jobSaveReqVO.setMonitorTimeout(0);
jobService.createInspectionsJob(jobSaveReqVO);
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
// if (createReqVO.getStatus() == 3 && createReqVO.getCorrectionTime() != null ) {
// try {
// JobSaveReqVO jobSaveReqVO = new JobSaveReqVO();
// jobSaveReqVO.setName("整改任务到期提醒");
// jobSaveReqVO.setHandlerName("inspectionsSendStartMessageJob");
// jobSaveReqVO.setHandlerParam(updateObj.getId().toString());
// jobSaveReqVO.setCronExpression(this.generateCronExpression(createReqVO.getCorrectionTime()));
// jobSaveReqVO.setRetryCount(1);
// jobSaveReqVO.setRetryInterval(0);
// jobSaveReqVO.setMonitorTimeout(0);
// jobService.createInspectionsJob(jobSaveReqVO);
// } catch (Throwable e) {
// throw new RuntimeException(e);
// }
// }
//插入签到人 方便查询
if (signInLogDOS == null || signInLogDOS.size() > 0) {

2
yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/taskinfo/TaskInfoMapper.xml

@ -116,7 +116,7 @@
and eq.user_id = #{userId}
</if>
<if test="time != null and time != ''">
and ei.create_time between
and eq.expiry_date between
<foreach collection="time" item="i" open="" separator="and" close="">
#{i}
</foreach>

Loading…
Cancel
Save