| | |
| | | import com.jcdm.main.da.paramCollection.service.IDaParamCollectionService; |
| | | import com.jcdm.main.da.passingStationCollection.domain.DaPassingStationCollection; |
| | | import com.jcdm.main.da.passingStationCollection.mapper.DaPassingStationCollectionMapper; |
| | | import com.jcdm.main.da.passingStationCollection.service.IDaPassingStationCollectionService; |
| | | import com.jcdm.main.da.testDeviceInterface.service.IDaTestDeviceInterfaceService; |
| | | import com.jcdm.main.plcserver.util.TimeUtil; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.bs.formulaChild.mapper.BsFormulaChildInfoMapper; |
| | |
| | | * @date 2023-12-26 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class BsFormulaChildInfoServiceImpl extends ServiceImpl<BsFormulaChildInfoMapper,BsFormulaChildInfo> implements IBsFormulaChildInfoService |
| | | { |
| | | private static final Logger logger = LoggerFactory.getLogger("sys-user"); |
| | | @Autowired |
| | | private BsFormulaChildInfoMapper bsFormulaChildInfoMapper; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IDaParamCollectionService daParamCollectionService; |
| | | |
| | | @Autowired |
| | | private IDaPassingStationCollectionService daPassingStationCollectionService; |
| | | |
| | | Map<String, Session> map = WebSocketUsers.getUsers(); |
| | | |
| | |
| | | } |
| | | BsFormulaChildInfo listQuery = new BsFormulaChildInfo(); |
| | | listQuery.setParamCode(bsFormulaChildInfo.getParamCode()); |
| | | listQuery.setLocationCode(bsFormulaChildInfo.getLocationCode()); |
| | | String paramCode = bsFormulaChildInfo.getTightenTheArray(); |
| | | if(paramCode.contains("N")){ |
| | | result = "3"; |
| | |
| | | bsFormulaChildInfos.get(0).setResults("OK"); |
| | | bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); |
| | | bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); |
| | | |
| | | logger.info("yzUpdateTighteningFormula--查询条件参数:"+listQuery); |
| | | logger.info("yzUpdateTighteningFormula--查询结果:"+bsFormulaChildInfos.get(0)); |
| | | Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort()); |
| | | try { |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build()); |
| | |
| | | |
| | | @Override |
| | | public AjaxResult workpieceRelease(BsFormulaChildInfo bsFormulaChildInfo) { |
| | | try { |
| | | daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode()); |
| | | }catch (Exception e){ |
| | | } |
| | | List<BsFormulaChildInfo> list = bsFormulaChildInfoService.list(new LambdaQueryWrapper<BsFormulaChildInfo>() |
| | | .eq(BsFormulaChildInfo::getProcessesCode, bsFormulaChildInfo.getLocationCode()) |
| | | .eq(BsFormulaChildInfo::getProductCode, bsFormulaChildInfo.getProductCode())); |
| | |
| | | info.setCollectData(""); |
| | | info.setResults(""); |
| | | bsFormulaChildInfoService.saveOrUpdate(info); |
| | | } |
| | | try { |
| | | daParamCollectionService.pushGeelycvMesFeedback(bsFormulaChildInfo.getProductBarcode(), bsFormulaChildInfo.getLocationCode()); |
| | | String barCode = bsFormulaChildInfo.getProductBarcode(); |
| | | String locationCode = bsFormulaChildInfo.getLocationCode(); |
| | | DaPassingStationCollection passingStationCollectionOne = daPassingStationCollectionService.getOne(new LambdaQueryWrapper<DaPassingStationCollection>().eq(DaPassingStationCollection::getSfcCode, barCode).eq(DaPassingStationCollection::getLocationCode, locationCode)); |
| | | if (passingStationCollectionOne != null) { |
| | | passingStationCollectionOne.setOutRsSign("1"); |
| | | passingStationCollectionOne.setOutboundTime(new Date()); |
| | | daPassingStationCollectionService.saveOrUpdate(passingStationCollectionOne); |
| | | } |
| | | }catch (Exception e){ |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | } |
| | | BsFormulaChildInfo listQuery = new BsFormulaChildInfo(); |
| | | listQuery.setParamCode(bsFormulaChildInfo.getParamCode()); |
| | | listQuery.setLocationCode(bsFormulaChildInfo.getLocationCode()); |
| | | String paramCode = bsFormulaChildInfo.getTightenTheArray(); |
| | | if(paramCode.contains("N")){ |
| | | List<BsFormulaChildInfo> bsFormulaChildInfos = bsFormulaChildInfoMapper.selectBsFormulaChildInfoList(listQuery); |
| | |
| | | bsFormulaChildInfos.get(0).setResults("OK"); |
| | | bsFormulaChildInfos.get(0).setCollectData(bsFormulaChildInfo.getTightenTheArray()); |
| | | bsFormulaChildInfoMapper.updateBsFormulaChildInfo(bsFormulaChildInfos.get(0)); |
| | | logger.info("查询条件参数:"+listQuery); |
| | | logger.info("查询结果:"+bsFormulaChildInfos.get(0)); |
| | | Integer stepNumber = Integer.valueOf(bsFormulaChildInfos.get(0).getStepSort()); |
| | | try { |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier("PACK."+bsFormulaChildInfo.getLocationCode()+".MStepNumber").value(stepNumber+1).build()); |