mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-05 04:03:45 +09:00
검색 모달 기능 추가
This commit is contained in:
@@ -3,17 +3,22 @@ package com.no1.wms.account;
|
||||
import com.no1.wms.utils.ConstantValues;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/account")
|
||||
public class AccountController {
|
||||
|
||||
@Autowired
|
||||
AccountService accountService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public ModelAndView list(ModelAndView mav, @RequestParam(defaultValue = "") String search, @RequestParam(defaultValue = "0") int start){
|
||||
|
||||
List<AccountDto> list = accountService.selectAll(search, start, ConstantValues.PER_PAGE);
|
||||
@@ -23,4 +28,19 @@ public class AccountController {
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
public ModelAndView create(ModelAndView mav){
|
||||
mav.setViewName("account/create");
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/show_modal")
|
||||
public ModelAndView showModal(ModelAndView mav, @RequestParam String name){
|
||||
//db에서 데이터 가져오는거 필요
|
||||
|
||||
//
|
||||
mav.setViewName(name);
|
||||
return mav;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.no1.wms.account;
|
||||
|
||||
import com.no1.wms.authority.AuthorityDto;
|
||||
import com.no1.wms.department.DepartmentDto;
|
||||
import com.no1.wms.position.PositionDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -27,8 +28,14 @@ public class AccountDto {
|
||||
private Date birth;
|
||||
private String telephone;
|
||||
private String address;
|
||||
private DepartmentDto department;
|
||||
private PositionDto position;
|
||||
private String departmentId;
|
||||
private String positionId;
|
||||
|
||||
private DepartmentDto departmentDto;
|
||||
private PositionDto positionDto;
|
||||
private AuthorityDto groupAuthorityDto;
|
||||
private AuthorityDto personalAuthorityDto;
|
||||
|
||||
@Builder.Default
|
||||
private Boolean activation = true;
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ public class AccountService {
|
||||
|
||||
public List<AccountDto> selectAll(String search, int start, int perPage){
|
||||
HashMap<String, Object> map = new HashMap<String, Object>();
|
||||
|
||||
map.put("search", search);
|
||||
map.put("start", start);
|
||||
map.put("perPage", perPage);
|
||||
|
||||
|
||||
|
||||
|
||||
17
src/main/java/com/no1/wms/account/DeptAndPositionDto.java
Normal file
17
src/main/java/com/no1/wms/account/DeptAndPositionDto.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.no1.wms.account;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.ibatis.type.Alias;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Alias("DeptPositionDto")
|
||||
public class DeptAndPositionDto {
|
||||
private String id;
|
||||
private String name;
|
||||
}
|
||||
Reference in New Issue
Block a user