孔祥富
2021-03-04 cc792d6da0b6e07bae73daecccb055595b513969
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;
@@ -50,7 +49,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 +117,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);
        }
    }
}