| @@ -0,0 +1,32 @@ | |||
| package com.ffii.core.utils; | |||
| import org.springframework.util.ResourceUtils; | |||
| import java.io.File; | |||
| import net.sf.jasperreports.engine.JasperCompileManager; | |||
| import net.sf.jasperreports.engine.JasperPrint; | |||
| import net.sf.jasperreports.engine.JasperReport; | |||
| import java.util.Map; | |||
| import java.util.List; | |||
| import net.sf.jasperreports.engine.JRDataSource; | |||
| import net.sf.jasperreports.engine.JREmptyDataSource; | |||
| import net.sf.jasperreports.engine.JasperFillManager; | |||
| import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; | |||
| public class PdfUtils { | |||
| public static JasperReport loadJasperReport(String path) throws Exception { | |||
| File file = ResourceUtils.getFile(path); | |||
| JasperReport reportTemplate = JasperCompileManager.compileReport(file.getAbsolutePath()); | |||
| return reportTemplate; | |||
| } | |||
| public static <T> JasperPrint fillReport(JasperReport report, List<T> loopList, Map<String, Object> params) | |||
| throws Exception { | |||
| JRDataSource dataSources = loopList.size() > 0 ? new JRBeanCollectionDataSource(loopList) | |||
| : new JREmptyDataSource(); | |||
| JasperPrint jasperPrint = JasperFillManager.fillReport(report, params, dataSources); | |||
| return jasperPrint; | |||
| } | |||
| } | |||
| @@ -0,0 +1,18 @@ | |||
| package com.ffii.core.utils | |||
| import com.google.zxing.BarcodeFormat | |||
| import java.awt.image.BufferedImage | |||
| import com.google.zxing.client.j2se.MatrixToImageWriter; | |||
| import com.google.zxing.common.BitMatrix; | |||
| import com.google.zxing.qrcode.QRCodeWriter; | |||
| open class QrCodeUtil { | |||
| companion object { | |||
| fun generateQRCodeImage(barcodeText: String?): BufferedImage { | |||
| val barcodeWriter = QRCodeWriter() | |||
| val bitMatrix: BitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.QR_CODE, 250, 250) | |||
| val img: BufferedImage = MatrixToImageWriter.toBufferedImage(bitMatrix) | |||
| return img | |||
| } | |||
| } | |||
| } | |||
| @@ -113,4 +113,6 @@ open class PurchaseOrderService( | |||
| return savedPurchaseOrder | |||
| } | |||
| } | |||
| @@ -10,7 +10,7 @@ import jakarta.validation.constraints.NotNull | |||
| @Entity | |||
| @Table(name = "qc_result") | |||
| class QcResult: BaseEntity<Long>() { | |||
| open class QcResult: BaseEntity<Long>() { | |||
| @NotNull | |||
| @ManyToOne | |||
| @JoinColumn(name = "qcItemId") | |||
| @@ -1,8 +1,10 @@ | |||
| package com.ffii.fpsms.modules.qc.entity | |||
| import com.ffii.core.support.AbstractRepository | |||
| import com.ffii.fpsms.modules.qc.entity.projection.QcResultInfo | |||
| import org.springframework.stereotype.Repository | |||
| @Repository | |||
| interface QcResultRepository: AbstractRepository<QcResult, Long> { | |||
| fun findAllQcResultInfoByStockInLineIdAndDeletedFalse(stockInLineId: Long): List<QcResultInfo> | |||
| } | |||
| @@ -0,0 +1,14 @@ | |||
| package com.ffii.fpsms.modules.qc.entity.projection | |||
| import org.springframework.beans.factory.annotation.Value | |||
| interface QcResultInfo { | |||
| val id: Long | |||
| @get:Value("#{target.qcItem.name}") | |||
| val name: String | |||
| @get:Value("#{target.qcItem.code}") | |||
| val code: String | |||
| @get:Value("#{target.stockInLine.id}") | |||
| val stockInLineId: Long | |||
| val failQty: Double | |||
| } | |||
| @@ -8,6 +8,7 @@ import com.ffii.fpsms.modules.master.web.models.MessageResponse | |||
| import com.ffii.fpsms.modules.purchaseOrder.entity.PurchaseOrderLineRepository | |||
| import com.ffii.fpsms.modules.qc.entity.QcResult | |||
| import com.ffii.fpsms.modules.qc.entity.QcResultRepository | |||
| import com.ffii.fpsms.modules.qc.entity.projection.QcResultInfo | |||
| import com.ffii.fpsms.modules.qc.web.model.SaveQcResultRequest | |||
| import com.ffii.fpsms.modules.stock.entity.StockInLine | |||
| import com.ffii.fpsms.modules.stock.entity.StockInLineRepository | |||
| @@ -54,4 +55,7 @@ open class QcResultService( | |||
| ) | |||
| } | |||
| fun getAllQcResultInfoByStockInLineId(stockInLineId: Long): List<QcResultInfo> { | |||
| return qcResultRepository.findAllQcResultInfoByStockInLineIdAndDeletedFalse(stockInLineId) | |||
| } | |||
| } | |||
| @@ -2,13 +2,11 @@ package com.ffii.fpsms.modules.qc.web | |||
| import com.ffii.fpsms.modules.master.web.models.MessageResponse | |||
| import com.ffii.fpsms.modules.master.web.models.NewItemRequest | |||
| import com.ffii.fpsms.modules.qc.entity.projection.QcResultInfo | |||
| import com.ffii.fpsms.modules.qc.service.QcResultService | |||
| import com.ffii.fpsms.modules.qc.web.model.SaveQcResultRequest | |||
| import jakarta.validation.Valid | |||
| import org.springframework.web.bind.annotation.PostMapping | |||
| import org.springframework.web.bind.annotation.RequestBody | |||
| import org.springframework.web.bind.annotation.RequestMapping | |||
| import org.springframework.web.bind.annotation.RestController | |||
| import org.springframework.web.bind.annotation.* | |||
| @RestController | |||
| @RequestMapping("/qcResult") | |||
| @@ -20,4 +18,9 @@ class QcResultController( | |||
| fun saveItem(@Valid @RequestBody request: SaveQcResultRequest): MessageResponse { | |||
| return qcResultService.createOrUpdate(request) | |||
| } | |||
| @GetMapping("/{stockInLineId}") | |||
| fun getAllQcResultInfoByStockInLineId(@PathVariable stockInLineId: Long): List<QcResultInfo> { | |||
| return qcResultService.getAllQcResultInfoByStockInLineId(stockInLineId) | |||
| } | |||
| } | |||
| @@ -1,6 +1,7 @@ | |||
| package com.ffii.fpsms.modules.stock.entity | |||
| import com.ffii.core.support.AbstractRepository | |||
| import com.ffii.fpsms.modules.stock.entity.projection.QrCodeInfo | |||
| import com.ffii.fpsms.modules.stock.entity.projection.StockInLineInfo | |||
| import org.springframework.stereotype.Repository | |||
| @@ -10,4 +11,5 @@ interface StockInLineRepository : AbstractRepository<StockInLine, Long> { | |||
| fun findAllStockInLineInfoByStockInIdAndDeletedFalse(stockInId: Long): List<StockInLineInfo> | |||
| fun findStockInLineInfoByIdAndDeletedFalse(id: Long): StockInLineInfo | |||
| fun findStockInLineInfoByIdInAndDeletedFalse(id: List<Long>): List<StockInLineInfo> | |||
| fun findQrCodeInfoByIdInAndDeletedFalse(id: List<Long>): List<QrCodeInfo> | |||
| } | |||
| @@ -0,0 +1,27 @@ | |||
| package com.ffii.fpsms.modules.stock.entity.projection | |||
| import org.springframework.beans.factory.annotation.Value | |||
| import java.awt.image.BufferedImage | |||
| import java.math.BigDecimal | |||
| import java.time.LocalDate | |||
| import java.time.LocalDateTime | |||
| interface QrCodeInfo { // stockInLine | |||
| val id: Long // stockInLineId | |||
| @get:Value("#{target.item?.id}") | |||
| val itemId: Long | |||
| @get:Value("#{target.item?.name}") | |||
| val itemName: String | |||
| val itemNo: String | |||
| @get:Value("#{target.stockIn?.purchaseOrder.code}") | |||
| val poCode: String | |||
| @get:Value("#{target.item?.type}") | |||
| val itemType: String | |||
| val acceptedQty: BigDecimal | |||
| val productionDate: LocalDateTime? | |||
| val expiryDate: LocalDate? | |||
| val lotNo: String? | |||
| @get:Value("#{target.stockIn?.purchaseOrder?.shop?.name}") | |||
| val supplier: String? | |||
| var qrCode: BufferedImage? | |||
| } | |||
| @@ -2,6 +2,7 @@ package com.ffii.fpsms.modules.stock.service | |||
| import com.ffii.core.support.AbstractBaseEntityService | |||
| import com.ffii.core.support.JdbcDao | |||
| import com.ffii.core.utils.QrCodeUtil | |||
| import com.ffii.fpsms.modules.common.CodeGenerator | |||
| import com.ffii.fpsms.modules.master.entity.ItemsRepository | |||
| import com.ffii.fpsms.modules.master.entity.QcItemRepository | |||
| @@ -10,17 +11,21 @@ import com.ffii.fpsms.modules.purchaseOrder.entity.PurchaseOrderLineRepository | |||
| import com.ffii.fpsms.modules.qc.entity.QcResult | |||
| import com.ffii.fpsms.modules.qc.entity.QcResultRepository | |||
| import com.ffii.fpsms.modules.stock.entity.* | |||
| import com.ffii.fpsms.modules.stock.sql.StockSql.SQL.INVENTORY_COUNT | |||
| import com.ffii.fpsms.modules.stock.web.model.ExportQrCodeRequest | |||
| import com.ffii.fpsms.modules.stock.web.model.SaveStockInLineRequest | |||
| import com.ffii.fpsms.modules.stock.web.model.SaveStockInRequest | |||
| import com.ffii.fpsms.modules.stock.web.model.StockInLineStatus | |||
| import com.ffii.fpsms.modules.stock.sql.StockSql.SQL.INVENTORY_COUNT | |||
| import com.ffii.fpsms.modules.stock.web.model.SaveInventoryRequest | |||
| import net.sf.jasperreports.engine.JasperCompileManager | |||
| import org.springframework.core.io.ClassPathResource | |||
| import org.springframework.stereotype.Service | |||
| import org.springframework.transaction.annotation.Transactional | |||
| import java.io.IOException | |||
| import java.math.BigDecimal | |||
| import java.time.LocalDate | |||
| import java.time.LocalDateTime | |||
| import com.ffii.core.utils.PdfUtils; | |||
| @Service | |||
| open class StockInLineService( | |||
| @@ -83,7 +88,8 @@ open class StockInLineService( | |||
| expiryDate = request.expiryDate// frontend form input | |||
| lotNo = newLotNo | |||
| } | |||
| return inventoryLotRepository.saveAndFlush(inventoryLot) | |||
| val savedInventoryLot = inventoryLotRepository.saveAndFlush(inventoryLot) | |||
| return savedInventoryLot | |||
| } | |||
| @Throws(IOException::class) | |||
| @@ -127,18 +133,19 @@ open class StockInLineService( | |||
| if (request.acceptedQty.compareTo(stockInLine.acceptedQty) == 0) { | |||
| var savedInventoryLot: InventoryLot? = null | |||
| saveQcResultWhenStockIn(request, stockInLine) | |||
| if (request.status == StockInLineStatus.RECEIVED.status) { | |||
| if (request.expiryDate == null) { | |||
| return MessageResponse( | |||
| id = null, | |||
| code = null, | |||
| name = null, | |||
| type = "Found Null", | |||
| message = "missing expiry", | |||
| errorPosition = "expiryDate", | |||
| ) | |||
| } | |||
| if (request.status == StockInLineStatus.COMPLETE.status) { | |||
| // if (request.expiryDate == null) { | |||
| // return MessageResponse( | |||
| // id = null, | |||
| // code = null, | |||
| // name = null, | |||
| // type = "Found Null", | |||
| // message = "missing expiry", | |||
| // errorPosition = "expiryDate", | |||
| // ) | |||
| // } | |||
| savedInventoryLot = saveInventoryLotWhenStockIn(request = request, stockInLine = stockInLine) | |||
| println(savedInventoryLot) | |||
| } | |||
| stockInLine.apply { | |||
| // user = null | |||
| @@ -188,18 +195,19 @@ open class StockInLineService( | |||
| } | |||
| saveQcResultWhenStockIn(request, stockInLine) | |||
| var savedInventoryLot: InventoryLot? = null | |||
| if (request.status == StockInLineStatus.RECEIVED.status) { | |||
| if (request.expiryDate == null) { | |||
| return MessageResponse( | |||
| id = null, | |||
| code = null, | |||
| name = null, | |||
| type = "Found Null", | |||
| message = "missing expiry", | |||
| errorPosition = "expiryDate", | |||
| ) | |||
| } | |||
| if (request.status == StockInLineStatus.COMPLETE.status) { | |||
| // if (request.expiryDate == null) { | |||
| // return MessageResponse( | |||
| // id = null, | |||
| // code = null, | |||
| // name = null, | |||
| // type = "Found Null", | |||
| // message = "missing expiry", | |||
| // errorPosition = "expiryDate", | |||
| // ) | |||
| // } | |||
| savedInventoryLot = saveInventoryLotWhenStockIn(request = request, stockInLine = stockInLine) | |||
| println(savedInventoryLot) | |||
| } | |||
| stockInLine.apply { | |||
| receiptDate = request.receiptDate?.atStartOfDay() | |||
| @@ -228,4 +236,32 @@ open class StockInLineService( | |||
| } | |||
| } | |||
| @Throws(IOException::class) | |||
| @Transactional | |||
| open fun exportStockInLineQrcode(request: ExportQrCodeRequest): Map<String, Any> { | |||
| val QRCODE_PDF = "qrCodeLabel/poItemPDF.jrxml" | |||
| val resource = ClassPathResource(QRCODE_PDF) | |||
| val inputStream = resource.inputStream | |||
| val poLabel = JasperCompileManager.compileReport(inputStream) | |||
| val stockInLineInfo = stockInLineRepository.findQrCodeInfoByIdInAndDeletedFalse(request.stockInLineIds).toMutableList() | |||
| for (lineInfo in stockInLineInfo) { | |||
| val field = mutableMapOf<String, Any>() | |||
| val qrCodeContent = ( | |||
| "itemId:${lineInfo.itemId}" + | |||
| ",stockInLineId:${lineInfo.id}" | |||
| ) | |||
| val image = QrCodeUtil.generateQRCodeImage(qrCodeContent) | |||
| lineInfo.apply { | |||
| this.qrCode = image | |||
| } | |||
| } | |||
| val params: MutableMap<String, Any> = mutableMapOf( | |||
| "poCode" to stockInLineInfo[0].poCode | |||
| ) | |||
| return mapOf( | |||
| "report" to PdfUtils.fillReport(poLabel,stockInLineInfo, params), | |||
| "fileName" to stockInLineInfo[0].poCode | |||
| ); | |||
| } | |||
| } | |||
| @@ -5,8 +5,8 @@ open class StockSql { | |||
| val INVENTORY_COUNT = StringBuilder("select" | |||
| + " count(id) " | |||
| + " from inventory_lot i " | |||
| + " where i.stockInDate <= :from " | |||
| + " and i.stockInDate < :to " | |||
| + " where i.stockInDate > :from " | |||
| + " and i.stockInDate <= :to " | |||
| + " and i.itemId = :itemId" | |||
| ) | |||
| } | |||
| @@ -1,15 +1,22 @@ | |||
| package com.ffii.fpsms.modules.stock.web | |||
| import com.ffii.fpsms.modules.master.web.models.MessageResponse | |||
| import com.ffii.fpsms.modules.master.web.models.NewItemRequest | |||
| import com.ffii.fpsms.modules.stock.service.StockInLineService | |||
| import com.ffii.fpsms.modules.stock.web.model.ExportQrCodeRequest | |||
| import com.ffii.fpsms.modules.stock.web.model.SaveStockInLineRequest | |||
| import jakarta.servlet.http.HttpServletResponse | |||
| import jakarta.validation.Valid | |||
| import org.springframework.web.bind.annotation.GetMapping | |||
| import net.sf.jasperreports.engine.JasperExportManager | |||
| import net.sf.jasperreports.engine.JasperPrint | |||
| import org.springframework.context.NoSuchMessageException | |||
| import org.springframework.web.bind.annotation.PostMapping | |||
| import org.springframework.web.bind.annotation.RequestBody | |||
| import org.springframework.web.bind.annotation.RequestMapping | |||
| import org.springframework.web.bind.annotation.RestController | |||
| import java.io.OutputStream | |||
| import java.io.UnsupportedEncodingException | |||
| import java.text.ParseException | |||
| @RestController | |||
| @RequestMapping("/stockInLine") | |||
| @@ -25,4 +32,18 @@ class StockInLineController( | |||
| fun update(@Valid @RequestBody newItem: SaveStockInLineRequest): MessageResponse { | |||
| return stockInLineService.update(newItem) | |||
| } | |||
| @PostMapping("/print-label") | |||
| @Throws(UnsupportedEncodingException::class, NoSuchMessageException::class, ParseException::class, Exception::class) | |||
| fun printLabel(@Valid @RequestBody request: ExportQrCodeRequest, response: HttpServletResponse) { | |||
| response.characterEncoding = "utf-8"; | |||
| response.contentType = "application/pdf"; | |||
| val out: OutputStream = response.outputStream | |||
| val pdf: Map<String, Any> = stockInLineService.exportStockInLineQrcode(request) | |||
| val jasperPrint = pdf["report"] as JasperPrint | |||
| response.setHeader("Content-Disposition", "attachment; filename=" + pdf["fileName"] + ".pdf"); | |||
| out.write(JasperExportManager.exportReportToPdf(jasperPrint)); | |||
| } | |||
| } | |||
| @@ -0,0 +1,5 @@ | |||
| package com.ffii.fpsms.modules.stock.web.model | |||
| data class ExportQrCodeRequest ( | |||
| val stockInLineIds: List<Long> | |||
| ) | |||
| @@ -0,0 +1,196 @@ | |||
| <?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="poItemPDF" printOrder="Horizontal" pageWidth="425" pageHeight="283" orientation="Landscape" columnWidth="421" leftMargin="2" rightMargin="2" topMargin="2" bottomMargin="2" uuid="6cb85eb9-3573-42f3-a293-099db250aec0"> | |||
| <property name="com.jaspersoft.studio.unit." value="pixel"/> | |||
| <parameter name="lotNo" class="java.lang.String"/> | |||
| <parameter name="materialName" class="java.lang.String"/> | |||
| <parameter name="materialCode" class="java.lang.String"/> | |||
| <parameter name="purchaseCode" class="java.lang.String"/> | |||
| <parameter name="qrCode" class="java.awt.Image"/> | |||
| <parameter name="materialQty" class="java.math.BigDecimal"/> | |||
| <parameter name="materialUom" class="java.lang.String"/> | |||
| <queryString> | |||
| <![CDATA[]]> | |||
| </queryString> | |||
| <field name="lotNo" class="java.lang.String"/> | |||
| <field name="materialName" class="java.lang.String"/> | |||
| <field name="materialCode" class="java.lang.String"/> | |||
| <field name="materialQty" class="java.lang.String"/> | |||
| <field name="materialUom" class="java.lang.String"/> | |||
| <field name="qrCode" class="java.awt.Image"/> | |||
| <field name="purchaseCode" class="java.lang.String"/> | |||
| <field name="supplierName" class="java.lang.String"/> | |||
| <field name="materialWeight" class="java.lang.String"/> | |||
| <field name="weightUnit" class="java.lang.String"/> | |||
| <field name="mfrDate" class="java.lang.String"/> | |||
| <field name="shelfLifeDate" class="java.lang.String"/> | |||
| <background> | |||
| <band splitType="Stretch"/> | |||
| </background> | |||
| <detail> | |||
| <band height="279" splitType="Stretch"> | |||
| <textField> | |||
| <reportElement x="80" y="21" width="150" height="16" uuid="402f35fc-b11a-4bf1-982d-e12c622f38ea"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{lotNo}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="21" width="80" height="16" uuid="f5f145f1-123f-4fe5-90fa-8550b3d2eb63"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[批次編號:]]></text> | |||
| </staticText> | |||
| <staticText> | |||
| <reportElement x="0" y="49" width="80" height="16" uuid="c2041205-51f8-45bb-a1d1-e3de37eebed7"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[供應商:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="49" width="150" height="16" uuid="ab82ca39-8840-4471-b7c0-cdeec9cb5693"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{supplierName}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="104" width="80" height="16" uuid="96d46fb1-939d-4f3e-b8f0-172b69b85e9f"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[物料編號:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="104" width="150" height="16" uuid="1f289946-b945-4f79-8515-212368b8be3b"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{materialCode}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="160" width="80" height="16" uuid="53a2d7cf-bd50-4264-abee-346823cd49dd"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[數量:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="160" width="150" height="16" uuid="629d9af8-c73f-4614-ba9d-a582e2ed4a29"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{materialQty} + " " + $F{materialUom}]]></textFieldExpression> | |||
| </textField> | |||
| <image> | |||
| <reportElement x="230" y="45" width="190" height="190" uuid="5dd35c73-973b-4f0d-9cad-13305a29a9fd"> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| </reportElement> | |||
| <imageExpression><![CDATA[$F{qrCode}]]></imageExpression> | |||
| </image> | |||
| <staticText> | |||
| <reportElement x="0" y="216" width="80" height="16" uuid="c62ac00a-c495-462c-93bc-97bdd3cdb395"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| </reportElement> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[生產日期:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="216" width="150" height="16" uuid="74a5cfba-046d-42f4-92d7-113729514a6f"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{mfrDate}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="77" width="80" height="16" uuid="1b1efafd-049a-432e-93c4-9662273011f7"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[採購訂單編號:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="77" width="150" height="16" uuid="b805e20a-9a36-45c8-8255-23b6cc58f47c"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$P{purchaseCode}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="132" width="80" height="16" uuid="5c3f9b03-222c-4c94-ab58-6bc86d44c5ce"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[物料名稱:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="132" width="150" height="16" uuid="e04b094d-2d16-4060-b6d9-2e6033a673ab"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{materialName}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="188" width="80" height="16" uuid="8b4d694b-90eb-4be4-b407-38d3dae15096"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[總淨重量:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="188" width="150" height="16" uuid="d6a75fb1-ade3-4216-b7e2-d596e65091ef"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{materialWeight} + " " + $F{weightUnit}]]></textFieldExpression> | |||
| </textField> | |||
| <staticText> | |||
| <reportElement x="0" y="244" width="80" height="16" uuid="32edcad1-23c1-4d41-8c9a-352d9e6ef377"/> | |||
| <textElement textAlignment="Left"> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <text><![CDATA[到期日:]]></text> | |||
| </staticText> | |||
| <textField> | |||
| <reportElement x="80" y="244" width="150" height="16" uuid="97e4a9bb-fc84-4074-b523-ddf9eb9ed2d2"> | |||
| <property name="com.jaspersoft.studio.unit.height" value="px"/> | |||
| <property name="com.jaspersoft.studio.unit.width" value="px"/> | |||
| </reportElement> | |||
| <textElement> | |||
| <font fontName="微軟正黑體" size="12"/> | |||
| </textElement> | |||
| <textFieldExpression><![CDATA[$F{shelfLifeDate}]]></textFieldExpression> | |||
| </textField> | |||
| </band> | |||
| </detail> | |||
| </jasperReport> | |||