yxh
yxh
2023-06-21 a09368000c8c392a775f5f0dbfb29886fff5a6c7
yxh
已修改2个文件
53 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceExternalpersonServiceImpl.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java
@@ -1,26 +1,20 @@
package com.ruoyi.web.controller.project;
import java.util.Arrays;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.project.domain.ServiceExternalperson;
import com.ruoyi.project.service.IServiceExternalpersonService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
/**
 * 外围单位人员Controller
@@ -30,6 +24,7 @@
 */
@RestController
@RequestMapping("/project/externalperson")
@Slf4j
public class ServiceExternalpersonController extends BaseController
{
    @Autowired
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceExternalpersonServiceImpl.java
@@ -1,21 +1,20 @@
package com.ruoyi.project.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.domain.ServiceDonateorgan;
import com.ruoyi.project.domain.vo.OrgansOfHospital;
import com.ruoyi.project.domain.vo.reportInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.ArrayList;
import java.util.Map;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.project.mapper.ServiceExternalpersonMapper;
import com.ruoyi.project.domain.ServiceExternalperson;
import com.ruoyi.project.domain.vo.reportInfo;
import com.ruoyi.project.mapper.ServiceExternalpersonMapper;
import com.ruoyi.project.service.IServiceExternalpersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
 * 外围单位人员Service业务层处理
@@ -49,7 +48,16 @@
        if (StringUtils.isNotBlank(serviceExternalperson.getUsertype())){
            wrappers.eq(ServiceExternalperson::getUsertype ,serviceExternalperson.getUsertype());
        }
        return this.list(wrappers);
        //return this.list(wrappers);
        List<ServiceExternalperson> list = this.list(wrappers);
        Collections.sort(list, new Comparator<ServiceExternalperson>() {
            @Override
            public int compare(ServiceExternalperson o1, ServiceExternalperson o2) {
                return o1.getUserno().compareTo(o2.getUserno());
            }
        });
        return list;
    }
    @Override