package com.gtiit.shr.controller;

import com.gtiit.shr.common.Result;
import com.gtiit.shr.service.LocalCopyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin(origins = "*")
@RequestMapping({"/local"})
public class LocalCopyController {
    @Autowired
    private LocalCopyService localCopyService;



    @RequestMapping({"/savePerson"})
    public Result savePerson(@RequestParam String bigDat, @RequestParam String endDat) {
        return this.localCopyService.savePerson(bigDat, endDat);
    }

    @RequestMapping({"/saveDept"})
    public Result saveDept(@RequestParam String bigDat, @RequestParam String endDat) {
        return this.localCopyService.saveDept(bigDat, endDat);
    }

    @RequestMapping({"/savePosition"})
    public Result savePosition(@RequestParam String bigDat, @RequestParam String endDat) {
        return this.localCopyService.savePosition(bigDat, endDat);
    }

    @RequestMapping({"/savePersonOffice"})
    public Result savePersonOffice(@RequestParam String bigDat, @RequestParam String endDat) {
        return this.localCopyService.savePersonOffice(bigDat, endDat);
    }

    @RequestMapping({"/saveJob"})
    public Result saveJob(@RequestParam String bigDat, @RequestParam String endDat) {
        return this.localCopyService.saveJob(bigDat, endDat);
    }
}
