Browse Source

fg stock in label update

master
kelvin.yau 3 days ago
parent
commit
537280bb34
6 changed files with 400 additions and 408 deletions
  1. +50
    -71
      src/main/java/com/ffii/fpsms/modules/jobOrder/service/JobOrderService.kt
  2. +7
    -8
      src/main/java/com/ffii/fpsms/modules/jobOrder/web/JobOrderController.kt
  3. +5
    -0
      src/main/java/com/ffii/fpsms/modules/jobOrder/web/model/ExportFGStockInLabelRequest.kt
  4. +7
    -0
      src/main/java/com/ffii/fpsms/modules/jobOrder/web/model/PrintFGStockInLabelRequest.kt
  5. +0
    -0
      src/main/resources/FGStockInLabel/FGStockInLabel.jrxml
  6. +331
    -329
      src/main/resources/PickRecord/PickRecordPDF.jrxml

+ 50
- 71
src/main/java/com/ffii/fpsms/modules/jobOrder/service/JobOrderService.kt View File

@@ -57,6 +57,12 @@ import java.io.IOException
import com.ffii.fpsms.modules.jobOrder.entity.projections.JobOrderInfoWithTypeName
import com.ffii.fpsms.modules.jobOrder.entity.projections.JobTypeResponse
import com.ffii.fpsms.modules.stock.entity.InventoryRepository
import com.ffii.fpsms.modules.stock.entity.StockInLineRepository
import com.ffii.fpsms.modules.stock.service.QrContent
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import kotlin.math.exp


