Browse Source

update: 演练/培训/会议/卫生自查列表默认按创建时间倒序排列

zhongwei
liwen 11 months ago
parent
commit
410816823c
  1. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java
  2. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
  3. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java
  4. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java
  5. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml
  6. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.xml
  7. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneZoneMapper.java
  8. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml
  9. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml
  10. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/IHygieneZoneService.java
  11. 1
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferencePlanServiceImpl.java
  12. 1
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygienePlanServiceImpl.java
  13. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java
  14. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneZoneServiceImpl.java
  15. 1
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/RehearsalPlanServiceImpl.java
  16. 3
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java
  17. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java

@ -114,8 +114,8 @@ public class ConferenceController extends BladeController {
@ApiOperation(value = "会议记录分页")
@ApiOperationSupport(order = 10)
public R<IPage<ConferenceRecordEntity>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferenceRecordEntity> page = conferenceRecordService.page(Condition.getPage(query),
Condition.getQueryWrapper(param, ConferenceRecordEntity.class));
IPage<ConferenceRecordEntity> page = conferenceRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(
param, ConferenceRecordEntity.class).lambda().orderByDesc(ConferenceRecordEntity::getCreateTime));
return R.data(page);
}

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java

@ -2,11 +2,9 @@ package com.hnac.hzims.safeproduct.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.safeproduct.dto.HygienePlanDTO;
import com.hnac.hzims.safeproduct.dto.HygieneRecordDTO;
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity;
import com.hnac.hzims.safeproduct.entity.HygieneRecordEntity;
import com.hnac.hzims.safeproduct.service.IHygienePlanService;
import com.hnac.hzims.safeproduct.service.IHygieneRecordService;
import com.hnac.hzims.safeproduct.vo.HygienePlanDetailVO;

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

@ -116,8 +116,8 @@ public class RehearsalController extends BladeController {
@ApiOperation(value = "演练记录分页")
@ApiOperationSupport(order = 10)
public R<IPage<RehearsalRecordEntity>> rehearsalRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalRecordEntity> page = rehearsalRecordService.page(Condition.getPage(query),
Condition.getQueryWrapper(param, RehearsalRecordEntity.class));
IPage<RehearsalRecordEntity> page = rehearsalRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(
param, RehearsalRecordEntity.class).lambda().orderByDesc(RehearsalRecordEntity::getCreateTime));
return R.data(page);
}

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

@ -128,7 +128,8 @@ public class TrainController extends BladeController {
@ApiOperation(value = "培训记录分页")
@ApiOperationSupport(order = 10)
public R<IPage<TrainRecordEntity>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainRecordEntity> page = trainRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(param, TrainRecordEntity.class));
IPage<TrainRecordEntity> page = trainRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(
param, TrainRecordEntity.class).lambda().orderByDesc(TrainRecordEntity::getCreateTime));
return R.data(page);
}
@ -176,7 +177,8 @@ public class TrainController extends BladeController {
@ApiOperation(value = "考试记录分页")
@ApiOperationSupport(order = 16)
public R<IPage<TestEntity>> testPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TestEntity> page = testService.page(Condition.getPage(query), Condition.getQueryWrapper(param, TestEntity.class));
IPage<TestEntity> page = testService.page(Condition.getPage(query), Condition.getQueryWrapper(param, TestEntity.class)
.lambda().orderByDesc(TestEntity::getCreateTime));
return R.data(page);
}

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/ConferencePlanMapper.xml

@ -19,5 +19,7 @@
<if test="endTime != 'null' and endTime != ''">
AND t1.scheduled_end_time &lt; #{endTime}
</if>
ORDER BY
t1.create_time DESC
</select>
</mapper>

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneRecordMapper.xml

@ -22,5 +22,7 @@
<if test="param.hygienePlanId != null and param.hygienePlanId != ''">
AND hygiene_plan_id = #{hygienePlanId}
</if>
ORDER BY
create_time DESC
</select>
</mapper>

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/HygieneZoneMapper.java

