| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | import static com.ruoyi.common.core.web.domain.AjaxResult.success; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | |
| | | sysStaffService.mgtDeleteStaff(mgtBaseGetDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入员工数据") |
| | | @PostMapping("/importSysStaff") |
| | | public AjaxResult importSysStaff(@RequestPart("file") MultipartFile file) throws Exception |
| | | { |
| | | ExcelUtil<MgtSysStaffImportDto> util = new ExcelUtil<MgtSysStaffImportDto>(MgtSysStaffImportDto.class); |
| | | List<MgtSysStaffImportDto> sysStaffImportDtoList = util.importExcel(file.getInputStream()); |
| | | String message = sysStaffService.importSysStaff(sysStaffImportDtoList); |
| | | return success(message); |
| | | } |
| | | } |