@Service
open class JobOrderService(
@@ -74,7 +80,8 @@ open class JobOrderService(
val stockOutLineRepository: StockOutLIneRepository,
private val printerService: PrinterService,
val jobTypeRepository: JobTypeRepository,
val inventoryRepository: InventoryRepository
val inventoryRepository: InventoryRepository,
val stockInLineRepository: StockInLineRepository
) {

open fun allJobOrdersByPage(request: SearchJobOrderInfoRequest): RecordsRes<JobOrderInfo> {
@@ -620,81 +627,52 @@ open class JobOrderService(
}
}

//New Print Pick Record
//Print Pick Record
@Transactional
open fun NewPrintPickRecord(request: PrintPickRecordRequest){
val printer = printerService.findById(request.printerId) ?: throw java.util.NoSuchElementException("No such printer")
println("New DEBUG: Printer found: ${printer.name}")
println("New DEBUG: Exporting pick record for pick order ID: ${request.pickOrderId}")
val pdf = exportPickRecord(
ExportPickRecordRequest(
pickOrderIds = request.pickOrderId
)
)
println("New DEBUG: PDF exported: ${pdf}")
val jasperPrint = pdf["report"] as JasperPrint
println("New DEBUG: JasperPrint: ${jasperPrint}")
val tempPdfFile = File.createTempFile("print_job_",".pdf")
println("New DEBUG: Temporary PDF file created: ${tempPdfFile.absolutePath}")
try{
JasperExportManager.exportReportToPdfFile(jasperPrint,tempPdfFile.absolutePath)
println("New DEBUG: JasperPrint exported to PDF file: ${tempPdfFile.absolutePath}")
val printQty = if (request.printQty == null || request.printQty <= 0) 1 else request.printQty
println("New DEBUG: Print quantity: $printQty")
// Auto-detect orientation and set duplex mode accordingly
val duplexMode = if (CanonPrinterUtil.isLandscape(tempPdfFile)) {
CanonPrinterUtil.DuplexMode.DUPLEX_SHORT_EDGE // Landscape: flip on short edge
} else {
CanonPrinterUtil.DuplexMode.DUPLEX_LONG_EDGE // Portrait: flip on long edge
}
println("New DEBUG: PDF orientation detected - Landscape: ${CanonPrinterUtil.isLandscape(tempPdfFile)}, Duplex mode: $duplexMode")
printer.ip?.let { ip ->
printer.port?.let { port ->
CanonPrinterUtil.printPdfToCanon(
tempPdfFile,
ip,
port,
printQty,
duplexMode
)
}
}
} finally {
//tempPdfFile.delete()
}
}

//FG Pick Record Label
//FG Stock In Label
@Throws(IOException::class)
@Transactional
// Hardcoded Request
open fun exportFGPickRecordLabel(request: ExportPickRecordRequest): Map<String, Any> {
val FG_PICKRECORD_LABEL_PDF = "PickRecord/FinishedGoodPickRecordLabelPDF.jrxml"
val resource = ClassPathResource(FG_PICKRECORD_LABEL_PDF)
open fun exportFGStockInLabel(request: ExportFGStockInLabelRequest): Map<String, Any> {
val FGSTOCKINLABEL_PDF = "FGStockInLabel/FGStockInLabel.jrxml"
val resource = ClassPathResource(FGSTOCKINLABEL_PDF)
if(!resource.exists()){
throw FileNotFoundException("Report file not found: $FG_PICKRECORD_LABEL_PDF")
throw FileNotFoundException("Report file not found: $FGSTOCKINLABEL_PDF")
}
val inputStream = resource.inputStream
val fgPickRecordLabel = JasperCompileManager.compileReport(inputStream)

val params = mutableMapOf<String, Any>()

// Hardcoded for demo on 6/11/2025
params["jobOrderCode"] = "JO-20251106-0001"
params["finishedGoodItemCode"] = "PP2061"
params["finishedGoodItemName"] = "炒芝麻"
params["finishedGoodLotNo"] = "LT-20251106-0006A"
params["productionQty"] = "25.0"
params["productionDate"] = "2025-11-06"
params["expiryDate"] = "2026-02-06"
params["uom"] = "一包一磅"
params["shortName"] = "包"

// Hardcoded QR code for demo on 6/11/2025
val qrCodeContent = "JO-20241201-001|FG-001|LOT-20241201-001"
//GET STOCK IN LINE FROM REQUEST
val stockInLineId = request.stockInLineId
?: throw BadRequestException("stockInLineId is required")
val stockInLineInfo = stockInLineRepository.findStockInLineInfoByIdAndDeletedFalse(stockInLineId)

//LINK TO JOB ORDER
val jobOrderId = stockInLineInfo.jobOrderId
?: throw BadRequestException("StockInLine does not have an associated JobOrder")
val jobOrder = jobOrderRepository.findById(jobOrderId).orElseThrow()

//HANDLE UOM
val uom = stockInLineInfo.uom
val uomDesc = uom?.udfudesc ?: ""
val uomShortDesc = uom?.udfShortDesc ?: ""

//HANDLE DATES
val dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
val productionDate = stockInLineInfo.productionDate?.toLocalDate()?.format(dateFormatter) ?: ""
val expiryDate = stockInLineInfo.expiryDate?.format(dateFormatter) ?: ""

params["jobOrderCode"] = jobOrder.code ?: "N/A"
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["productionDate"] = productionDate
params["expiryDate"] = expiryDate
params["uom"] = uomDesc
params["shortName"] = uomShortDesc

val qrContent = QrContent(stockInLineInfo.itemId, stockInLineId)
val qrCodeContent = Json.encodeToString(qrContent)
val qrCodeImage = QrCodeUtil.generateQRCodeImage(qrCodeContent)
params["qrCode"] = qrCodeImage

@@ -709,12 +687,12 @@ open class JobOrderService(


@Transactional
open fun printFGPickRecordLabel(request: PrintPickRecordRequest){
open fun printFGStockInLabel(request: PrintFGStockInLabelRequest){
val printer = printerService.findById(request.printerId) ?: throw java.util.NoSuchElementException("No such printer")

val pdf = exportFGPickRecordLabel(
ExportPickRecordRequest(
pickOrderIds = request.pickOrderId
val pdf = exportFGStockInLabel(
ExportFGStockInLabelRequest(
stockInLineId = request.stockInLineId
)
)

@@ -743,6 +721,7 @@ open class JobOrderService(
//tempPdfFile.delete
}
}

open fun getAllJobTypes(): List<JobTypeResponse> {
return jobTypeRepository.findAll().map { JobTypeResponse(it.id, it.name) }
}


+ 7
- 8
src/main/java/com/ffii/fpsms/modules/jobOrder/web/JobOrderController.kt View File

@@ -39,6 +39,8 @@ import org.springframework.web.bind.annotation.RequestParam
import com.ffii.fpsms.modules.jobOrder.web.model.UpdateJoPickOrderHandledByRequest
import com.ffii.fpsms.modules.jobOrder.entity.projections.JobOrderInfo
import com.ffii.fpsms.modules.jobOrder.entity.projections.JobOrderInfoWithTypeName
import com.ffii.fpsms.modules.jobOrder.web.model.ExportFGStockInLabelRequest

@RestController
@RequestMapping("/jo")
class JobOrderController(
@@ -198,25 +200,22 @@ fun recordSecondScanIssue(
fun printPickRecord(@ModelAttribute request: PrintPickRecordRequest){
jobOrderService.printPickRecord(request)
}
@GetMapping("/newPrint-PickRecord")
fun NewprintPickRecord(@ModelAttribute request: PrintPickRecordRequest){
jobOrderService.NewPrintPickRecord(request)
}

@PostMapping("/FGPickRecordLabel")
@Throws(UnsupportedEncodingException::class, NoSuchMessageException::class, ParseException::class, Exception::class)
fun exportFGPickRecordLabel(@Valid @RequestBody request: ExportPickRecordRequest, response: HttpServletResponse){
fun exportFGStockInLabel(@Valid @RequestBody request: ExportFGStockInLabelRequest, response: HttpServletResponse){
response.characterEncoding = "utf-8"
response.contentType = "application/pdf"
val out: OutputStream = response.outputStream
val pdf = jobOrderService.exportFGPickRecordLabel(request)
val pdf = jobOrderService.exportFGStockInLabel(request)
val jasperPrint = pdf["report"] as JasperPrint
response.addHeader("filename", "${pdf["filename"]}.pdf")
out.write(JasperExportManager.exportReportToPdf(jasperPrint))
}

@GetMapping("/print-FGPickRecordLabel")
fun printFGPickRecordLabel(@ModelAttribute request: PrintPickRecordRequest){
jobOrderService.printFGPickRecordLabel(request)
fun printStockInLabel(@ModelAttribute request: PrintFGStockInLabelRequest){
jobOrderService.printFGStockInLabel(request)
}




+ 5
- 0
src/main/java/com/ffii/fpsms/modules/jobOrder/web/model/ExportFGStockInLabelRequest.kt View File

@@ -0,0 +1,5 @@
package com.ffii.fpsms.modules.jobOrder.web.model

data class ExportFGStockInLabelRequest (
val stockInLineId: Long? = null
)

+ 7
- 0
src/main/java/com/ffii/fpsms/modules/jobOrder/web/model/PrintFGStockInLabelRequest.kt View File

@@ -0,0 +1,7 @@
package com.ffii.fpsms.modules.jobOrder.web.model

data class PrintFGStockInLabelRequest(
val stockInLineId: Long? = null,
val printerId: Long,
val printQty: Int? = 1
)

src/main/resources/PickRecord/FinishedGoodPickRecordLabelPDF.jrxml → src/main/resources/FGStockInLabel/FGStockInLabel.jrxml View File


+ 331
- 329
src/main/resources/PickRecord/PickRecordPDF.jrxml View File

@@ -1,332 +1,334 @@
<?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="PickRecord" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isTitleNewPage="true" uuid="63c880e0-c8f6-4221-b8c9-868f8eb315a8">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<parameter name="JobOrderCode" class="java.lang.String"/>
<parameter name="ProductionDate" class="java.lang.String"/>
<parameter name="RequiredQuantity" class="java.lang.String"/>
<parameter name="FGName" class="java.lang.String"/>
<parameter name="FGCode" class="java.lang.String"/>
<parameter name="unit" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="sequenceNumber" class="java.lang.String"/>
<field name="route" class="java.lang.String"/>
<field name="itemName" class="java.lang.String"/>
<field name="itemNo" class="java.lang.String"/>
<field name="uom" class="java.lang.String"/>
<field name="lotNo" class="java.lang.String"/>
<field name="qty" class="java.lang.String"/>
<field name="shortName" class="java.lang.String"/>
<background>
<band height="30">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</band>
</background>
<title>
<band splitType="Stretch"/>
</title>
<pageHeader>
<band height="94" splitType="Stretch">
<staticText>
<reportElement x="0" y="30" width="80" height="18" uuid="cf828c0c-977d-4338-98b0-ff3680ba4d98">
<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="12"/>
</textElement>
<text><![CDATA[工單編號:]]></text>
</staticText>
<textField>
<reportElement x="80" y="30" width="150" height="18" uuid="0c64d973-2553-4a43-9f7e-60722bcf28fa">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{JobOrderCode}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="50" width="80" height="18" uuid="591d3291-7a4f-41bf-9b7e-86b48c341cbe">
<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="12"/>
</textElement>
<text><![CDATA[成品編號:]]></text>
</staticText>
<textField>
<reportElement x="80" y="50" width="150" height="18" uuid="5e1e4cbb-4ecc-4132-87ce-28d856af35a0">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{FGCode}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="50" width="80" height="18" uuid="3196ab21-a4c1-4c2e-a42c-b2b46ae31f5c">
<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="12"/>
</textElement>
<text><![CDATA[成品名稱:]]></text>
</staticText>
<textField>
<reportElement x="360" y="50" width="150" height="18" uuid="af8e72b2-88ca-4069-a2c4-2d2969a5e62c">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{FGName}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="70" width="80" height="18" uuid="aef62434-b98d-4072-804b-30793c6638ae">
<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="12"/>
</textElement>
<text><![CDATA[需求數量:]]></text>
</staticText>
<textField>
<reportElement x="360" y="70" width="150" height="18" uuid="328bbf03-e9e7-4d11-be7b-c1378614e416">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{RequiredQuantity}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="30" width="80" height="18" uuid="c3cf5d66-192f-429e-a7f2-09fcf3a8acc2">
<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="12"/>
</textElement>
<text><![CDATA[生產日期:]]></text>
</staticText>
<textField>
<reportElement x="360" y="30" width="150" height="18" uuid="ca8ef46f-67c8-4064-9cdb-4fd1fb4c5255">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{ProductionDate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="70" width="80" height="18" uuid="a10306aa-d29d-4f57-a78e-36ce6f27d8e2">
<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="12"/>
</textElement>
<text><![CDATA[銷售單位:]]></text>
</staticText>
<textField>
<reportElement x="80" y="70" width="150" height="18" uuid="d712eadd-c351-4497-a4fa-8b28af934053">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<textFieldExpression><![CDATA[$P{unit}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="220" y="0" width="108" height="23" uuid="a8b42d41-fd8e-4071-a6ac-d29ae8817d5a">
<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="微軟正黑體" size="16"/>
</textElement>
<text><![CDATA[板頭紙]]></text>
</staticText>
<staticText>
<reportElement x="430" y="0" width="40" height="18" uuid="4818aa30-4d28-488f-9b65-1cc1853b4ace">
<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="470" y="0" width="20" height="18" uuid="00db1bdc-bd9d-46f0-81d0-3199d10af578">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="530" y="0" width="25" height="18" uuid="6efa6427-43ea-4890-90c3-c2d0ed9225ce">
<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 evaluationTime="Report">
<reportElement x="510" y="0" width="20" height="18" uuid="b596885e-e574-477a-980f-ab9801be56d6">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="490" y="0" width="20" height="18" uuid="4eeb2979-85ad-48e5-8458-58fc5d4a6fac">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Justified">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[/]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="31" splitType="Stretch">
<staticText>
<reportElement x="0" y="5" width="50" height="18" uuid="217b23a0-55c2-4530-a39f-75f59124eeb8">
<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">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[序號]]></text>
</staticText>
<staticText>
<reportElement x="50" y="5" width="50" height="18" uuid="b0a7c4c9-246d-41d3-a277-0ddcc2cedfc7">
<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">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[路綫]]></text>
</staticText>
<staticText>
<reportElement x="100" y="5" width="140" height="18" uuid="51a88f87-33d7-47cf-b2a4-255d93860243">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[貨品編號]]></text>
</staticText>
<staticText>
<reportElement x="240" y="5" width="230" height="18" uuid="0d311aa9-9b98-41a6-9573-df8dd6774d43">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[貨品名稱]]></text>
</staticText>
<staticText>
<reportElement x="470" y="5" width="84" height="18" uuid="9fafa39e-44bb-422e-8af5-0ba39b6b61c2">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[已提數量]]></text>
</staticText>
<line>
<reportElement x="0" y="28" width="554" height="1" uuid="9fd6de66-9d8c-40f0-b924-9122c08d2e7f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<line>
<reportElement x="0" y="23" width="554" height="1" uuid="bc56e45d-0100-4268-81d4-f660c1b3e92c">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</columnHeader>
<detail>
<band height="41" splitType="Stretch">
<textField>
<reportElement x="100" y="0" width="140" height="18" uuid="754bac1b-aca4-4877-9985-2181fef7daa0">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemNo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="50" height="18" uuid="70949de9-80b1-4b52-9890-58b6f4771881">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{sequenceNumber}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="50" y="0" width="50" height="18" uuid="e488844e-60b1-4d4a-a354-75854743ca6f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{route}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="240" y="0" width="230" height="18" uuid="f83fe83d-cac2-4acf-ab0b-5e083b96ff9d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemName} + "(" + $F{uom} + ")"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="240" y="17" width="230" height="18" uuid="63718c20-dff3-44b1-98a7-5ebffb387ba0">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{lotNo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="470" y="-1" width="84" height="18" uuid="d68ec026-2bc5-42c5-86ed-c965029eda73">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Right" verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{qty} + $F{shortName}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="35" width="554" height="1" uuid="dc31083e-6b91-4c66-a4b1-96eed417bbcb">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</detail>
<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="PickRecord" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isIgnorePagination="true" uuid="63c880e0-c8f6-4221-b8c9-868f8eb315a8">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<parameter name="JobOrderCode" class="java.lang.String"/>
<parameter name="ProductionDate" class="java.lang.String"/>
<parameter name="RequiredQuantity" class="java.lang.String"/>
<parameter name="FGName" class="java.lang.String"/>
<parameter name="FGCode" class="java.lang.String"/>
<parameter name="unit" class="java.lang.String"/>
<queryString>
<![CDATA[]]>
</queryString>
<field name="sequenceNumber" class="java.lang.String"/>
<field name="route" class="java.lang.String"/>
<field name="itemName" class="java.lang.String"/>
<field name="itemNo" class="java.lang.String"/>
<field name="uom" class="java.lang.String"/>
<field name="lotNo" class="java.lang.String"/>
<field name="qty" class="java.lang.String"/>
<field name="shortName" class="java.lang.String"/>
<background>
<band/>
</background>
<title>
<band height="49" splitType="Stretch">
<staticText>
<reportElement x="223" y="0" width="108" height="23" uuid="a8b42d41-fd8e-4071-a6ac-d29ae8817d5a">
<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="微軟正黑體" size="16"/>
</textElement>
<text><![CDATA[板頭紙]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band height="67" splitType="Stretch">
<staticText>
<reportElement x="430" y="-40" width="40" height="18" uuid="08da12ed-8c2c-45a2-8b21-2654e7e78f9f">
<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="470" y="-40" width="20" height="18" uuid="789d3ab7-1b4b-4a56-82fd-460f4ccfa68a">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="530" y="-40" width="25" height="18" uuid="1004a3c8-2b90-4011-a2a4-2b6122306cdb">
<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 evaluationTime="Report">
<reportElement x="510" y="-40" width="20" height="18" uuid="11007a4e-87af-42ba-a978-30934d4ecc22">
<property name="com.jaspersoft.studio.unit.width" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Middle"/>
<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="490" y="-40" width="20" height="18" uuid="b9168c5b-b877-49c1-98e7-e87db5d77f8d">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Center" verticalAlignment="Justified">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[/]]></text>
</staticText>
<staticText>
<reportElement x="0" y="0" width="80" height="18" uuid="cf828c0c-977d-4338-98b0-ff3680ba4d98">
<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="12"/>
</textElement>
<text><![CDATA[工單編號:]]></text>
</staticText>
<textField>
<reportElement x="80" y="0" width="150" height="18" uuid="0c64d973-2553-4a43-9f7e-60722bcf28fa">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$P{JobOrderCode}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="20" width="80" height="18" uuid="591d3291-7a4f-41bf-9b7e-86b48c341cbe">
<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="12"/>
</textElement>
<text><![CDATA[成品編號:]]></text>
</staticText>
<textField>
<reportElement x="80" y="20" width="150" height="18" uuid="5e1e4cbb-4ecc-4132-87ce-28d856af35a0">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$P{FGCode}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="20" width="80" height="18" uuid="3196ab21-a4c1-4c2e-a42c-b2b46ae31f5c">
<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="12"/>
</textElement>
<text><![CDATA[成品名稱:]]></text>
</staticText>
<textField>
<reportElement x="360" y="20" width="150" height="18" uuid="af8e72b2-88ca-4069-a2c4-2d2969a5e62c">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$P{FGName}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="40" width="80" height="18" uuid="aef62434-b98d-4072-804b-30793c6638ae">
<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="12"/>
</textElement>
<text><![CDATA[需求數量:]]></text>
</staticText>
<textField>
<reportElement x="360" y="40" width="150" height="18" uuid="328bbf03-e9e7-4d11-be7b-c1378614e416">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$P{RequiredQuantity}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="280" y="0" width="80" height="18" uuid="c3cf5d66-192f-429e-a7f2-09fcf3a8acc2">
<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="12"/>
</textElement>
<text><![CDATA[生產日期:]]></text>
</staticText>
<textField>
<reportElement x="360" y="0" width="150" height="18" uuid="ca8ef46f-67c8-4064-9cdb-4fd1fb4c5255">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$P{ProductionDate}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="0" y="40" width="80" height="18" uuid="a10306aa-d29d-4f57-a78e-36ce6f27d8e2">
<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="12"/>
</textElement>
<text><![CDATA[銷售單位:]]></text>
</staticText>
<textField>
<reportElement x="80" y="40" width="150" height="18" uuid="d712eadd-c351-4497-a4fa-8b28af934053">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$P{unit}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="31" splitType="Stretch">
<staticText>
<reportElement x="0" y="5" width="50" height="18" uuid="217b23a0-55c2-4530-a39f-75f59124eeb8">
<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">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[序號]]></text>
</staticText>
<staticText>
<reportElement x="50" y="5" width="50" height="18" uuid="b0a7c4c9-246d-41d3-a277-0ddcc2cedfc7">
<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">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[路綫]]></text>
</staticText>
<staticText>
<reportElement x="100" y="5" width="140" height="18" uuid="51a88f87-33d7-47cf-b2a4-255d93860243">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[貨品編號]]></text>
</staticText>
<staticText>
<reportElement x="240" y="5" width="230" height="18" uuid="0d311aa9-9b98-41a6-9573-df8dd6774d43">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[貨品名稱]]></text>
</staticText>
<staticText>
<reportElement x="470" y="5" width="84" height="18" uuid="9fafa39e-44bb-422e-8af5-0ba39b6b61c2">
<property name="com.jaspersoft.studio.unit.y" value="px"/>
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement textAlignment="Left">
<font fontName="微軟正黑體" size="12"/>
</textElement>
<text><![CDATA[已提數量]]></text>
</staticText>
<line>
<reportElement x="0" y="28" width="554" height="1" uuid="9fd6de66-9d8c-40f0-b924-9122c08d2e7f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
<line>
<reportElement x="0" y="23" width="554" height="1" uuid="bc56e45d-0100-4268-81d4-f660c1b3e92c">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</columnHeader>
<detail>
<band height="41" splitType="Stretch">
<textField>
<reportElement x="100" y="0" width="140" height="18" uuid="754bac1b-aca4-4877-9985-2181fef7daa0">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemNo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="50" height="18" uuid="70949de9-80b1-4b52-9890-58b6f4771881">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{sequenceNumber}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="50" y="0" width="50" height="18" uuid="e488844e-60b1-4d4a-a354-75854743ca6f">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{route}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="240" y="0" width="230" height="18" uuid="f83fe83d-cac2-4acf-ab0b-5e083b96ff9d">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemName} + "(" + $F{uom} + ")"]]></textFieldExpression>
</textField>
<textField>
<reportElement x="240" y="17" width="230" height="18" uuid="63718c20-dff3-44b1-98a7-5ebffb387ba0">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{lotNo}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="470" y="-1" width="84" height="18" uuid="d68ec026-2bc5-42c5-86ed-c965029eda73">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
<textElement verticalAlignment="Top">
<font fontName="微軟正黑體"/>
</textElement>
<textFieldExpression><![CDATA[$F{qty} + $F{shortName}]]></textFieldExpression>
</textField>
<line>
<reportElement x="0" y="35" width="554" height="1" uuid="dc31083e-6b91-4c66-a4b1-96eed417bbcb">
<property name="com.jaspersoft.studio.unit.height" value="px"/>
</reportElement>
</line>
</band>
</detail>
<pageFooter>
<band height="655"/>
</pageFooter>
</jasperReport>

Loading…
Cancel
Save