src/main/java/com/phms/controller/user/HealthController.java

(开头部分) 15KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.phms.controller.user;

import com.phms.model.MMGridPageVoBean;
import com.phms.pojo.*;
import com.phms.service.*;
import com.phms.utils.MyUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.*;

/**
 * 健康评估
 */
@Controller("HealthController")
@RequestMapping("/health")
public class HealthController {
    @Autowired
    private DiagnosisService diagnosisService;
    @Autowired
    private AppointmentService appointmentService;
    @Autowired
    private PetService petService;
    @Autowired
    private PetDailyService petDailyService;
    @Autowired
    private UserService userService;
    @Autowired
    private StandardService standardService;

    /**
     * 分析页面
     */
    @RequestMapping("/assess")
    public String applyListDoctor(Model model) {
        Subject subject = SecurityUtils.getSubject();
        User user = (User) subject.getPrincipal();
        Pet pet = new Pet();
        pet.setUserId(user.getId());
        pet.setPage(1);
        pet.setLimit(100);
        MMGridPageVoBean<Pet> voBean = (MMGridPageVoBean<Pet>) petService.getAllByLimit(pet);
        List<Pet> rows = voBean.getRows();
        // 获取到该用户下所有的宠物
        model.addAttribute("pets", rows);
        List<Long> applyCount = new ArrayList<>();
        List<String> dsCount = new ArrayList<>();
        List<String> tsCount = new ArrayList<>();
        List<String> wsCount = new ArrayList<>();
        List<String> hsCount = new ArrayList<>();
        List<String> asCount = new ArrayList<>();

        List<Double> pt = new ArrayList<>();
        List<Double> pw = new ArrayList<>();
        List<Double> ph = new ArrayList<>();
后面还有 385 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。