Browse Source

update: 培训、演练的月度统计添加点击查看相关数据功能

zhongwei
liwen 6 months ago
parent
commit
849ab8fd06
  1. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java
  2. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java
  3. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TrainPlanMapper.xml
  4. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalPlanServiceImpl.java

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

@ -82,7 +82,8 @@ public class RehearsalController extends BladeController {
@ApiImplicitParams({
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string")
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "rehearsalStatus", value = "演练状态", dataType = "query", paramType = "string")
})
@ApiOperation(value = "演练计划分页")
@ApiOperationSupport(order = 5)

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

@ -91,7 +91,8 @@ public class TrainController extends BladeController {
@ApiImplicitParams({
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string")
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string"),
@ApiImplicitParam(name = "trainStatus", value = "培训计划状态", dataType = "query", paramType = "string")
})
@ApiOperation(value = "培训计划分页")
@ApiOperationSupport(order = 5)

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

@ -87,6 +87,9 @@
<if test="param.endTime != null and param.endTime != ''">
AND scheduled_end_time &lt;= #{param.endTime}
</if>
<if test="param.trainStatus != null and param.trainStatus != ''">
AND train_status = #{param.trainStatus}
</if>
ORDER BY
create_time DESC
</select>

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

@ -275,7 +275,8 @@ public class RehearsalPlanServiceImpl extends ServiceImpl<RehearsalPlanMapper, R
QueryWrapper<RehearsalPlanEntity> queryWrapper = new QueryWrapper<>();
String unit = String.valueOf(param.get("unit"));
String startTime = String.valueOf(param.get("scheduledStartTime"));
String endTime = String.valueOf((param.get("scheduledEndTime")));
String endTime = String.valueOf(param.get("scheduledEndTime"));
String rehearsalStatus = String.valueOf(param.get("rehearsalStatus"));
if (!unit.equals("null") && !unit.equals("")) {
queryWrapper.lambda().like(RehearsalPlanEntity::getUnit, unit);
}
@ -285,6 +286,9 @@ public class RehearsalPlanServiceImpl extends ServiceImpl<RehearsalPlanMapper, R
if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(RehearsalPlanEntity::getScheduledEndTime, endTime);
}
if (!rehearsalStatus.equals("null") && !rehearsalStatus.equals("")) {
queryWrapper.lambda().eq(RehearsalPlanEntity::getRehearsalStatus, rehearsalStatus);
}
queryWrapper.lambda().orderByDesc(RehearsalPlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
}

Loading…
Cancel
Save