| | |
| | | package com.jcdm.main.bs.formulaChild.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.da.paramCollection.domain.DaParamCollection; |
| | | import com.jcdm.main.da.paramCollection.mapper.DaParamCollectionMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.bs.formulaChild.mapper.BsFormulaChildInfoMapper; |
| | |
| | | { |
| | | @Autowired |
| | | private BsFormulaChildInfoMapper bsFormulaChildInfoMapper; |
| | | |
| | | @Autowired |
| | | private DaParamCollectionMapper daParamCollectionMapper; |
| | | |
| | | /** |
| | | * 查询配方配置子信息 |
| | |
| | | |
| | | @Override |
| | | public AjaxResult updateResults(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | bsFormulaChildInfo.setMaterialCode(bsFormulaChildInfo.getScanBarcode().substring(1,2)); |
| | | List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(bsFormulaChildInfo); |
| | | if(bsFormulaChildInfos.size()>0){ |
| | | bsFormulaChildInfos.get(0).setResults("OK"); |
| | | bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); |
| | | bsFormulaChildInfo.setParamValue(bsFormulaChildInfo.getScanBarcode()); |
| | | bsFormulaChildInfo.setParamCode(bsFormulaChildInfos.get(0).getParamCode()); |
| | | bsFormulaChildInfo.setSfcBarcode(bsFormulaChildInfo.getSfcBarcode()); |
| | | addParameterCollection(bsFormulaChildInfo); |
| | | }else { |
| | | return AjaxResult.error("非本工位物料,请重新扫描"); |
| | | } |
| | | return AjaxResult.success("成功"); |
| | | } |
| | | |
| | | public void addParameterCollection(BsFormulaChildInfo bsFormulaChildInfo){ |
| | | DaParamCollection daParamCollection = new DaParamCollection(); |
| | | daParamCollection.setParamCode(bsFormulaChildInfo.getParamCode()); |
| | | daParamCollection.setWorkOrderNo(bsFormulaChildInfo.getWorkOrderNo()); |
| | | daParamCollection.setLocationCode(bsFormulaChildInfo.getLocationCode()); |
| | | daParamCollection.setParamValue(bsFormulaChildInfo.getParamValue()); |
| | | daParamCollection.setProductCode(bsFormulaChildInfo.getProductCode()); |
| | | daParamCollection.setCollectionTime(new Date()); |
| | | daParamCollection.setSfcCode(bsFormulaChildInfo.getSfcBarcode()); |
| | | daParamCollectionMapper.insertDaParamCollection(daParamCollection); |
| | | } |
| | | |
| | | @Override |
| | | public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | bsFormulaChildInfoMapper.workpieceRelease(bsFormulaChildInfo); |