Compare commits

...

2 Commits

Author SHA1 Message Date
funny 63a0196216 Merge branch 'qms/yf' into qms/develop 2026-04-16 13:32:48 +08:00
funny 9404ecc255 质检项管理功能修改 2026-04-16 13:31:01 +08:00
2 changed files with 19 additions and 0 deletions

View File

@ -18,6 +18,11 @@ public class QmsInspectionItemVO {
*/
private Long materialTypeId;
/**
* 物料类别名称
*/
private String materialCategoryName;
/**
* 检测类型0=定向1=定量
*/

View File

@ -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());