|
|
|
|
@ -18,9 +18,11 @@ import com.nflg.wms.common.pojo.vo.QmsInspectionItemVO;
|
|
|
|
|
import com.nflg.wms.common.util.UserUtil;
|
|
|
|
|
import com.nflg.wms.repository.entity.QmsInspectionItem;
|
|
|
|
|
import com.nflg.wms.repository.entity.QmsInspectionItemDetails;
|
|
|
|
|
import com.nflg.wms.repository.entity.QmsQcMaterialCategory;
|
|
|
|
|
import com.nflg.wms.repository.mapper.QmsInspectionItemMapper;
|
|
|
|
|
import com.nflg.wms.repository.service.IQmsInspectionItemDetailsService;
|
|
|
|
|
import com.nflg.wms.repository.service.IQmsInspectionItemService;
|
|
|
|
|
import com.nflg.wms.repository.service.IQmsQcMaterialCategoryService;
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@ -43,6 +45,9 @@ public class QmsInspectionItemServiceImpl extends ServiceImpl<QmsInspectionItemM
|
|
|
|
|
@Resource
|
|
|
|
|
private IQmsInspectionItemDetailsService detailsService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private IQmsQcMaterialCategoryService materialCategoryService;
|
|
|
|
|
|
|
|
|
|
// ==================== 新增(主表 + 一条明细) ====================
|
|
|
|
|
|
|
|
|
|
@Transactional
|
|
|
|
|
@ -306,6 +311,15 @@ public class QmsInspectionItemServiceImpl extends ServiceImpl<QmsInspectionItemM
|
|
|
|
|
QmsInspectionItemVO vo = new QmsInspectionItemVO();
|
|
|
|
|
vo.setId(item.getId());
|
|
|
|
|
vo.setMaterialTypeId(item.getMaterialTypeId());
|
|
|
|
|
|
|
|
|
|
// 查询物料类别名称
|
|
|
|
|
if (Objects.nonNull(item.getMaterialTypeId())) {
|
|
|
|
|
QmsQcMaterialCategory category = materialCategoryService.getById(item.getMaterialTypeId());
|
|
|
|
|
if (Objects.nonNull(category)) {
|
|
|
|
|
vo.setMaterialCategoryName(category.getCategoryName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
vo.setDetectionType(item.getDetectionType());
|
|
|
|
|
vo.setInspectionItemName(item.getInspectionItemName());
|
|
|
|
|
vo.setInspectionNo(item.getInspectionNo());
|
|
|
|
|
|