mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
Update CategoryController.java
This commit is contained in:
@@ -1,13 +1,22 @@
|
|||||||
package com.no1.wms.category;
|
package com.no1.wms.category;
|
||||||
|
|
||||||
import com.no1.wms.excel.ExcelUtils;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.no1.wms.excel.ExcelUtils;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -57,14 +66,14 @@ public class CategoryController {
|
|||||||
// 생성 - Ajax
|
// 생성 - Ajax
|
||||||
@PostMapping("/category/create_process")
|
@PostMapping("/category/create_process")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public int createProcess(CategoryDto dto, Model m) {
|
public boolean createProcess(CategoryDto dto, Model m) {
|
||||||
int i = categoryService.createProcess(dto);
|
int i = categoryService.createProcess(dto);
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
return i;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// ajax테스트후 결정
|
// ajax테스트후 결정
|
||||||
// m.addAttribute("dto", dto);
|
m.addAttribute("dto", dto);
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,13 +126,11 @@ public class CategoryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// KAN코드 중복확인 메서드
|
// KAN코드 중복확인 메서드
|
||||||
|
@PostMapping("/category/checkKancode")
|
||||||
@PostMapping("/category/chackKancode")
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public int chackKancode(String kan_code) {
|
public String chackKancode(String kan_code) {
|
||||||
int chack = categoryService.checkKan(kan_code);
|
String checkkan = categoryService.kanCheck(kan_code);
|
||||||
System.out.println(chack);
|
return checkkan;
|
||||||
return chack;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user