Quellcode durchsuchen

Stock In Traceability Report

master
Tommy\2Fi-Staff vor 2 Wochen
Ursprung
Commit
f4c7f95637
3 geänderte Dateien mit 797 neuen und 2 gelöschten Zeilen
  1. +105
    -2
      src/main/java/com/ffii/fpsms/modules/report/service/ReportService.kt
  2. +46
    -0
      src/main/java/com/ffii/fpsms/modules/report/web/ReportController.kt
  3. +646
    -0
      src/main/resources/jasper/StockInTraceabilityReport.jrxml

+ 105
- 2
src/main/java/com/ffii/fpsms/modules/report/service/ReportService.kt Datei anzeigen

@@ -2,7 +2,7 @@ package com.ffii.fpsms.modules.report.service

import org.springframework.stereotype.Service
import net.sf.jasperreports.engine.*
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
import net.sf.jasperreports.engine.data.JRMapCollectionDataSource
import java.io.InputStream
import com.ffii.core.support.JdbcDao

@@ -73,6 +73,109 @@ open class ReportService(
return jdbcDao.queryForList(sql, args)
}

/**
* Helper function to build SQL clause for comma-separated values.
* Supports multiple values like "val1, val2, val3" and generates OR conditions with LIKE.
*/
private fun buildMultiValueLikeClause(
paramValue: String?,
columnName: String,
paramPrefix: String,
args: MutableMap<String, Any>
): String {
if (paramValue.isNullOrBlank()) return ""
val values = paramValue.split(",").map { it.trim() }.filter { it.isNotBlank() }
if (values.isEmpty()) return ""
val conditions = values.mapIndexed { index, value ->
val paramName = "${paramPrefix}_$index"
args[paramName] = "%$value%"
"$columnName LIKE :$paramName"
}
return "AND (${conditions.joinToString(" OR ")})"
}

/**
* Queries the database for Stock In Traceability Report data.
* Joins stock_in_line, stock_in, items, item_category, qc_result, inventory_lot, inventory_lot_line, warehouse, and shop tables.
* Supports comma-separated values for stockCategory, stockSubCategory, and itemCode.
*/
fun searchStockInTraceabilityReport(
stockCategory: String?,
stockSubCategory: String?,
itemCode: String?,
lastInDateStart: String?,
lastInDateEnd: String?
): List<Map<String, Any>> {
val args = mutableMapOf<String, Any>()
val stockCategorySql = buildMultiValueLikeClause(stockCategory, "ic.parent", "stockCategory", args)
val stockSubCategorySql = buildMultiValueLikeClause(stockSubCategory, "ic.sub", "stockSubCategory", args)
val itemCodeSql = buildMultiValueLikeClause(itemCode, "it.code", "itemCode", args)
val lastInDateStartSql = if (!lastInDateStart.isNullOrBlank()) {
args["lastInDateStart"] = lastInDateStart
"AND sil.receiptDate >= :lastInDateStart"
} else ""
val lastInDateEndSql = if (!lastInDateEnd.isNullOrBlank()) {
args["lastInDateEnd"] = lastInDateEnd
"AND sil.receiptDate < :lastInDateEnd"
} else ""

val sql = """
SELECT
COALESCE(ic.sub, '') as stockSubCategory,
COALESCE(it.code, '') as itemNo,
COALESCE(CONCAT(COALESCE(it.name, ''), ' ', COALESCE(it.description, '')), '') as itemName,
COALESCE(uc.code, '') as unitOfMeasure,
COALESCE(sil.dnNo, '') as dnNo,
COALESCE(sil.lotNo, il.lotNo, '') as lotNo,
COALESCE(DATE_FORMAT(COALESCE(sil.expiryDate, il.expiryDate), '%Y-%m-%d'), '') as expiryDate,
CAST(COALESCE(sil.acceptedQty, 0) AS CHAR) as stockInQty,
CAST(COALESCE(sil.acceptedQty, 0) AS CHAR) as iqcSampleQty,
CAST(COALESCE(qr.failQty, 0) AS CHAR) as iqcDefectQty,
CAST(CASE
WHEN COALESCE(sil.acceptedQty, 0) > 0
THEN ROUND((COALESCE(qr.failQty, 0) / sil.acceptedQty) * 100, 2)
ELSE 0
END AS CHAR) as iqcDefectPercentage,
CASE
WHEN qr.qcPassed = true OR qr.qcPassed IS NULL THEN 'Accept'
ELSE 'Reject'
END as iqcResult,
COALESCE(qr.remarks, '') as iqcRemarks,
COALESCE(wh.code, '') as storeLocation,
COALESCE(sp.code, '') as supplierID,
COALESCE(sp.name, '') as supplierName,
CAST(SUM(COALESCE(sil.acceptedQty, 0)) OVER (PARTITION BY it.id) AS CHAR) as totalStockInQty,
CAST(SUM(COALESCE(sil.acceptedQty, 0)) OVER (PARTITION BY it.id) AS CHAR) as totalIqcSampleQty,
CAST(SUM(COALESCE(qr.failQty, 0)) OVER (PARTITION BY it.id) AS CHAR) as totalIqcDefectQty
FROM stock_in_line sil
LEFT JOIN stock_in si ON sil.stockInId = si.id
LEFT JOIN items it ON sil.itemId = it.id
LEFT JOIN item_category ic ON it.categoryId = ic.id
LEFT JOIN item_uom iu ON it.id = iu.itemId AND iu.stockUnit = true
LEFT JOIN uom_conversion uc ON iu.uomId = uc.id
LEFT JOIN qc_result qr ON sil.id = qr.stockInLineId
LEFT JOIN inventory_lot il ON sil.inventoryLotId = il.id
LEFT JOIN inventory_lot_line ill ON il.id = ill.inventoryLotId
LEFT JOIN warehouse wh ON ill.warehouseId = wh.id
LEFT JOIN shop sp ON si.supplierId = sp.id
WHERE sil.deleted = false
$stockCategorySql
$stockSubCategorySql
$itemCodeSql
$lastInDateStartSql
$lastInDateEndSql
ORDER BY ic.sub, it.code, sil.lotNo
""".trimIndent()
return jdbcDao.queryForList(sql, args)
}

