Browse Source

#安全模块

zhongwei
yang_shj 3 months ago
parent
commit
e2659d21f8
  1. 6
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java
  2. 4
      hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java
  3. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  4. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java
  5. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java
  6. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java
  7. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/ViolationServiceImpl.java

6
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/vo/RectificationParamVo.java

@ -24,4 +24,10 @@ public class RectificationParamVo {
@ApiModelProperty(value = "责任人") @ApiModelProperty(value = "责任人")
private String personLiableName; private String personLiableName;
@ApiModelProperty(value = "限时开始时间")
private String startTime;
@ApiModelProperty(value = "限时结束时间")
private String endTime;
} }

4
hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryDeviceServiceImpl.java

@ -317,8 +317,8 @@ public class HistoryDeviceServiceImpl implements IHistoryDeviceService {
* @param param * @param param
*/ */
@Async @Async
@Transactional @Transactional(rollbackFor = Exception.class)
private void commonUserSave(HistoryDataParamVo param) { protected void commonUserSave(HistoryDataParamVo param) {
// 当前用户Id // 当前用户Id
Long userId = AuthUtil.getUserId(); Long userId = AuthUtil.getUserId();

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -2002,7 +2002,7 @@ public class RealTargetServiceImpl implements RealTargetService {
*/ */
private List<ThirtyGenerationEntity> thirtyGenerations(List<String> stations) { private List<ThirtyGenerationEntity> thirtyGenerations(List<String> stations) {
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME);
calendar.add(Calendar.DAY_OF_MONTH,-30); calendar.add(Calendar.DAY_OF_MONTH,-30);
String start = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); String start = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE);
return thirtyGenerateService.list(Wrappers.<ThirtyGenerationEntity>lambdaQuery() return thirtyGenerateService.list(Wrappers.<ThirtyGenerationEntity>lambdaQuery()

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/TrainMapper.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.train.entity.TrainEntity; import com.hnac.hzims.safeproduct.train.entity.TrainEntity;
import com.hnac.hzims.safeproduct.train.vo.TrainParamVo; import com.hnac.hzims.safeproduct.train.vo.TrainParamVo;
import com.hnac.hzims.safeproduct.train.vo.TrainSummaryVo; import com.hnac.hzims.safeproduct.train.vo.TrainSummaryVo;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
@ -13,5 +14,5 @@ import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
public interface TrainMapper extends UserDataScopeBaseMapper<TrainEntity> { public interface TrainMapper extends UserDataScopeBaseMapper<TrainEntity> {
IPage<TrainSummaryVo> summary(TrainParamVo params, IPage<TrainSummaryVo> page); IPage<TrainSummaryVo> summary(@Param("params") TrainParamVo params, IPage<TrainSummaryVo> page);
} }

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.safeproduct.train.entity.RectificationEntity; import com.hnac.hzims.safeproduct.train.entity.RectificationEntity;
import com.hnac.hzims.safeproduct.train.entity.ViolationEntity;
import com.hnac.hzims.safeproduct.train.mapper.RectificationMapper; import com.hnac.hzims.safeproduct.train.mapper.RectificationMapper;
import com.hnac.hzims.safeproduct.train.service.IRectificlationService; import com.hnac.hzims.safeproduct.train.service.IRectificlationService;
import com.hnac.hzims.safeproduct.train.vo.RectificationParamVo; import com.hnac.hzims.safeproduct.train.vo.RectificationParamVo;
@ -42,6 +43,12 @@ public class RectificlationServiceImpl extends ServiceImpl<RectificationMapper,
if(ObjectUtil.isNotEmpty(params.getPersonLiableName())){ if(ObjectUtil.isNotEmpty(params.getPersonLiableName())){
wrapper.like(RectificationEntity::getPersonLiableName,params.getPersonLiableName()); wrapper.like(RectificationEntity::getPersonLiableName,params.getPersonLiableName());
} }
if(StringUtil.isNotBlank(params.getStationId())){
wrapper.ge(RectificationEntity::getLimitTime,params.getStartTime() + " 00:00:00");
}
if(StringUtil.isNotBlank(params.getStartTime())){
wrapper.le(RectificationEntity::getLimitTime,params.getEndTime() + " 23:59:59");
}
return super.page(page,wrapper); return super.page(page,wrapper);
} }

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java

@ -34,11 +34,11 @@ public class TrainServiceImpl extends ServiceImpl<TrainMapper, TrainEntity> impl
if(StringUtil.isNotBlank(params.getStationId())){ if(StringUtil.isNotBlank(params.getStationId())){
wrapper.eq(TrainEntity::getStationId,params.getStartTime()); wrapper.eq(TrainEntity::getStationId,params.getStartTime());
} }
if(StringUtil.isNotBlank(params.getStartTime())){ if(StringUtil.isNotBlank(params.getStationId())){
wrapper.ge(TrainEntity::getTrainStartTime,params.getStartTime()); wrapper.ge(TrainEntity::getStationId,params.getStartTime() + " 00:00:00");
} }
if(StringUtil.isNotBlank(params.getEndTime())){ if(StringUtil.isNotBlank(params.getStartTime())){
wrapper.le(TrainEntity::getTrainEndTime,params.getEndTime()); wrapper.le(TrainEntity::getTrainStartTime,params.getEndTime() + " 23:59:59");
} }
return super.page(page,wrapper); return super.page(page,wrapper);
} }

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/ViolationServiceImpl.java

@ -3,6 +3,7 @@ package com.hnac.hzims.safeproduct.train.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.safeproduct.train.entity.TrainEntity;
import com.hnac.hzims.safeproduct.train.entity.ViolationEntity; import com.hnac.hzims.safeproduct.train.entity.ViolationEntity;
import com.hnac.hzims.safeproduct.train.mapper.ViolationMapper; import com.hnac.hzims.safeproduct.train.mapper.ViolationMapper;
import com.hnac.hzims.safeproduct.train.service.IViolationService; import com.hnac.hzims.safeproduct.train.service.IViolationService;
@ -33,10 +34,10 @@ public class ViolationServiceImpl extends ServiceImpl<ViolationMapper, Violation
wrapper.eq(ViolationEntity::getStationId,params.getStationId()); wrapper.eq(ViolationEntity::getStationId,params.getStationId());
} }
if(StringUtil.isNotBlank(params.getStartTime())){ if(StringUtil.isNotBlank(params.getStartTime())){
wrapper.ge(ViolationEntity::getDiscoverTime,params.getStartTime()); wrapper.ge(ViolationEntity::getDiscoverTime,params.getStartTime() + " 00:00:00");
} }
if(StringUtil.isNotBlank(params.getEndTime())){ if(StringUtil.isNotBlank(params.getEndTime())){
wrapper.le(ViolationEntity::getDiscoverTime,params.getEndTime()); wrapper.le(ViolationEntity::getDiscoverTime,params.getEndTime() + " 23:59:59");
} }
if(ObjectUtil.isNotEmpty(params.getViolationLevel())){ if(ObjectUtil.isNotEmpty(params.getViolationLevel())){
wrapper.eq(ViolationEntity::getViolationLevel,params.getViolationLevel()); wrapper.eq(ViolationEntity::getViolationLevel,params.getViolationLevel());

Loading…
Cancel
Save