package com.mortals.xhx.module.matter.web;

import com.mortals.framework.model.Context;
import com.mortals.framework.web.BasePhpCRUDJsonMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.matter.model.MatterAcceptEntity;
import com.mortals.xhx.module.matter.service.MatterAcceptService;
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 2022-01-20
 */
@RestController
@RequestMapping("matter/accept")
public class MatterAcceptController extends BasePhpCRUDJsonMappingController<MatterAcceptService, MatterAcceptForm, MatterAcceptEntity, Long> {

    @Autowired
    private ParamService paramService;

    public MatterAcceptController() {
        super.setFormClass(MatterAcceptForm.class);
        super.setModuleDesc("事项受理条件");
    }

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

}