xx
孔祥富
2021-03-09 18f8df401b74deec5c1ef552b2b1c7fa89cd9cb6
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpLaborTroubleController.java
@@ -1,6 +1,7 @@
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;
@@ -8,6 +9,7 @@
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;
@@ -49,7 +51,6 @@
    }
    @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);
@@ -71,6 +72,9 @@
            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);
        }
@@ -107,6 +111,9 @@
            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);
        }