/**
* Compiles and fills a Jasper Report, returning the PDF as a ByteArray.
*/
@@ -82,7 +185,7 @@ open class ReportService(
val jasperReport = JasperCompileManager.compileReport(stream)
val dataSource = JRBeanCollectionDataSource(dataList)
val dataSource = JRMapCollectionDataSource(dataList)
val jasperPrint = JasperFillManager.fillReport(jasperReport, params, dataSource)
return JasperExportManager.exportReportToPdf(jasperPrint)


+ 46
- 0
src/main/java/com/ffii/fpsms/modules/report/web/ReportController.kt Datei anzeigen

@@ -5,6 +5,9 @@ import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
import org.springframework.http.*
import org.springframework.web.bind.annotation.*
import java.io.InputStream
import java.time.LocalDate
import java.time.LocalTime
import java.time.format.DateTimeFormatter
import com.ffii.fpsms.modules.report.service.ReportService

@RestController
@@ -76,4 +79,47 @@ class ReportController(

return ResponseEntity(pdfBytes, headers, HttpStatus.OK)
}

@GetMapping("/print-stock-in-traceability")
fun generateStockInTraceabilityReport(
@RequestParam(required = false) stockCategory: String?,
@RequestParam(required = false) stockSubCategory: String?,
@RequestParam(required = false) itemCode: String?,
@RequestParam(required = false) lastInDateStart: String?,
@RequestParam(required = false) lastInDateEnd: String?
): ResponseEntity<ByteArray> {
val parameters = mutableMapOf<String, Any>()
// Set report header parameters
parameters["stockCategory"] = stockCategory ?: "All"
parameters["stockSubCategory"] = stockSubCategory ?: "All"
parameters["itemNo"] = itemCode ?: "All"
parameters["reportDate"] = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))
parameters["reportTime"] = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss"))
parameters["lastInDateStart"] = lastInDateStart ?: ""
parameters["lastInDateEnd"] = lastInDateEnd ?: ""

// Query the DB to get a list of data
val dbData = reportService.searchStockInTraceabilityReport(
stockCategory,
stockSubCategory,
itemCode,
lastInDateStart,
lastInDateEnd
)

val pdfBytes = reportService.createPdfResponse(
"/jasper/StockInTraceabilityReport.jrxml",
parameters,
dbData
)

val headers = HttpHeaders().apply {
contentType = MediaType.APPLICATION_PDF
setContentDispositionFormData("attachment", "StockInTraceabilityReport.pdf")
set("filename", "StockInTraceabilityReport.pdf")
}

return ResponseEntity(pdfBytes, headers, HttpStatus.OK)
}
}

