package com.northglass.web.device;
|
|
import java.io.IOException;
|
import java.io.PrintWriter;
|
import java.io.StringWriter;
|
|
//打印引用
|
|
import java.util.List;
|
import java.util.Map;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
import javax.validation.Valid;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Controller;
|
import org.springframework.ui.Model;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import com.northglass.entity.GlassNumberColor;
|
import com.northglass.service.device.Device;
|
import com.northglass.service.device.DeviceService;
|
|
@Controller
|
@RequestMapping(value = "/device")
|
public class DeviceController {
|
|
@Autowired
|
private DeviceService deviceService;
|
|
|
//色系
|
@RequestMapping(method=RequestMethod.GET, value="/createcolor")
|
public String createcolor(Model model) throws IOException {
|
model.addAttribute("colorHtml", deviceService.findColorHtml());
|
return "device/createcolor";
|
}
|
|
//添加色系
|
@RequestMapping(method=RequestMethod.POST, value="/addcolor")
|
public String addcolor(Model model, GlassNumberColor color) throws IOException {
|
deviceService.addcolor(color);
|
return "redirect:/device/createcolor";
|
}
|
|
//删除色系deletecolor
|
@RequestMapping(method=RequestMethod.GET, value="/deletecolor/{id}")
|
public String deletecolor(Model model, @PathVariable("id") String id) throws IOException {
|
deviceService.deletecolor(id);
|
return "redirect:/device/createcolor";
|
}
|
|
//机器信息
|
@RequestMapping(method=RequestMethod.GET, value="/getstatu")
|
public String getstatu(Model model) throws IOException {
|
model.addAttribute("shelfstatu", deviceService.getshelfstatu());
|
return "device/getstatu";
|
}
|
|
|
|
}
|