| | |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.basic.service.ISupplierService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.StaffJoinLeaveRecordExcelDto; |
| | | import com.ruoyi.staff.pojo.StaffJoinLeaveRecord; |
| | | import com.ruoyi.staff.service.IStaffJoinLeaveRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | staffJoinLeaveRecordService.staffJoinLeaveRecordExport(response, staffJoinLeaveRecord); |
| | | } |
| | | |
| | | /** |
| | | * 新增入职下载模板 |
| | | */ |
| | | @PostMapping("/importTemplate") |
| | | @Log(title = "新增入职下载模板", businessType = BusinessType.EXPORT) |
| | | public void importTemplate(HttpServletResponse response){ |
| | | ExcelUtil<StaffJoinLeaveRecordExcelDto> util = new ExcelUtil<>(StaffJoinLeaveRecordExcelDto.class); |
| | | util.importTemplateExcel(response, "新增入职模板"); |
| | | } |
| | | |
| | | /** |
| | | * 新增入职导入 |
| | | */ |
| | | @PostMapping("/import") |
| | | @Log(title = "新增入职导入", businessType = BusinessType.IMPORT) |
| | | public AjaxResult importData(@RequestPart("file") MultipartFile file) throws Exception{ |
| | | Boolean b = staffJoinLeaveRecordService.importData(file); |
| | | if (b) { |
| | | return AjaxResult.success("导入成功"); |
| | | } |
| | | return AjaxResult.error("导入失败"); |
| | | } |
| | | |
| | | |
| | | } |