@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 卫生自查责任区Mapper类
*
* @author liwen
* @date 2024-01-02
*/
@Mapper
public interface HygieneZoneMapper extends BaseMapper<HygieneZoneEntity> {

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/RehearsalPlanMapper.xml

@ -80,5 +80,7 @@
<if test="endTime != 'null' and endTime != ''">
AND t1.scheduled_end_time &lt; #{endTime}
</if>
ORDER BY
t1.create_time DESC
</select>
</mapper>

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/TestMapper.xml

@ -9,6 +9,10 @@
hzims_test
WHERE
is_deleted = 0
<if test="trainPlanId != null and trainPlanId != ''">
AND train_plan_id = #{trainPlanId}
</if>
ORDER BY
create_time DESC
</select>
</mapper>

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

@ -5,6 +5,12 @@ import com.hnac.hzims.safeproduct.entity.HygieneZoneEntity;
import java.util.List;
/**
* 卫生自查责任区服务类
*
* @author liwen
* @date 2024-01-02
*/
public interface IHygieneZoneService extends IService<HygieneZoneEntity> {
/**

1
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/ConferencePlanServiceImpl.java

@ -73,6 +73,7 @@ public class ConferencePlanServiceImpl extends ServiceImpl<ConferencePlanMapper,
if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(ConferencePlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.lambda().orderByDesc(ConferencePlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
}

1
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygienePlanServiceImpl.java

@ -85,6 +85,7 @@ public class HygienePlanServiceImpl extends ServiceImpl<HygienePlanMapper, Hygie
if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(HygienePlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.lambda().orderByDesc(HygienePlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/HygieneRecordServiceImpl.java

@ -6,7 +6,6 @@ import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.alibaba.excel.util.CollectionUtils;
import com.alibaba.excel.write.merge.LoopMergeStrategy;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -25,8 +24,6 @@ import com.hnac.hzims.safeproduct.utils.BaseUtil;
import com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO;
import com.hnac.hzims.safeproduct.vo.HygieneZoneDetailVO;
import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.ss.usermodel.CellStyle;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;

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

@ -11,6 +11,12 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
/**
* 卫生自查责任区服务实现类
*
* @author liwen
* @date 2024-01-02
*/
@Service
public class HygieneZoneServiceImpl extends ServiceImpl<HygieneZoneMapper, HygieneZoneEntity> implements IHygieneZoneService {

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

@ -259,6 +259,7 @@ public class RehearsalPlanServiceImpl extends ServiceImpl<RehearsalPlanMapper, R
if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(RehearsalPlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.lambda().orderByDesc(RehearsalPlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
}
}

3
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java

@ -256,6 +256,7 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan
if (!endTime.equals("null") && !endTime.equals("")) {
queryWrapper.lambda().le(TrainPlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.lambda().orderByDesc(TrainPlanEntity::getCreateTime);
return this.page(Condition.getPage(query), queryWrapper);
}
@ -277,7 +278,7 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan
if (!endTime.equals("null")) {
queryWrapper.lt(TrainPlanEntity::getScheduledEndTime, endTime);
}
queryWrapper.orderByDesc(TrainPlanEntity::getScheduledEndTime);
queryWrapper.orderByDesc(TrainPlanEntity::getCreateTime);
return this.list(queryWrapper);
}
}

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainRecordServiceImpl.java

@ -213,7 +213,7 @@ public class TrainRecordServiceImpl extends ServiceImpl<TrainRecordMapper, Train
if (!trainPlanId.equals("null")) {
queryWrapper.ge(TrainRecordEntity::getTrainPlanId, trainPlanId);
}
queryWrapper.orderByDesc(TrainRecordEntity::getActualEndTime);
queryWrapper.orderByDesc(TrainRecordEntity::getCreateTime);
return this.list(queryWrapper);
}
}

Loading…
Cancel
Save