| | |
| | | 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; |
| | |
| | | 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<>(); |
| | |
| | | if(result.getCode()!=200){ |
| | | throw new RuntimeException("库存物料批次属性更新失败:"+result.getMessage()); |
| | | } |
| | | } |
| | | return this.saveOrUpdate(ifsPartPropsRecord); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public IfsPartPropsRecord getOneByIfsId(Long ifsId) { |
| | |
| | | } |
| | | return this.getOne(Wrappers.<IfsPartPropsRecord>lambdaQuery().eq(IfsPartPropsRecord::getIfsInventoryId,ifsId).last("limit 1")); |
| | | } |
| | | |
| | | @Override |
| | | public IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto) { |
| | | return baseMapper.selectOneByContract(ifsInventoryQuantityDto); |
| | | } |
| | | } |
| | | |
| | | |