孔祥富
2021-03-05 890be4f01daefbca6f085bb8314d40de282c1db8
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpAccessoryController.java
@@ -16,7 +16,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Map;
@@ -37,7 +36,6 @@
    private final IEmpAccessoryService empAccessoryService;
    @GetMapping
    @PreAuthorize("hasAuthority('empAccessory:list')")
    public FebsResponse getAllEmpAccessorys(EmpAccessory empAccessory) {
        return new FebsResponse().data(empAccessoryService.findEmpAccessorys(empAccessory));
    }
@@ -50,7 +48,6 @@
    }
    @PostMapping
    @PreAuthorize("hasAuthority('empAccessory:add')")
    public void addEmpAccessory(@NotNull(message = "{required}") Long labelid,@NotNull(message = "{required}") Long empId, MultipartFile file) throws FebsException {
        try {
            this.empAccessoryService.createEmpAccessory(labelid,file,empId);
@@ -119,4 +116,15 @@
            throw new FebsException(message);
        }
    }
    @GetMapping("{labelid}")
    @PreAuthorize("hasAuthority('empAccessory:delete')")
    public FebsResponse getLabelCount(@PathVariable(value = "labelid") String labelid) throws FebsException {
        try {
            return new FebsResponse().data(empAccessoryService.getLabelCount(Long.valueOf(labelid)));
        } catch (Exception e) {
            String message = "修改Label失败";
            log.error(message, e);
            throw new FebsException(message);
        }
    }
}