mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
change Categorys
This commit is contained in:
@@ -10,6 +10,7 @@ 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;
|
||||
|
||||
@@ -83,7 +84,7 @@ public class CategoryController {
|
||||
}
|
||||
// 수정 - Ajax
|
||||
|
||||
@PutMapping("/category//update_process")
|
||||
@PutMapping("/category/update_process")
|
||||
@ResponseBody
|
||||
public int updateProcess(CategoryDto dto, Model m) {
|
||||
|
||||
@@ -111,6 +112,7 @@ public class CategoryController {
|
||||
}
|
||||
}
|
||||
|
||||
// 엑셀다운로드테스트
|
||||
@GetMapping("/category/download")
|
||||
public void downloadExcel(HttpServletResponse response) {
|
||||
List<CategoryDto> dto = categoryService.selectAllCategory();
|
||||
@@ -122,8 +124,13 @@ public class CategoryController {
|
||||
}
|
||||
|
||||
// KAN코드 중복확인 메서드
|
||||
|
||||
@PostMapping("/category/chackKancode")
|
||||
@ResponseBody
|
||||
public int chackKancode(String kan_code) {
|
||||
return 0;
|
||||
int chack = categoryService.checkKan(kan_code);
|
||||
System.out.println(chack);
|
||||
return chack;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,15 @@ public class CategoryService {
|
||||
return mapper.activateByKanCode(kan_code);
|
||||
}
|
||||
|
||||
|
||||
public int checkKan(String kan_code) {
|
||||
CategoryDto dto = mapper.selectByKanCode(kan_code);
|
||||
String kancode = dto.getKan_code();
|
||||
if(kancode == null) {
|
||||
return 0;
|
||||
}else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user