package com.jeeplus.modules.sg.service;

import com.jeeplus.modules.sg.entity.JkxlData;
import com.jeeplus.modules.sg.entity.RuleRatio;
import com.jeeplus.modules.sg.entity.WbsProject;
import com.jeeplus.modules.sg.mapper.JkxlMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class JkxlService {
    @Autowired
    private JkxlMapper jkxlMapper;


   public RuleRatio getValueByName(String ratioName){
       return jkxlMapper.getValue(ratioName);
   }

   public List<JkxlData> getList(String id){
       return jkxlMapper.getList(id);
   }

   public List<JkxlData> findList(String id){
       return jkxlMapper.findList(id);
   }

   @Transactional
   public void save(JkxlData jkxlData){
       jkxlMapper.save(jkxlData);
   }

    @Transactional
   public void saveProject(WbsProject wbsProject){
       jkxlMapper.saveProject(wbsProject);
   }
}