+ 646
- 0
src/main/resources/jasper/StockInTraceabilityReport.jrxml Datei anzeigen

@@ -0,0 +1,646 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="StockInTraceability" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="ed7bc020-85fe-4ae0-83d4-107bf939c670">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<parameter name="stockSubCategory" class="java.lang.String">
<defaultValueExpression><![CDATA["stockSubCategory"]]></defaultValueExpression>
</parameter>
<parameter name="date" class="java.lang.String">
<defaultValueExpression><![CDATA["date"]]></defaultValueExpression>
</parameter>
<parameter name="stockCategory" class="java.lang.String">
<defaultValueExpression><![CDATA["stockCategory"]]></defaultValueExpression>
</parameter>
<parameter name="itemNo" class="java.lang.String">
<defaultValueExpression><![CDATA["itemCode"]]></defaultValueExpression>
</parameter>
<parameter name="reportDate" class="java.lang.String"/>
<parameter name="reportTime" class="java.lang.String"/>
<parameter name="lastInPeriodStart" class="java.lang.String"/>
<parameter name="lastOutPeriodEnd" class="java.lang.String"/>
<parameter name="lastInDateStart" class="java.lang.String">
<parameterDescription><![CDATA["lastInDateStart"]]></parameterDescription>
</parameter>
<parameter name="lastInDateEnd" class="java.lang.String">
<parameterDescription><![CDATA["lastInDateStart"]]></parameterDescription>
</parameter>
<queryString>
<![CDATA[]]>
</queryString>
<field name="itemNo" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="itemNo"/>
<property name="com.jaspersoft.studio.field.label" value="itemNo"/>
<property name="com.jaspersoft.studio.field.tree.path" value="items"/>
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="itemName" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="itemName"/>
<property name="com.jaspersoft.studio.field.label" value="itemName"/>
<property name="com.jaspersoft.studio.field.tree.path" value="items"/>
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="stockSubCategory" class="java.lang.String">
<property name="com.jaspersoft.studio.field.name" value="stockSubCategory"/>
<property name="com.jaspersoft.studio.field.label" value="stockSubCategory"/>
<property name="com.jaspersoft.studio.field.tree.path" value="item_category"/>
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="unitOfMeasure" class="java.lang.String"/>
<field name="dnNo" class="java.lang.String"/>
<field name="lotNo" class="java.lang.String"/>
<field name="expiryDate" class="java.lang.String"/>
<field name="iqcSampleQty" class="java.lang.String"/>
<field name="iqcDefectQty" class="java.lang.String"/>
<field name="iqcDefectPercentage" class="java.lang.String"/>
<field name="iqcResult" class="java.lang.String"/>
<field name="iqcRemarks" class="java.lang.String"/>
<field name="storeLocation" class="java.lang.String"/>
<field name="supplierID" class="java.lang.String"/>
<field name="supplierName" class="java.lang.String"/>
<field name="totalStockInQty" class="java.lang.String"/>
<field name="totalIqcSampleQty" class="java.lang.String"/>
<field name="totalIqcDefectQty" class="java.lang.String"/>
<field name="stockInQty" class="java.lang.String"/>
<group name="Group1" isStartNewPage="true">
<groupExpression><![CDATA[$F{itemNo}]]></groupExpression>
<groupHeader>
<band height="77">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<textField>
<reportElement x="1" y="26" width="60" height="18" uuid="096e6f34-38cd-4b84-8283-b9895067998c">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{stockSubCategory}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="280" y="26" width="61" height="18" uuid="751247a0-9870-48dd-b854-75d105fb13cd">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{unitOfMeasure}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="61" y="26" width="119" height="18" uuid="d52a8b20-92ea-478c-a5e5-fccae4664baa">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemNo}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="180" y="8" width="100" height="18" uuid="5d687dac-ddbb-4071-901d-65e8c988ad7b">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[貨品名稱]]></text>
</staticText>
<textField>
<reportElement x="180" y="26" width="100" height="18" uuid="f21e9d4e-ef66-4c17-83df-f5fb411e460f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemName}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="61" y="8" width="119" height="18" uuid="00ef3912-d68e-4354-94ad-8e074f903526">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[貨品編號]]></text>
</staticText>
<staticText>
<reportElement x="1" y="8" width="60" height="18" uuid="e84b4d15-1dd6-41cb-9d47-a915d1911743">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[貨物子分類]]></text>
</staticText>
<staticText>
<reportElement x="280" y="8" width="61" height="18" uuid="08922c86-bd48-42ab-acc3-5157ae295a9d">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[單位]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="360" y="48" width="50" height="28" uuid="1f82d706-0492-46e4-b692-dced5c97c824">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[進料檢查
缺陷數量]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="0" y="48" width="110" height="28" uuid="3fa7c301-1c2a-430b-8985-338ebf7aa6cf">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[送貨單編號]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="670" y="48" width="40" height="28" uuid="0687499f-0edd-455b-b0a4-caf5725b5f81">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[供應商
編號]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="310" y="48" width="50" height="28" uuid="006c5557-c246-47cd-b599-4775f71cbf16">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[進料檢查
樣品數量]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="110" y="48" width="90" height="28" uuid="2f1e753f-ee01-42a1-a4e3-f75985403431">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[批號]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="710" y="48" width="90" height="28" uuid="db5b9c55-0185-420b-ba6c-0e10d154cc8a">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[供應商名稱]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="590" y="48" width="80" height="28" uuid="c1d0f0dd-34d6-4716-90bd-deb94e5084d2">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[店鋪位置]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="200" y="48" width="60" height="28" uuid="cd7a146a-1af0-4428-9b88-dcb159691656">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[到期日]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="470" y="48" width="50" height="28" uuid="3c732314-35c2-42ad-98e6-ef42a512c233">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[進料
檢查結果]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="260" y="48" width="50" height="28" uuid="5c05c89c-843b-4fd6-928c-002c6a529679">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[入庫數量]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="520" y="48" width="70" height="28" uuid="58b33148-a772-4295-b10a-718fccc89683">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[進料
檢查備註]]></text>
</staticText>
<staticText>
<reportElement stretchType="RelativeToTallestObject" x="410" y="48" width="60" height="28" uuid="c70088ac-bcf1-48a1-bb82-ad238a3dbe70">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[進料檢查
缺陷百分比]]></text>
</staticText>
<line>
<reportElement x="0" y="76" width="799" height="1" uuid="f4f75850-3693-4fe6-abe5-306378f15c10">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</groupHeader>
<groupFooter>
<band height="23">
<staticText>
<reportElement x="0" y="0" width="190" height="18" uuid="8d002bea-8762-4e6b-9101-35a570f55031">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<text><![CDATA[總入倉數量:]]></text>
</staticText>
<textField>
<reportElement x="260" y="0" width="50" height="18" uuid="d98c4478-22bd-4fd6-9be4-b3777f91de6d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{totalStockInQty}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="310" y="0" width="50" height="18" uuid="bac1f216-48f1-4b5b-af50-f8ba18b97b78">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{totalIqcSampleQty}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="360" y="0" width="50" height="18" uuid="1fb42453-c956-4a2b-8a04-fd297a980b38">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{totalIqcDefectQty}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="18" width="799" height="1" uuid="231ae4f2-c8fd-4c40-ba92-5a2bdbdc6249">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<line>
<reportElement x="0" y="22" width="799" height="1" uuid="0cd77bca-3092-46e3-a512-aee6f2f115f4">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<line>
<reportElement x="0" y="0" width="799" height="1" uuid="3190fa6b-3b27-4639-8de6-c93c8438ce35">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</groupFooter>
</group>
<title>
<band height="85" splitType="Stretch">
<staticText>
<reportElement x="288" y="0" width="226" height="23" uuid="15ab756b-0e92-466c-be47-112c2ee1aad1">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<text><![CDATA[Stock In Traceability Report
]]></text>
</staticText>
<staticText>
<reportElement x="0" y="35" width="90" height="23" uuid="7338c712-b4ee-4194-9c37-07af197eee92">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<text><![CDATA[報告日期:]]></text>
</staticText>
<staticText>
<reportElement x="0" y="58" width="90" height="23" uuid="84d51895-1f38-40bc-a2f8-ad5979628d51">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<text><![CDATA[貨物分類:]]></text>
</staticText>
<textField>
<reportElement x="90" y="35" width="390" height="23" uuid="ff7dd53c-f505-4615-bed4-107d0f053ffe"/>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{reportDate}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="90" y="58" width="708" height="23" uuid="451b69eb-de5f-49e6-b8ba-d579f51e9658"/>
<textElement>
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{stockCategory}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="480" y="35" width="90" height="23" uuid="465d0d50-d1f6-49e2-966a-86c87294e1c3">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<text><![CDATA[報告時間:]]></text>
</staticText>
<textField>
<reportElement x="570" y="35" width="228" height="23" uuid="bf131b2e-1da1-411a-b247-97280b89de21"/>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$P{reportTime}]]></textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="780" y="12" width="20" height="18" uuid="ad15e154-51b2-4775-8b7e-3cf2d3bc8da9">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="760" y="12" width="20" height="18" uuid="c612993d-f309-41f0-bda2-abc0a7d5a3b5">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[/]]></text>
</staticText>
<staticText>
<reportElement x="700" y="12" width="40" height="18" uuid="375abc61-d5a7-4b06-8f95-b2ce305302c6">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[頁數]]></text>
</staticText>
<textField>
<reportElement x="740" y="12" width="20" height="18" uuid="c58d1f01-d047-414b-8436-b173dcb58d48">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="84" width="800" height="1" uuid="51721ea2-ec7b-4532-9e60-4903d8400cc8">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</title>
<pageHeader>
<band height="60" splitType="Stretch">
<staticText>
<reportElement x="0" y="0" width="78" height="18" uuid="75beabc0-3521-4b1d-a158-7b054a53d850">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[貨物子分類:]]></text>
</staticText>
<textField textAdjust="StretchHeight">
<reportElement x="82" y="0" width="720" height="18" uuid="d40757f7-6aeb-45fc-8914-43d045a3306b">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{stockSubCategory}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="18" width="78" height="18" uuid="35526b03-269a-4990-956e-5125754fd8d5">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[貨品編號:]]></text>
</staticText>
<textField textAdjust="StretchHeight">
<reportElement x="82" y="18" width="720" height="18" uuid="1308e091-8b78-4bc9-9364-7cbae26c1181">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{itemNo}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="55" width="799" height="1" uuid="394a53f7-1257-476f-a4fa-b26fd14ce9cd">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<line>
<reportElement x="0" y="59" width="799" height="1" uuid="8628d83e-856d-44d2-9454-b6d048e6ecae">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<staticText>
<reportElement x="0" y="36" width="82" height="18" uuid="83857f28-3707-4003-a7e7-26f3e6847e6b">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
<property name="com.jaspersoft.studio.unit.width" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[最後入倉日期:]]></text>
</staticText>
<textField>
<reportElement x="82" y="36" width="298" height="18" uuid="b2f17ca6-bddc-4eb6-9960-f0e7fdf886af">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{lastInDateStart} + " 到 " + $P{lastInDateEnd}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<detail>
<band height="18" splitType="Stretch">
<textField textAdjust="StretchHeight">
<reportElement x="0" y="0" width="110" height="18" uuid="2e173086-b353-417e-9883-5374e9207e86">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{dnNo}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="110" y="0" width="90" height="18" uuid="ec54cf40-555d-4307-921e-23d2cc35418d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{lotNo}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="200" y="0" width="60" height="18" uuid="4c835a14-380f-46e3-a77e-6d61bbc6766a"/>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{expiryDate}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="260" y="0" width="50" height="18" uuid="0e8b333b-88ec-4d30-8fca-b02bc906305f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{stockInQty}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="310" y="0" width="50" height="18" uuid="d6417d18-6b11-4964-8774-a8795bc0983b">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{iqcSampleQty}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="360" y="0" width="50" height="18" uuid="5b94c23b-0ef3-4283-85ce-698ca4a2599e">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{iqcDefectQty}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="410" y="0" width="60" height="18" uuid="de73b394-93be-440e-9cf3-0ff402506a3a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{iqcDefectPercentage}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="470" y="0" width="50" height="18" uuid="c2575894-67a5-4251-aebd-59999fec00b5">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{iqcResult}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="520" y="0" width="70" height="18" uuid="62104cab-dcd5-41f0-abbf-21d7badc0edb">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{iqcRemarks}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="590" y="0" width="80" height="18" uuid="091605c2-1a39-4823-ae74-1c8f51ac0145">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{storeLocation}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="670" y="0" width="40" height="18" uuid="18fceed4-b742-4cbe-87b2-90933c50965c">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{supplierID}]]></textFieldExpression>
</textField>
<textField textAdjust="StretchHeight">
<reportElement x="710" y="0" width="90" height="18" uuid="eb6ed0fc-bfda-4a89-a163-fe08b00a0120">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Top">
<font fontName="微軟正黑體" size="10"/>
</textElement>
<textFieldExpression><![CDATA[$F{supplierName}]]></textFieldExpression>
</textField>
</band>
</detail>
</jasperReport>

Laden…
Abbrechen
Speichern