|
|
@@ -7,10 +7,12 @@ import com.ffii.fpsms.modules.master.entity.Product |
|
|
|
import com.ffii.fpsms.modules.master.entity.ProductRepository |
|
|
|
import com.ffii.fpsms.modules.master.web.models.NewProductRequest |
|
|
|
import com.ffii.fpsms.modules.master.web.models.NewProductResponse |
|
|
|
import org.springframework.stereotype.Service |
|
|
|
import org.springframework.transaction.annotation.Transactional |
|
|
|
import kotlin.jvm.optionals.getOrNull |
|
|
|
|
|
|
|
class ProductService( |
|
|
|
@Service |
|
|
|
open class ProductService( |
|
|
|
private val jdbcDao: JdbcDao, |
|
|
|
private val productRepository: ProductRepository, |
|
|
|
private val uomService: ProductMaterialUomService, |
|
|
@@ -44,7 +46,6 @@ class ProductService( |
|
|
|
product.apply { |
|
|
|
code = request.code |
|
|
|
name = request.name |
|
|
|
isConsumables = request.isConsumables |
|
|
|
description = request.description |
|
|
|
remarks = request.remarks |
|
|
|
shelfLife = request.shelfLife |
|
|
|