懒羊羊
2024-01-29 a36b834b2957440a755652ff17d067b18f4e9250
jcdm-main/src/main/java/com/jcdm/main/bs/formulaChild/service/impl/BsFormulaChildInfoServiceImpl.java
@@ -1,6 +1,8 @@
package com.jcdm.main.bs.formulaChild.service.impl;
import java.util.List;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -93,4 +95,30 @@
    {
        return bsFormulaChildInfoMapper.deleteBsFormulaChildInfoById(id);
    }
    @Override
    public BsFormulaChildInfo selectBsFormulaChildInfoByTypeTopOne(String type,String productCode,String processesCode) {
        BsFormulaChildInfo info = new BsFormulaChildInfo();
        info.setOperationType(type);
        info.setProcessesCode(processesCode);
        info.setProductCode(productCode);
        return bsFormulaChildInfoMapper.selectBsFormulaChildInfoByTypeTopOne(info);
    }
    @Override
    public List<BsFormulaChildInfo> releaseCheck() {
        return bsFormulaChildInfoMapper.releaseCheck();
    }
    @Override
    public AjaxResult updateResults(BsFormulaChildInfo bsFormulaChildInfo) {
        List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo);
        if(bsFormulaChildInfos.size()>0){
            bsFormulaChildInfos.get(0).setResults("OK");
            bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0));
        }else {
            return AjaxResult.error("非本工位物料,请重新扫描");
        }
        return AjaxResult.success("成功");
    }
}