mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
update in
This commit is contained in:
@@ -79,13 +79,37 @@ public class InController {
|
|||||||
@PostMapping("/create_process")
|
@PostMapping("/create_process")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public boolean createProcess(InDto dto) {
|
public boolean createProcess(InDto dto) {
|
||||||
|
int j = inService.checkIfExistsStock(dto);
|
||||||
|
if(j == 1) {
|
||||||
|
int k = inService.updateStockProcess(dto);
|
||||||
|
if(k == 1) {
|
||||||
int i = inService.createProcess(dto);
|
int i = inService.createProcess(dto);
|
||||||
int j = inService.createProcess2(dto);
|
if(i == k) {
|
||||||
if (i == 1 & i == j) {
|
System.out.println("달라서 새로만듬");
|
||||||
return true;
|
return true;
|
||||||
}else {
|
}else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if(j == 0) {
|
||||||
|
int k = inService.createStockProcess(dto);
|
||||||
|
if(k == 1) {
|
||||||
|
int i = inService.createProcess(dto);
|
||||||
|
if(i == k) {
|
||||||
|
System.out.println("같아서 합침");
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/read")
|
@PostMapping("/read")
|
||||||
@@ -172,7 +196,7 @@ public class InController {
|
|||||||
@RequestParam(name = "p", defaultValue = "1") int page,
|
@RequestParam(name = "p", defaultValue = "1") int page,
|
||||||
@RequestParam String name, String product_id, ModelAndView mav){
|
@RequestParam String name, String product_id, ModelAndView mav){
|
||||||
|
|
||||||
int perPage = 9; // 한 페이지에 보일 글의 갯수
|
int perPage = 5; // 한 페이지에 보일 글의 갯수
|
||||||
int startRow = (page - 1) * perPage;
|
int startRow = (page - 1) * perPage;
|
||||||
|
|
||||||
List<Map<String, Object>> list = null;
|
List<Map<String, Object>> list = null;
|
||||||
|
|||||||
@@ -13,5 +13,8 @@ public interface InMapper {
|
|||||||
int createProcess2(InDto dto);
|
int createProcess2(InDto dto);
|
||||||
InDto selectById (String id);
|
InDto selectById (String id);
|
||||||
int updateById(InDto dto);
|
int updateById(InDto dto);
|
||||||
|
int checkIfExistsStock(InDto dto);
|
||||||
|
int updateStockProcess(InDto dto);
|
||||||
|
int createStockProcess(InDto dto);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,16 @@ public class InService {
|
|||||||
return mapper.updateById(dto);
|
return mapper.updateById(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int checkIfExistsStock(InDto dto) {
|
||||||
|
return mapper.checkIfExistsStock(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int updateStockProcess(InDto dto) {
|
||||||
|
return mapper.updateStockProcess(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int createStockProcess(InDto dto) {
|
||||||
|
return mapper.createStockProcess(dto);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user