| | |
| | | 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; |
| | | |
| | | //添加作业 |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | 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); |
| | |
| | | |
| | | //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 { |