| @@ -195,7 +195,7 @@ open class M18PurchaseOrderService( | |||||
| val mainpo = purchaseOrderDetail?.data?.mainpo?.get(0) | val mainpo = purchaseOrderDetail?.data?.mainpo?.get(0) | ||||
| val pot = purchaseOrderDetail?.data?.pot | val pot = purchaseOrderDetail?.data?.pot | ||||
| val purchaseOrderLineMessage = purchaseOrderDetail?.messages | val purchaseOrderLineMessage = purchaseOrderDetail?.messages | ||||
| logger.info("deliveryOrderDetail: data is null? ${purchaseOrderDetail?.data == null} | mainpo is null? ${purchaseOrderDetail?.data?.mainpo == null} | get(0) is null? ${purchaseOrderDetail?.data?.mainpo?.get(0) == null}") | |||||
| logger.info("purchaseOrderDetail: data is null? ${purchaseOrderDetail?.data == null} | mainpo is null? ${purchaseOrderDetail?.data?.mainpo == null} | get(0) is null? ${purchaseOrderDetail?.data?.mainpo?.get(0) == null}") | |||||
| // purchase_order + m18_data_log table | // purchase_order + m18_data_log table | ||||
| if (mainpo != null) { | if (mainpo != null) { | ||||
| @@ -100,7 +100,7 @@ open class MailTemplateService( | |||||
| val itemName: String = "", | val itemName: String = "", | ||||
| val itemQty: String = "", | val itemQty: String = "", | ||||
| val uom: String = "", | val uom: String = "", | ||||
| val planDnDate: String = "", | |||||
| val dnDate: String = "", | |||||
| val unitPrice: String = "", | val unitPrice: String = "", | ||||
| val receivedCompany: String = "", | val receivedCompany: String = "", | ||||
| val lotNo: String = "", | val lotNo: String = "", | ||||
| @@ -122,7 +122,7 @@ open class MailTemplateService( | |||||
| "\${itemName}" to itemName, | "\${itemName}" to itemName, | ||||
| "\${itemQty}" to itemQty, | "\${itemQty}" to itemQty, | ||||
| "\${uom}" to uom, | "\${uom}" to uom, | ||||
| "\${planDnDate}" to planDnDate, | |||||
| "\${dnDate}" to dnDate, | |||||
| "\${unitPrice}" to unitPrice, | "\${unitPrice}" to unitPrice, | ||||
| "\${receivedCompany}" to receivedCompany, | "\${receivedCompany}" to receivedCompany, | ||||
| "\${lotNo}" to lotNo, | "\${lotNo}" to lotNo, | ||||
| @@ -156,7 +156,8 @@ open class MailTemplateService( | |||||
| val itemName = item?.name ?: "N/A" | val itemName = item?.name ?: "N/A" | ||||
| val itemQty = (pol?.qty ?: zero).toString() | val itemQty = (pol?.qty ?: zero).toString() | ||||
| val uom = pol?.uom?.udfudesc ?: "N/A" | val uom = pol?.uom?.udfudesc ?: "N/A" | ||||
| val planDnDate = po?.estimatedArrivalDate?.let { formatter.format(it) } ?: "N/A" | |||||
| // val planDnDate = po?.estimatedArrivalDate?.let { formatter.format(it) } ?: "N/A" | |||||
| val dnDate = stockInLine.dnDate?.let { formatter.format(it) } ?: "N/A" | |||||
| val unitPrice = (pol?.up ?: zero).toString() | val unitPrice = (pol?.up ?: zero).toString() | ||||
| val receivedCompany = po?.shop?.name ?: "N/A" | val receivedCompany = po?.shop?.name ?: "N/A" | ||||
| val lotNo = stockInLine.productLotNo ?: "N/A" | val lotNo = stockInLine.productLotNo ?: "N/A" | ||||
| @@ -200,7 +201,8 @@ open class MailTemplateService( | |||||
| itemName = itemName, | itemName = itemName, | ||||
| itemQty = itemQty, | itemQty = itemQty, | ||||
| uom = uom, | uom = uom, | ||||
| planDnDate = planDnDate, | |||||
| // planDnDate = planDnDate, | |||||
| dnDate = dnDate, | |||||
| unitPrice = unitPrice, | unitPrice = unitPrice, | ||||
| receivedCompany = receivedCompany, | receivedCompany = receivedCompany, | ||||
| lotNo = lotNo, | lotNo = lotNo, | ||||
| @@ -74,7 +74,7 @@ open class WarehouseService( | |||||
| val COLUMN_FLOOR_INDEX = 4; | val COLUMN_FLOOR_INDEX = 4; | ||||
| val COLUMN_PLACE_INDEX = 5; | val COLUMN_PLACE_INDEX = 5; | ||||
| val START_ROW_INDEX = 2; | |||||
| val START_ROW_INDEX = 1; | |||||
| // Start Import | // Start Import | ||||
| for (i in START_ROW_INDEX..<sheet.lastRowNum) { | for (i in START_ROW_INDEX..<sheet.lastRowNum) { | ||||
| @@ -0,0 +1,6 @@ | |||||
| -- liquibase formatted sql | |||||
| -- changeset cyril:insert_temp_production_to_warehouse | |||||
| insert into warehouse (createdBy, version, modifiedBy, deleted, code, name, description, capacity) | |||||
| select '2fi', '0', '2fi', '0', 'P001', '生產車間', '生產車間', '1000000' | |||||
| where not exists(select 1 from warehouse where code = 'P001'); | |||||
| @@ -0,0 +1,16 @@ | |||||
| -- liquibase formatted sql | |||||
| -- changeset cyril:update_bom_weighting_score | |||||
| ALTER TABLE bom_weighting_score | |||||
| ADD COLUMN code VARCHAR(255) NOT NULL AFTER deleted; | |||||
| insert into bom_weighting_score (createdBy, version, modifiedBy, deleted, code, name, `range`, weighting) | |||||
| select '2fi', '0', '2fi', '0', 'dark', '顔色深淺度', '1', '0.34' | |||||
| where not exists(select 1 from bom_weighting_score where code = 'dark') | |||||
| UNION ALL | |||||
| select '2fi', '0', '2fi', '0', 'float', '浮沉', '5', '0.33' | |||||
| where not exists(select 1 from bom_weighting_score where code = 'float') | |||||
| UNION ALL | |||||
| select '2fi', '0', '2fi', '0', 'dense', '濃淡程度 濃5 淡1', '5', '0.33' | |||||
| where not exists(select 1 from bom_weighting_score where code = 'dense') | |||||
| ; | |||||