| New file |
| | |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * (HollowGlassOutRelationInfo)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2024-11-30 13:57:29 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class HollowGlassOutRelationInfoServiceImpl extends ServiceImpl<HollowGlassOutRelationInfoMapper, HollowGlassOutRelationInfo> implements HollowGlassOutRelationInfoService { |
| | | |
| | | @Resource |
| | | GlassInfoService glassInfoService; |
| | | |
| | | @Override |
| | | public HollowGlassOutRelationInfo receiveTask(String flowCardId, int cell, int totalPairQuantity) { |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, flowCardId).last("limit 1")); |
| | | HollowGlassOutRelationInfo info = new HollowGlassOutRelationInfo(); |
| | | if (null == glassInfo) { |
| | | log.info("该流程卡信息系统未找到"); |
| | | return info; |
| | | } |
| | | info.setFlowCardId(flowCardId); |
| | | info.setCell(cell); |
| | | info.setTotalLayer(glassInfo.getTotalLayer()); |
| | | info.setTotalLayer(glassInfo.getTotalLayer()); |
| | | info.setState(Const.HOLLOW_FLOW_CARD_NEW); |
| | | info.setTotalPairQuantity(totalPairQuantity); |
| | | this.save(info); |
| | | return info; |
| | | } |
| | | } |
| | | |