whycrzh
2021-01-23 d1491636bcc06c9bb23b4955c3d8d0bfe7749e6d
src/main/java/com/fgkj/controller/User_taskController.java
@@ -1,28 +1,24 @@
package com.fgkj.controller;
import java.text.ParseException;
import java.util.List;
import com.fgkj.util.*;
import com.fgkj.dto.AllModel;
import com.fgkj.dto.BattInf;
import com.fgkj.dto.Batt_Maint_Dealarm;
import com.fgkj.dto.ServiceModel;
import com.fgkj.dto.Task_Batt_Test;
import com.fgkj.dto.User_inf;
import com.fgkj.dto.User_task;
import com.fgkj.dto.User_task_batt_template;
import com.fgkj.dto.User_task_param;
import com.fgkj.dto.*;
import com.fgkj.services.User_taskService;
import com.google.gson.reflect.TypeToken;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.text.ParseException;
import java.util.List;
import javax.annotation.Resource;
@RequestMapping("userTask")
@RestController
@Api
public class User_taskController{
   @Autowired
   @Resource
   private User_taskService service;
   //添加作业
@@ -31,7 +27,7 @@
                     @RequestBody User_inf uinf) throws ParseException{
      ServiceModel model=new ServiceModel();
      if(uinf!=null){
         utparam.setTp_name(uinf.getUId().toString());
         utparam.setTp_name(uinf.getuId().toString());
         model=service.add(addlist, utparam);
      }
      
@@ -77,16 +73,20 @@
      ServiceModel model = new ServiceModel();
      List list=service.serchBattgroup(bmd);
      model.setCode(1);
      model.setData(list);
      if (list.size()>0) {
         model.setCode(1);
         model.setData(list);
      }
       return model;
    }
    
    //0.1查询指定用户的作业信息
   @GetMapping("byUid")
    public ServiceModel serchByUid(@RequestBody Task_Batt_Test tbt){
       User_inf user=(User_inf)ActionUtil.getSession().getAttribute("user");
       ServiceModel model=new ServiceModel();
    public ServiceModelOnce serchByUid(@RequestBody Task_Batt_Test tbt){
       User_inf user=(User_inf)ActionUtil.getSession().getAttribute("user");
//      User_inf user= new User_inf();
//      user.setuId(1001);
      ServiceModelOnce model=new ServiceModelOnce();
       if(user!=null && tbt!=null){
          tbt.setUinf(user);
          model=service.serchByUid(tbt);
@@ -127,7 +127,7 @@
      
      //System.out.println(allmodel.getPmodel());
       if(uinf!=null && allmodel!=null){
         allmodel.getPmodel().setMsg(uinf.getUId()+"");
         allmodel.getPmodel().setMsg(uinf.getuId()+"");
      }
      ServiceModel model= new ServiceModel();
      try {