//
|
// Source code recreated from a .class file by IntelliJ IDEA
|
// (powered by FernFlower decompiler)
|
//
|
|
package com.flow.controller;
|
|
import com.flow.pojo.Bangzhu;
|
import com.flow.service.BangZhuService;
|
import com.flow.util.result;
|
import com.flow.util.resultutil;
|
import com.github.pagehelper.PageInfo;
|
import java.io.IOException;
|
import java.text.SimpleDateFormat;
|
import java.util.Date;
|
import java.util.List;
|
import javax.servlet.http.HttpServletResponse;
|
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.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.servlet.ModelAndView;
|
|
@RestController
|
@RequestMapping({"/hxzk"})
|
public class BangZhuController {
|
@Autowired
|
BangZhuService bangZhuService;
|
|
public BangZhuController() {
|
}
|
|
@PostMapping({"addBangZhu"})
|
public void addBang(Bangzhu bangzhu, HttpServletResponse response) throws IOException {
|
Date date = new Date();
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
bangzhu.setFkdata(formatter.format(date));
|
bangzhu.setSfwj("否");
|
this.bangZhuService.addBang(bangzhu);
|
response.sendRedirect("/HxzkFlow/page/wenti.jsp");
|
}
|
|
@GetMapping({"findBangzhu"})
|
result<List<Bangzhu>> findBangZhu(Integer page, Integer limit) {
|
PageInfo<Bangzhu> cz = this.bangZhuService.findBangZhu(page, limit);
|
return resultutil.returnSuccess(cz.getTotal(), cz.getList());
|
}
|
|
@PostMapping({"ChuLi"})
|
public void ChuLi(Bangzhu bz, HttpServletResponse response) throws IOException {
|
new ModelAndView();
|
this.bangZhuService.ChuLi(bz);
|
response.sendRedirect("/HxzkFlow/page/wenti.jsp");
|
}
|
|
@GetMapping({"findBangzhuZi"})
|
result<List<Bangzhu>> findBangZhuZi(Integer page, Integer limit, String Company) {
|
PageInfo<Bangzhu> cz = this.bangZhuService.findBangZhuZi(page, limit, Company);
|
return resultutil.returnSuccess(cz.getTotal(), cz.getList());
|
}
|
}
|