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")
|
||||
@ResponseBody
|
||||
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 j = inService.createProcess2(dto);
|
||||
if (i == 1 & i == j) {
|
||||
if(i == k) {
|
||||
System.out.println("달라서 새로만듬");
|
||||
return true;
|
||||
}else {
|
||||
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")
|
||||
@@ -172,7 +196,7 @@ public class InController {
|
||||
@RequestParam(name = "p", defaultValue = "1") int page,
|
||||
@RequestParam String name, String product_id, ModelAndView mav){
|
||||
|
||||
int perPage = 9; // 한 페이지에 보일 글의 갯수
|
||||
int perPage = 5; // 한 페이지에 보일 글의 갯수
|
||||
int startRow = (page - 1) * perPage;
|
||||
|
||||
List<Map<String, Object>> list = null;
|
||||
|
||||
@@ -13,5 +13,8 @@ public interface InMapper {
|
||||
int createProcess2(InDto dto);
|
||||
InDto selectById (String id);
|
||||
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);
|
||||
}
|
||||
|
||||
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