package com.gtiit.shr.controller;

import com.gtiit.shr.common.ResponseResult;
import com.gtiit.shr.common.Result;
import com.gtiit.shr.entity.vo.PersonOfficeVo;
import com.gtiit.shr.service.PersonOfficeService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin(origins = "*")
@RestController
@RequestMapping({"/personOffice"})
public class PersonOfficeController {
    @Autowired
    private PersonOfficeService personOfficeService;



    @RequestMapping({"/insertBatchPersonOffice"})
    public Result insertBatchPerson(@RequestBody List<PersonOfficeVo> personOfficeVos) {
        int result = this.personOfficeService.insertBatchPerson(personOfficeVos);
        return result == 0 ? ResponseResult.isError("员工任职历史记录信息保存失败！", (Object)null) : ResponseResult.isOk("员工任职历史记录信息保存成功！", (Object)null);
    }
}
