|
@@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import javax.validation.constraints.NotEmpty;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@@ -89,20 +88,6 @@ public class ApplyBuyServiceImpl extends ServiceImpl<ApplyBuyMapper, ApplyBuy> i
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 申购单新增
|
|
|
- */
|
|
|
- @Override
|
|
|
- public void add(ApplyBuyDto dto) {
|
|
|
- //获取申购明细
|
|
|
- List<ApplyBuyBom> applyBuyBomList = dto.getApplyBuyBomList();
|
|
|
- //将申购信息添加
|
|
|
- save(dto);
|
|
|
- //将申购明细添加进表
|
|
|
- applyBuyBomList.forEach(item -> item.setApplyBuyId(dto.getId()));
|
|
|
- applyBuyBomService.editLinked(applyBuyBomList, ApplyBuyBom::getApplyBuyId, dto.getId());
|
|
|
- }
|
|
|
-
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public void edit(ApplyBuyDto dto) {
|
|
@@ -118,14 +103,4 @@ public class ApplyBuyServiceImpl extends ServiceImpl<ApplyBuyMapper, ApplyBuy> i
|
|
|
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 申购单删除
|
|
|
- *
|
|
|
- * @param id
|
|
|
- */
|
|
|
- @Override
|
|
|
- public void delete(Long id) {
|
|
|
- this.removeById(id);
|
|
|
- }
|
|
|
-
|
|
|
}
|