ソースを参照

fix fgstockinlabel

master
kelvin.yau 12時間前
コミット
e0125504af
5個のファイルの変更27行の追加10行の削除
  1. +2
    -1
      src/main/java/com/ffii/fpsms/modules/jobOrder/service/JobOrderService.kt
  2. +1
    -1
      src/main/java/com/ffii/fpsms/modules/master/entity/WarehouseRepository.kt
  3. +2
    -2
      src/main/java/com/ffii/fpsms/modules/master/service/BomService.kt
  4. +19
    -3
      src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt
  5. +3
    -3
      src/main/resources/FGStockInLabel/FGStockInLabel.jrxml

+ 2
- 1
src/main/java/com/ffii/fpsms/modules/jobOrder/service/JobOrderService.kt ファイルの表示

@@ -158,6 +158,7 @@ open class JobOrderService(
val (sufficientCount, insufficientCount) = if (jobOrder != null) {
calculateStockCounts(jobOrder, inventoriesMap)
} else {

Pair(null, null)
}
@@ -688,7 +689,7 @@ open class JobOrderService(
params["finishedGoodItemCode"] = stockInLineInfo.itemNo ?: "N/A"
params["finishedGoodItemName"] = stockInLineInfo.itemName ?: "N/A"
params["finishedGoodLotNo"] = stockInLineInfo.lotNo ?: "N/A"
params["productionQty"] = stockInLineInfo.acceptedQty?.toString() ?: "0"
params["FGStockInQty"] = stockInLineInfo.acceptedQty?.toString() ?: "0"
params["productionDate"] = productionDate
params["expiryDate"] = expiryDate
params["uom"] = uomDesc


+ 1
- 1
src/main/java/com/ffii/fpsms/modules/master/entity/WarehouseRepository.kt ファイルの表示

@@ -13,5 +13,5 @@ interface WarehouseRepository : AbstractRepository<Warehouse, Long> {
fun findByIdAndDeletedIsFalse(id: Serializable): Warehouse?;

fun findByCodeAndDeletedIsFalse(code: String): Warehouse?;
}

+ 2
- 2
src/main/java/com/ffii/fpsms/modules/master/service/BomService.kt ファイルの表示

@@ -633,8 +633,8 @@ open class BomService(
val resolver = PathMatchingResourcePatternResolver()
// val excels = resolver.getResources("bomImport/*.xlsx")
//val excels = resolver.getResources("file:C:/Users/Kelvin YAU/Downloads/bom/*.xlsx")
//val excels = resolver.getResources("file:C:/Users/Kelvin YAU/Downloads/bom/*.xlsx")
val excels = resolver.getResources("file:C:/Users/kw093/Downloads/bom/bom/*.xlsx")
val excels = resolver.getResources("file:C:/Users/Kelvin YAU/Downloads/bom/*.xlsx")
//val excels = resolver.getResources("file:C:/Users/kw093/Downloads/bom/bom/*.xlsx")
// val excels = resolver.getResources("file:C:/Users/2Fi/Desktop/Third Wave of BOM Excel/*.xlsx")
println("size: ${excels.size}")
val logExcel = ClassPathResource("excelTemplate/bom_excel_issue_log.xlsx")


+ 19
- 3
src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt ファイルの表示

@@ -158,6 +158,14 @@ open class StockInLineService(
itemNo = item.code
this.stockIn = stockIn
acceptedQty = request.acceptedQty
// Set demandQty based on source
if (jo != null && jo?.bom != null) {
// For job orders, demandQty comes from BOM's outputQty
this.demandQty = jo?.bom?.outputQty
} else if (pol != null) {
// For purchase orders, demandQty comes from PurchaseOrderLine's qty
this.demandQty = pol.qty
}
dnNo = request.dnNo
receiptDate = request.receiptDate?.atStartOfDay() ?: LocalDateTime.now()
productLotNo = request.productLotNo
@@ -391,12 +399,20 @@ open class StockInLineService(
// TODO: check all status to prevent reverting progress due to multiple users access to the same po?
// return list of stock in line, update data grid with the list
stockInLine.apply {
this.productionDate = request.productionDate?.atStartOfDay() ?: this.productionDate// maybe need to change the request to LocalDateTime
this.productionDate = request.productionDate?.atStartOfDay() ?: this.productionDate
this.productLotNo = request.productLotNo ?: this.productLotNo
this.dnNo = request.dnNo ?: this.dnNo
// this.dnDate = request.dnDate?.atStartOfDay() ?: this.dnDate
this.acceptedQty = request.acceptedQty
this.demandQty = request.acceptQty
this.acceptedQty = request.acceptQty ?: request.acceptedQty ?: this.acceptedQty
// Set demandQty based on source
if (this.jobOrder != null && this.jobOrder?.bom != null) {
// For job orders, demandQty comes from BOM's outputQty
this.demandQty = this.jobOrder?.bom?.outputQty ?: this.demandQty
} else if (this.purchaseOrderLine != null) {
// For purchase orders, demandQty comes from PurchaseOrderLine's qty
this.demandQty = this.purchaseOrderLine?.qty ?: this.demandQty
}
// Don't overwrite demandQty with acceptQty from QC form
this.invoiceNo = request.invoiceNo
this.receiptDate = request.receiptDate?.atStartOfDay() ?: this.receiptDate
// this.status = request.status


+ 3
- 3
src/main/resources/FGStockInLabel/FGStockInLabel.jrxml ファイルの表示

@@ -14,7 +14,7 @@
<parameter name="finishedGoodItemCode" class="java.lang.String"/>
<parameter name="finishedGoodItemName" class="java.lang.String"/>
<parameter name="finishedGoodLotNo" class="java.lang.String"/>
<parameter name="productionQty" class="java.lang.String"/>
<parameter name="FGStockInQty" class="java.lang.String"/>
<parameter name="productionDate" class="java.lang.String"/>
<parameter name="expiryDate" class="java.lang.String"/>
<parameter name="uom" class="java.lang.String"/>
@@ -79,7 +79,7 @@
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[$P{productionQty} + $P{shortName} + " (" + $P{uom} +")"]]></textFieldExpression>
<textFieldExpression><![CDATA[$P{FGStockInQty} + $P{shortName} + " (" + $P{uom} +")"]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="160" width="380" height="1" uuid="3e37c027-d6e9-4a88-b64d-58ba1dd3b22e">
@@ -144,7 +144,7 @@
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16"/>
</textElement>
<text><![CDATA[產出數量:
<text><![CDATA[數量:
]]></text>
</staticText>
<image>


読み込み中…
キャンセル
保存