Parcourir la source

update

create_edit_user
cyril.tsui il y a 3 mois
Parent
révision
c951e532a2
9 fichiers modifiés avec 54 ajouts et 0 suppressions
  1. +3
    -0
      src/main/java/com/ffii/fpsms/m18/model/M18PurchaseQuotationResponse.kt
  2. +1
    -0
      src/main/java/com/ffii/fpsms/m18/service/M18PurchaseQuotationService.kt
  3. +5
    -0
      src/main/java/com/ffii/fpsms/modules/purchaseQuotation/entity/PurchaseQuotationLine.kt
  4. +1
    -0
      src/main/java/com/ffii/fpsms/modules/purchaseQuotation/service/PurchaseQuotationLineService.kt
  5. +2
    -0
      src/main/java/com/ffii/fpsms/modules/purchaseQuotation/web/model/SavePurchaseQuotationLineRequest.kt
  6. +5
    -0
      src/main/resources/db/changelog/changes/20250528_01_cyril/01_update_inventory.sql
  7. +19
    -0
      src/main/resources/db/changelog/changes/20250528_01_cyril/02_create_trigger_debug_log.sql
  8. +6
    -0
      src/main/resources/db/changelog/changes/20250528_01_cyril/03_update_purchase_quotation_line.sql
  9. +12
    -0
      src/main/resources/db/changelog/changes/20250528_01_cyril/04_update_inventory.sql

+ 3
- 0
src/main/java/com/ffii/fpsms/m18/model/M18PurchaseQuotationResponse.kt Voir le fichier

@@ -1,5 +1,7 @@
package com.ffii.fpsms.m18.model

import java.math.BigDecimal

// Purchase Quotation
data class M18PurchaseQuotationResponse(
val data: M18PurchaseQuotationData?,
@@ -35,6 +37,7 @@ data class M18PurchaseQuotationVqut(
val refCode: String,
val unitId: Long,
val proId: Long,
val up: BigDecimal,
)

// Purchase Quotation List


+ 1
- 0
src/main/java/com/ffii/fpsms/m18/service/M18PurchaseQuotationService.kt Voir le fichier

@@ -143,6 +143,7 @@ open class M18PurchaseQuotationService(
m18ItemId = line.proId,
code = line.refCode,
description = line.bDesc,
price = line.up,
m18Id = line.id,
m18LastModifyDate = commonUtils.timestampToLocalDateTime(mainvqu.lastModifyDate)
)


+ 5
- 0
src/main/java/com/ffii/fpsms/modules/purchaseQuotation/entity/PurchaseQuotationLine.kt Voir le fichier

@@ -1,10 +1,12 @@
package com.ffii.fpsms.modules.purchaseQuotation.entity

import com.ffii.core.entity.BaseEntity
import com.ffii.fpsms.modules.master.entity.Currency
import com.ffii.fpsms.modules.master.entity.Items
import com.ffii.fpsms.modules.master.entity.UomConversion
import jakarta.persistence.*
import jakarta.validation.constraints.Size
import java.math.BigDecimal
import java.time.Instant
import java.time.LocalDateTime

@@ -27,6 +29,9 @@ open class PurchaseQuotationLine : BaseEntity<Long>() {
@Column(name = "description", length = 300)
open var description: String? = null

@Column(name = "price")
open var price: BigDecimal? = null

@ManyToOne
@JoinColumn(name = "uomId")
open var uom: UomConversion? = null


+ 1
- 0
src/main/java/com/ffii/fpsms/modules/purchaseQuotation/service/PurchaseQuotationLineService.kt Voir le fichier

@@ -36,6 +36,7 @@ open class PurchaseQuotationLineService (
this.item = item
code = request.code
description = request.description
price = request.price
this.uom = uom
m18Id = request.m18Id ?: this.m18Id
m18LastModifyDate = request.m18LastModifyDate ?: this.m18LastModifyDate


+ 2
- 0
src/main/java/com/ffii/fpsms/modules/purchaseQuotation/web/model/SavePurchaseQuotationLineRequest.kt Voir le fichier

@@ -1,5 +1,6 @@
package com.ffii.fpsms.modules.purchaseQuotation.web.model

import java.math.BigDecimal
import java.time.LocalDateTime

data class SavePurchaseQuotationLineRequest(
@@ -9,6 +10,7 @@ data class SavePurchaseQuotationLineRequest(
val m18ItemId: Long? = null,
val code: String? = null,
val description: String? = null,
val price: BigDecimal? = null,
val uomId: Long? = null,
val m18UomId: Long? = null,
val m18Id: Long? = null,


+ 5
- 0
src/main/resources/db/changelog/changes/20250528_01_cyril/01_update_inventory.sql Voir le fichier

@@ -0,0 +1,5 @@
-- liquibase formatted sql
-- changeset cyril:inventory
ALTER TABLE `inventory`
ADD COLUMN `itemId` INT NULL AFTER `deleted`,
ADD CONSTRAINT `FK_INVENTORY_ON_ITEMID` FOREIGN KEY (`itemId`) REFERENCES `items` (`id`);

+ 19
- 0
src/main/resources/db/changelog/changes/20250528_01_cyril/02_create_trigger_debug_log.sql Voir le fichier

@@ -0,0 +1,19 @@
-- liquibase formatted sql
-- changeset cyril:trigger debug log

CREATE TABLE `trigger_debug_log`
(
`id` INT NOT NULL AUTO_INCREMENT,
`created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`createdBy` VARCHAR(30) NULL DEFAULT NULL,
`version` INT NOT NULL DEFAULT '0',
`modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modifiedBy` VARCHAR(30) NULL DEFAULT NULL,
`deleted` TINYINT(1) NOT NULL DEFAULT '0',
`tableName` VARCHAR(255) NULL,
`triggerName` VARCHAR(255) NULL,
`description` VARCHAR(255) NULL,
`errorMessages` TEXT NULL,
`status` VARCHAR(255) NULL default 'success',
CONSTRAINT pk_trigger_debug_log PRIMARY KEY (id)
);

+ 6
- 0
src/main/resources/db/changelog/changes/20250528_01_cyril/03_update_purchase_quotation_line.sql Voir le fichier

@@ -0,0 +1,6 @@
-- liquibase formatted sql

-- changeset cyril:update purchase quotation line

ALTER TABLE `purchase_quotation_line`
ADD COLUMN `price` DECIMAL(14, 2) NULL AFTER `description`;

+ 12
- 0
src/main/resources/db/changelog/changes/20250528_01_cyril/04_update_inventory.sql Voir le fichier

@@ -0,0 +1,12 @@
-- liquibase formatted sql

-- changeset cyril:update inventory

ALTER TABLE `inventory`
DROP FOREIGN KEY `FK_INVENTORY_TO_CURRENCY_ON_CURRENCY_ID`;
ALTER TABLE `inventory`
CHANGE COLUMN `currencyId` `currencyId` INT NULL ;
ALTER TABLE `inventory`
ADD CONSTRAINT `FK_INVENTORY_TO_CURRENCY_ON_CURRENCY_ID`
FOREIGN KEY (`currencyId`)
REFERENCES `currency` (`id`);

Chargement…
Annuler
Enregistrer