package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;

import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesCutLengthModifyTypeService;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesCutLengthModifyType;
import cn.estsh.i3plus.pojo.mes.repository.MesCutLengthModifyTypeRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PROJECT_NAME: i3plus-mes-yfai
 * @DESCRIPTION:
 * @USER: xinwang.yi
 * @DATE: 2024-09-05 14:26
 */
@Service
public class MesCutLengthModifyTypeService implements IMesCutLengthModifyTypeService {

    @Autowired
    private MesCutLengthModifyTypeRepository cutLengthModifyTypeRepository;

    @Override
    public List<MesCutLengthModifyType> queryMesCutLengthModifyTypeList(MesCutLengthModifyType cutLengthModifyType) {
        DdlPackBean packBean = DdlPackBean.getDdlPackBean(cutLengthModifyType.getOrganizeCode());
        return cutLengthModifyTypeRepository.findByHqlWhere(packBean);
    }
}
