package com.weaver.seconddev.chapanda.cost.controller;


import com.weaver.common.authority.annotation.WeaPermission;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.seconddev.chapanda.cost.util.CommonUtils;
import com.weaver.seconddev.chapanda.cost.service.ConvertStaffCodeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/sapi/secondev/cbd/hrm")
public class ConvertStaffCodeController {

    private final Logger log = LoggerFactory.getLogger(ConvertStaffCodeController.class);

    @Autowired
    ConvertStaffCodeService convertStaffCodeService;

    @Autowired
    CommonUtils CommonUtils;

    @WeaPermission(publicPermission = true)
    @PostMapping("/convStaffCode")
    public WeaResult<Object> convStaffCode(@RequestBody Map<String, Object> params){
        Map<String,Object> recordMap = convertStaffCodeService.convStaffCode(params);
        return WeaResult.success(recordMap);
    }

}
