package com.sw.mes.grade.service;

import com.sw.mes.core.response.Result;
import com.sw.mes.grade.entity.RuleTestData;
import com.sw.mes.gread.entity.GradeVersion;
import com.sw.mes.inspect.entity.YbInspectData;

import java.math.BigDecimal;
import java.util.Map;

/**
 * @Author
 * @Description：
 * @Date:
 * @Modified By:
 */
public interface GradeService {
    void pushGradeVersion(GradeVersion gradeVersion, String remarks);

    void execGrade(Map<String, YbInspectData> inspectMaps);

    /**
     * 圆棒评级
     *
     * @param gradeVersion   评级使用的版本
     * @param inspectMaps    需评级的数据
     * @param isTest         是否将评级结果保存至圆棒检验数据库
     * @param specifications 是否指定规格
     * @param length         是否指定长度
     * @param execType       评级触发的类型
     * @param remarks        备注
     * @return
     */
    Result<Object> testGradeVersion(GradeVersion gradeVersion, Map<String, YbInspectData> inspectMaps, boolean isTest, String specifications, BigDecimal length, int execType, String remarks);

    void saveGrade(Map<String, Object> inspectMap, Map<String, String> resultMap);

    void setRuleTestData(RuleTestData ruleTestData, String message);
}
