package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.attendance.model.AttendanceVacationRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceVacationRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
/**
*
* 员工假期记录信息
*
* @author zxfei
* @date 2023-04-12
*/
@RestController
@RequestMapping("attendance/vacation/record")
public class AttendanceVacationRecordController extends BaseCRUDJsonBodyMappingController<AttendanceVacationRecordService,AttendanceVacationRecordEntity,Long> {

    @Autowired
    private ParamService paramService;


    public AttendanceVacationRecordController(){
        super.setModuleDesc( "员工假期记录信息");
    }

    @Override
    protected void init(Map<String, Object> model, Context context) {
        this.addDict(model, "type", paramService.getParamBySecondOrganize("AttendanceVacationRecord","type"));
        this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("AttendanceVacationRecord","subAddType"));
        super.init(model, context);
    }

}