Parcourir la source

發貨與配送>員工發貨績效 added a new access right 績效

doTruckUpdate
Fai Luk il y a 1 mois
Parent
révision
d024862c1d
3 fichiers modifiés avec 39 ajouts et 15 suppressions
  1. +5
    -0
      src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java
  2. +19
    -0
      src/main/resources/db/changelog/changes/20261004_performance_authority/01_add_performance_authority.sql
  3. +15
    -15
      src/main/resources/qrCodeLabel/poItemPDF_v4.jrxml

+ 5
- 0
src/main/java/com/ffii/fpsms/config/security/SecurityConfig.java Voir le fichier

@@ -148,6 +148,11 @@ public class SecurityConfig {
.hasAnyAuthority("ADMIN", "TRUCK_LANE", "TESTING")
.requestMatchers("/truckLaneSchedule/**")
.hasAnyAuthority("ADMIN", "TRUCK_LANE", "TESTING")
/* 員工發貨績效 (/chart/delivery): PERFORMANCE (績效) */
.requestMatchers(HttpMethod.GET, "/chart/staff-delivery-performance")
.hasAuthority("PERFORMANCE")
.requestMatchers(HttpMethod.GET, "/chart/staff-delivery-performance-handlers")
.hasAuthority("PERFORMANCE")
.anyRequest().authenticated())
.httpBasic(httpBasic -> httpBasic.authenticationEntryPoint(
(request, response, authException) -> sendUnauthorizedJson(response, "Unauthorized", "UNAUTHORIZED")))


+ 19
- 0
src/main/resources/db/changelog/changes/20261004_performance_authority/01_add_performance_authority.sql Voir le fichier

@@ -0,0 +1,19 @@
--liquibase formatted sql

--changeset fpsms:add_performance_authority
--preconditions onFail:MARK_RAN
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM authority WHERE authority = 'PERFORMANCE'
--comment: Staff delivery performance on /chart/delivery requires PERFORMANCE (績效)
INSERT IGNORE INTO `authority` (`authority`, `name`, `module`, `description`)
VALUES ('PERFORMANCE', '績效', 'CHART', 'Allow viewing staff delivery performance on /chart/delivery');

--changeset fpsms:grant_performance_authority_to_2fi
--preconditions onFail:MARK_RAN
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM user_authority ua JOIN `user` u ON u.id = ua.userId JOIN authority a ON a.id = ua.authId WHERE u.username = '2fi' AND a.authority = 'PERFORMANCE'
--comment: Default grant 績效 to user 2fi
INSERT IGNORE INTO `user_authority` (`userId`, `authId`)
SELECT u.id, a.id
FROM `user` u
JOIN `authority` a ON a.authority = 'PERFORMANCE'
WHERE u.username = '2fi'
AND u.deleted = 0;

+ 15
- 15
src/main/resources/qrCodeLabel/poItemPDF_v4.jrxml Voir le fichier

