package org.springblade.modules.mdjftj.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.modules.mdjftj.entity.MdjfTjEntity;
import org.springblade.modules.mdjftj.excel.MdjfTjExcel;
import org.springblade.modules.mdjftj.mapper.MdjfTjMapper;
import org.springblade.modules.mdjftj.service.IMdjfTjService;
import org.springblade.modules.mdjftj.vo.MdjfTjVO;
import org.springblade.modules.system.entity.Dept;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 矛盾纠纷调解表 服务实现类
 *
 * @author BladeX
 * @since 2023-08-02
 */
@Service
public class MdjfTjServiceImpl extends BaseServiceImpl<MdjfTjMapper, MdjfTjEntity> implements IMdjfTjService {

	@Override
	public IPage<MdjfTjVO> selectmdjfTjPage(IPage<MdjfTjVO> page, Map<String, Object> params) {
		return page.setRecords(baseMapper.selectmdjfTjPage(page, params));
	}


	@Override
	public List<MdjfTjExcel> exportmdjfTj(Wrapper<MdjfTjEntity> queryWrapper) {
		List<MdjfTjExcel> mdjftjList = baseMapper.exportmdjfTj(queryWrapper);
		//mdjftjList.forEach(mdjftj -> {
		//	mdjftj.setTypeName(DictCache.getValue(DictEnum.YES_NO, mdjfTj.getType()));
		//});
		return mdjftjList;
	}

	@Override
	public Dept selectZf(String deptId) {
		return baseMapper.selectZf(deptId);
	}

	@Override
	public void saveMdjfTjJl(MdjfTjEntity mdjfTj) {
		baseMapper.saveMdjfTjJl(mdjfTj);
	}


	public void updateByHf(MdjfTjEntity mdjfTjEntity){
		baseMapper.updateByHf(mdjfTjEntity);
	};
}
