Hi Gao,
There is a standard solution available for this.
Create two different PWS - one with counting class 1 and another with counting class 2.
Create two different WSRs - one with PWS1 and another with PWS2 and call them as regular and shift WSRs.
Ensure that for WSR1, you define day type selection rule to ensure that employee is eligible for all public holidays. For WSR2, define another day type selection rule so that employee is not eligible for public holidays. (Refer Public Holiday Calendar and Work Schedule Rules)
Then define a counting rule where you configure as below:
Ensure that Day type selected is "work according to daily work schedule". Also, ensure that the counting class selected is 1 and 2. Select public holiday class as blank and 1.
Also, define the other parameters as required.
This will ensure that for one set of employees, quota deduction will not count for public holidays and for another set of employees, it will count.
Thanks and regards,
Vivek Barnwal