/** * 同时解雇多名员工 * * @param employeeDtos * @return */ @ResponseBody @RequestMapping( value = "/terminate-employees", method = RequestMethod.POST, consumes = "application/json") public Map<String, Object> terminateEmployees(@RequestBody EmployeeDTO[] employeeDtos) { Set<Employee> employees = new HashSet<Employee>(); for (EmployeeDTO employeeDTO : employeeDtos) { employees.add(employeeDTO.transFormToEmployee()); } Map<String, Object> dataMap = new HashMap<String, Object>(); getBaseApplication().terminateParties(employees); dataMap.put("result", "success"); return dataMap; }
/** * 解雇某名员工 * * @param employeeDTO * @return */ @ResponseBody @RequestMapping("/terminate") public Map<String, Object> terminateEmployee(EmployeeDTO employeeDTO) { Map<String, Object> dataMap = new HashMap<String, Object>(); getBaseApplication().terminateParty(employeeDTO.transFormToEmployee()); dataMap.put("result", "success"); return dataMap; }