|
@@ -31,8 +31,13 @@ public class JkxlController extends BaseController {
|
|
|
@Autowired
|
|
|
private JkxlService jkxlService;
|
|
|
|
|
|
+ @RequestMapping("/index")
|
|
|
+ public String toImport(){
|
|
|
+ return "modules/sys/free/indexProject";
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping("/import")
|
|
|
- public String importFile(String file, RedirectAttributes redirectAttributes, HttpServletRequest request, Model model){
|
|
|
+ public String importFile(MultipartFile file, RedirectAttributes redirectAttributes, HttpServletRequest request, Model model){
|
|
|
double sl = Double.valueOf(request.getParameter("jxsl"));
|
|
|
String projectName = request.getParameter("name");
|
|
|
String id = getId();
|
|
@@ -57,11 +62,13 @@ public class JkxlController extends BaseController {
|
|
|
@RequestMapping("/list")
|
|
|
public String list(HttpServletRequest request,Model model){
|
|
|
String id = request.getParameter("id");
|
|
|
+ List<JkxlData> list = jkxlService.getList(id);
|
|
|
+ model.addAttribute("list",list);
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
|
|
|
- public List<JkxlData> getData(String file,double[] rate,String id,double sl) throws IOException, InvalidFormatException {
|
|
|
+ public List<JkxlData> getData(MultipartFile file,double[] rate,String id,double sl) throws IOException, InvalidFormatException {
|
|
|
ImportExcel importExcel = new ImportExcel(file,1,3);
|
|
|
ImportExcel csqd = new ImportExcel(file,1,8);
|
|
|
ImportExcel gf = new ImportExcel(file,1,17);
|