|
|
@@ -0,0 +1,54 @@
|
|
|
+package org.jeecg.modules.medical.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
|
|
|
+import org.jeecg.modules.medical.entity.AdvanceWarningAuditDetail;
|
|
|
+import org.jeecg.modules.medical.service.IAdvanceWarningAuditDetailService;
|
|
|
+import org.jeecg.modules.medical.service.IViolationAnalysisService;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author yaowei
|
|
|
+ * @time 2023/10/18 15:23 星期三
|
|
|
+ * @description '这里写类描述'
|
|
|
+ * @parentProject medical-java
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class ViolationAnalysisServiceImpl implements IViolationAnalysisService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdvanceWarningAuditDetailService advanceWarningAuditDetailService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<AuditAdvanceWarningAuditDetailResponse> loadBeforeList(AuditAdvanceWarningAuditDetailResponse advanceWarningAuditDetail, Integer pageNo, Integer pageSize, Map<String, String[]> parameterMap) {
|
|
|
+ IPage<AuditAdvanceWarningAuditDetailResponse> resultPage = new Page<>(pageNo, pageSize);
|
|
|
+
|
|
|
+ AdvanceWarningAuditDetail entity = new AdvanceWarningAuditDetail();
|
|
|
+ BeanUtils.copyProperties(advanceWarningAuditDetail, entity);
|
|
|
+ QueryWrapper<AdvanceWarningAuditDetail> queryWrapper = QueryGenerator.initQueryWrapper(entity, parameterMap);
|
|
|
+ Page<AdvanceWarningAuditDetail> page = new Page<AdvanceWarningAuditDetail>(pageNo, pageSize);
|
|
|
+ IPage<AdvanceWarningAuditDetail> pageList = advanceWarningAuditDetailService.page(page, queryWrapper);
|
|
|
+ List<AdvanceWarningAuditDetail> records = pageList.getRecords();
|
|
|
+ if (!CollectionUtils.isEmpty(records)) {
|
|
|
+ List<AuditAdvanceWarningAuditDetailResponse> resultLists = new ArrayList<>();
|
|
|
+ for (AdvanceWarningAuditDetail record : records) {
|
|
|
+ AuditAdvanceWarningAuditDetailResponse r = new AuditAdvanceWarningAuditDetailResponse();
|
|
|
+ BeanUtils.copyProperties(record, r);
|
|
|
+ resultLists.add(r);
|
|
|
+ }
|
|
|
+ BeanUtils.copyProperties(page, resultPage);
|
|
|
+ resultPage.setRecords(resultLists);
|
|
|
+ }
|
|
|
+ return resultPage;
|
|
|
+ }
|
|
|
+}
|