@@ -66,28 +66,28 @@
<text><![CDATA[物料編號:]]></text>
</staticText>
<staticText>
<reportElement x="116" y="142" width="110" height="16" uuid="53a2d7cf-bd50-4264-abee-346823cd49dd"/>
<reportElement x="130" y="142" width="96" height="16" uuid="53a2d7cf-bd50-4264-abee-346823cd49dd"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10" isBold="true"/>
</textElement>
<text><![CDATA[數量:]]></text>
</staticText>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="8" y="158" width="104" height="22" uuid="1f289946-b945-4f79-8515-212368b8be3b"/>
<reportElement x="8" y="158" width="118" height="34" uuid="1f289946-b945-4f79-8515-212368b8be3b"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="18" isBold="true"/>
<font fontName="微軟正黑體" size="30" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{itemNo}]]></textFieldExpression>
</textField>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="116" y="158" width="110" height="18" uuid="629d9af8-c73f-4614-ba9d-a582e2ed4a29"/>
<reportElement x="130" y="158" width="96" height="18" uuid="629d9af8-c73f-4614-ba9d-a582e2ed4a29"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="14" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{qtyLabel}]]></textFieldExpression>
</textField>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="116" y="176" width="110" height="12" uuid="7c1a0e44-6b2d-4a91-9f10-2d8e5b6c4a11">
<reportElement x="130" y="178" width="96" height="14" uuid="7c1a0e44-6b2d-4a91-9f10-2d8e5b6c4a11">
<printWhenExpression><![CDATA[$F{qtyDetail} != null && !$F{qtyDetail}.trim().isEmpty()]]></printWhenExpression>
</reportElement>
<textElement textAlignment="Left" verticalAlignment="Middle">
@@ -96,14 +96,14 @@
<textFieldExpression><![CDATA[$F{qtyDetail}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="8" y="192" width="218" height="16" uuid="5c3f9b03-222c-4c94-ab58-6bc86d44c5ce"/>
<reportElement x="8" y="196" width="218" height="16" uuid="5c3f9b03-222c-4c94-ab58-6bc86d44c5ce"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="10" isBold="true"/>
</textElement>
<text><![CDATA[物料名稱:]]></text>
</staticText>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="8" y="208" width="218" height="68" uuid="e04b094d-2d16-4060-b6d9-2e6033a673ab"/>
<reportElement x="8" y="212" width="218" height="64" uuid="e04b094d-2d16-4060-b6d9-2e6033a673ab"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="48" isBold="true"/>
</textElement>
@@ -114,42 +114,42 @@
<imageExpression><![CDATA[$F{qrCode}]]></imageExpression>
</image>
<staticText>
<reportElement x="230" y="198" width="70" height="24" uuid="f5f145f1-123f-4fe5-90fa-8550b3d2eb63"/>
<reportElement x="230" y="196" width="190" height="16" uuid="f5f145f1-123f-4fe5-90fa-8550b3d2eb63"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="12" isBold="true"/>
<font fontName="微軟正黑體" size="10" isBold="true"/>
</textElement>
<text><![CDATA[批次編號:]]></text>
</staticText>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="300" y="198" width="120" height="24" uuid="402f35fc-b11a-4bf1-982d-e12c622f38ea"/>
<reportElement x="230" y="212" width="190" height="26" uuid="402f35fc-b11a-4bf1-982d-e12c622f38ea"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="16" isBold="true"/>
<font fontName="微軟正黑體" size="18" isBold="true"/>
</textElement>
<textFieldExpression><![CDATA[$F{lotNo}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="230" y="224" width="42" height="16" uuid="c2041205-51f8-45bb-a1d1-e3de37eebed7"/>
<reportElement x="230" y="240" width="42" height="16" uuid="c2041205-51f8-45bb-a1d1-e3de37eebed7"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="8"/>
</textElement>
<text><![CDATA[供應商:]]></text>
</staticText>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="272" y="224" width="144" height="16" uuid="ab82ca39-8840-4471-b7c0-cdeec9cb5693"/>
<reportElement x="272" y="240" width="148" height="16" uuid="ab82ca39-8840-4471-b7c0-cdeec9cb5693"/>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{supplier}]]></textFieldExpression>
</textField>
<staticText>
<reportElement x="230" y="242" width="72" height="16" uuid="1b1efafd-049a-432e-93c4-9662273011f7"/>
<reportElement x="230" y="258" width="72" height="16" uuid="1b1efafd-049a-432e-93c4-9662273011f7"/>
<textElement textAlignment="Left" verticalAlignment="Middle">
<font fontName="微軟正黑體" size="8"/>
</textElement>
<text><![CDATA[採購訂單編號:]]></text>
</staticText>
<textField textAdjust="ScaleFont" isBlankWhenNull="true">
<reportElement x="302" y="242" width="114" height="16" uuid="b805e20a-9a36-45c8-8255-23b6cc58f47c"/>
<reportElement x="302" y="258" width="118" height="16" uuid="b805e20a-9a36-45c8-8255-23b6cc58f47c"/>
<textElement verticalAlignment="Middle">
<font fontName="微軟正黑體" size="8"/>
</textElement>


Chargement…
Annuler
Enregistrer