fei.wang
2024-04-15 61747a14819075bf6da2c1597b6c22e22e026686
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// 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());
    }
}