Browse Source

#安全模块

zhongwei
yang_shj 3 months ago
parent
commit
2d492f1861
  1. 12
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/entity/RectificationEntity.java
  2. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/impl/PointServiceImpl.java
  3. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/controller/RectificationController.java
  4. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/mapper/RectificationMapper.xml
  5. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/RectificlationServiceImpl.java
  6. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/service/impl/TrainServiceImpl.java

12
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/train/entity/RectificationEntity.java

@ -37,18 +37,18 @@ public class RectificationEntity extends TenantEntity {
private Integer rectificationType; private Integer rectificationType;
@ApiModelProperty(value = "限时日期") @ApiModelProperty(value = "限时日期")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) @JsonFormat(pattern = DateUtil.PATTERN_DATE)
private Date limitTime; private Date limitTime;
@ApiModelProperty(value = "提醒日期") @ApiModelProperty(value = "提醒日期")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) @JsonFormat(pattern = DateUtil.PATTERN_DATE)
private Date remindTime; private Date remindTime;
@ApiModelProperty(value = "完成日期") @ApiModelProperty(value = "完成日期")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME) @JsonFormat(pattern = DateUtil.PATTERN_DATE)
private Date completeTime; private Date completeTime;
@ApiModelProperty(value = "问题事项") @ApiModelProperty(value = "问题事项")

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/history/service/impl/PointServiceImpl.java

@ -130,6 +130,9 @@ public class PointServiceImpl implements PointService {
return result.getData(); return result.getData();
} }
/** /**
* 历史数据统计 * 历史数据统计
* @param curve * @param curve

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/train/controller/RectificationController.java

@ -39,6 +39,7 @@ public class RectificationController extends BladeController {
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "新增违章考核", notes = "传入RectificationEntity") @ApiOperation(value = "新增违章考核", notes = "传入RectificationEntity")
public R save(@RequestBody RectificationEntity entity) { public R save(@RequestBody RectificationEntity entity) {
entity.setStatus(0);
return R.status(service.save(entity)); return R.status(service.save(entity));
} }
@ -64,7 +65,7 @@ public class RectificationController extends BladeController {
} }
@GetMapping("/summary") @GetMapping("/summary")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 6)
@ApiOperation(value = "汇总", notes = "查询条件:站点ID、月份") @ApiOperation(value = "汇总", notes = "查询条件:站点ID、月份")
public R<IPage<RectificationSummaryVo>> summary(RectificationParamVo params, Query query) { public R<IPage<RectificationSummaryVo>> summary(RectificationParamVo params, Query query) {
return R.data(service.summary(params,Condition.getPage(query))); return R.data(service.summary(params,Condition.getPage(query)));

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

@ -15,6 +15,9 @@
<if test="params.month != null and params.month != ''"> <if test="params.month != null and params.month != ''">
and create_time like concat('%', #{params.month}, '%') and create_time like concat('%', #{params.month}, '%')
</if> </if>
<if test="params.rectificationType != null">
and rectification_type = #{params.rectificationType}
</if>
</where> </where>
group by station_id,rectification_type group by station_id,rectification_type
) a ) a

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

@ -43,10 +43,10 @@ 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())){ if(StringUtil.isNotBlank(params.getStartTime())){
wrapper.ge(RectificationEntity::getLimitTime,params.getStartTime() + " 00:00:00"); wrapper.ge(RectificationEntity::getLimitTime,params.getStartTime() + " 00:00:00");
} }
if(StringUtil.isNotBlank(params.getStartTime())){ if(StringUtil.isNotBlank(params.getEndTime())){
wrapper.le(RectificationEntity::getLimitTime,params.getEndTime() + " 23:59:59"); wrapper.le(RectificationEntity::getLimitTime,params.getEndTime() + " 23:59:59");
} }
return super.page(page,wrapper); return super.page(page,wrapper);

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

@ -34,10 +34,10 @@ 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.getStationId())){
wrapper.ge(TrainEntity::getStationId,params.getStartTime() + " 00:00:00");
}
if(StringUtil.isNotBlank(params.getStartTime())){ if(StringUtil.isNotBlank(params.getStartTime())){
wrapper.ge(TrainEntity::getTrainStartTime,params.getStartTime() + " 00:00:00");
}
if(StringUtil.isNotBlank(params.getEndTime())){
wrapper.le(TrainEntity::getTrainStartTime,params.getEndTime() + " 23:59:59"); wrapper.le(TrainEntity::getTrainStartTime,params.getEndTime() + " 23:59:59");
} }
return super.page(page,wrapper); return super.page(page,wrapper);

Loading…
Cancel
Save