inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsPartPropsRecordServiceImpl.java
@@ -3,6 +3,7 @@
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.common.core.domain.Result;
@@ -48,9 +49,6 @@
        if(Objects.isNull(ifsPartPropsRecord)){
            throw new RuntimeException("参数不能为空");
        }
        //查询是否已有同批次同零件号的批次属性,没有才更新
        Long count = baseMapper.selectCountByPartNoAndLotBatchNo(ifsPartPropsRecord.getPartNo(),ifsPartPropsRecord.getLotBatchNo());
        if(count==0){
            //判断是新增还是更新
            String actionType = Objects.isNull(ifsPartPropsRecord.getId())?"New":"Modify";
            Map<String, Object> inAttrMap = new HashMap<>();
@@ -75,9 +73,9 @@
            if(result.getCode()!=200){
                throw new RuntimeException("库存物料批次属性更新失败:"+result.getMessage());
            }
        }
        return this.saveOrUpdate(ifsPartPropsRecord);
    }
    @Override
    public IfsPartPropsRecord getOneByIfsId(Long ifsId) {
@@ -112,6 +110,11 @@
        }
        return this.getOne(Wrappers.<IfsPartPropsRecord>lambdaQuery().eq(IfsPartPropsRecord::getIfsInventoryId,ifsId).last("limit 1"));
    }
    @Override
    public IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto) {
        return baseMapper.selectOneByContract(ifsInventoryQuantityDto);
    }
}