| | |
| | | package cc.mrbird.febs.server.hr.controller; |
| | | |
| | | import cc.mrbird.febs.server.hr.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.server.hr.constant.MyConstant; |
| | | import cc.mrbird.febs.server.hr.entity.EmpJobChange; |
| | | import cc.mrbird.febs.server.hr.entity.EmpLaborTrouble; |
| | | import cc.mrbird.febs.server.hr.service.IEmpLaborTroubleService; |
| | |
| | | import cc.mrbird.febs.common.core.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.core.exception.FebsException; |
| | | import cc.mrbird.febs.common.core.utils.FebsUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.wuwenze.poi.ExcelKit; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | } |
| | | |
| | | @GetMapping("list") |
| | | @PreAuthorize("hasAuthority('empLabortrouble:list')") |
| | | public FebsResponse empLabortroubleList(QueryRequest request, EmpLaborTrouble empLabortrouble) { |
| | | Map<String, Object> dataTable = FebsUtil.getDataTable(this.empLabortroubleService.findEmpLabortroubles(request, empLabortrouble)); |
| | | return new FebsResponse().data(dataTable); |
| | |
| | | this.empLabortroubleService.createEmpLabortrouble(empLabortrouble); |
| | | } catch (Exception e) { |
| | | String message = "新增员工劳资案件失败"; |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | |
| | | } |
| | | |
| | | @DeleteMapping("{ids}") |
| | | @PreAuthorize("hasAuthority('empLabortrouble:delete')") |
| | | public void logicDeleteEmpLabortrouble(@PathVariable("ids") String ids) throws FebsException { |
| | | try { |
| | | this.empLabortroubleService.logicDelEmpLabortrouble(ids); |
| | |
| | | this.empLabortroubleService.updateEmpLabortrouble(empLabortrouble); |
| | | } catch (Exception e) { |
| | | String message = "修改员工劳资案件失败"; |
| | | if (StrUtil.equals(e.getMessage(), MyConstant.MESSAGE)){ |
| | | message = e.getMessage(); |
| | | } |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |