| | |
| | | import com.yuanchu.limslaboratory.pojo.vo.InspectDetailVo; |
| | | import com.yuanchu.limslaboratory.pojo.vo.InspectionVo; |
| | | import com.yuanchu.limslaboratory.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | * @since 2023-08-03 13:03:36 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class InspectionServiceImpl extends ServiceImpl<InspectionMapper, Inspection> implements InspectionService { |
| | | |
| | | @Resource |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Integer addInspect(Integer id, InspectionVo inspectionVo) throws ApplicationException { |
| | | log.info(inspectionVo.toString()); |
| | | /*新增检验申请表*/ |
| | | Inspection inspection = Inspection.builder() |
| | | .startTime(inspectionVo.getStartTime()) |
| | |
| | | String required = Optional.ofNullable(p) |
| | | .map(Product::getRequired).orElse("空"); |
| | | if(Objects.equals("空",internal)||Objects.equals(required,"空")) { |
| | | throw new ApplicationException("500","项目版本不可用"); |
| | | throw new ApplicationException("项目版本不可用"); |
| | | } |
| | | }); |
| | | //将查询的项目信息构建成检验项目 |