From bee3b97ebd80eb0a96702823d5d142bcb4cb5fac Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期二, 10 九月 2024 17:54:27 +0800
Subject: [PATCH] 修复一些问题
---
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def | 7 +-
_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl | 10 +-
_Main/BL/Type_ShiftPlan/Method_GetHolidayOvertimeHour#0.qbl | 47 +++++++++++++++
_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def | 7 +-
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl | 8 +-
_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl | 27 +++++----
_Main/BL/Type_ShiftPlan/Method_GetBreakDayOvertimeHour.qbl | 27 +++++---
_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl | 8 --
_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def | 2
9 files changed, 98 insertions(+), 45 deletions(-)
diff --git a/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl b/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl
index 12fbb19..bcb080d 100644
--- a/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl
+++ b/_Main/BL/Type_EmployeeCost/StaticMethod_Export.qbl
@@ -11,8 +11,8 @@
columnXML1 := "<column><name>浜哄憳绫诲埆</name><type>String</type>";
columnXML2 := "<column><name>浜烘暟</name><type>Number</type>";
columnXML3 := "<column><name>浜х嚎</name><type>String</type>";
- columnXML4 := "<column><name>寮�濮嬫椂闂�</name><type>String</type>";
- columnXML5 := "<column><name>鏃堕棿鍗曚綅</name><type>String</type>";
+ //columnXML4 := "<column><name>寮�濮嬫椂闂�</name><type>String</type>";
+ //columnXML5 := "<column><name>鏃堕棿鍗曚綅</name><type>String</type>";
columnXML6 := "<column><name>鍩烘湰宸ヨ祫</name><type>Number</type>";
costs := selectsortedset( owner,Elements.EmployeeCost,cost,cost.Unit().Name() );
@@ -27,11 +27,11 @@
columnXML1 := columnXML1 + "</column>";
columnXML2 := columnXML2 + "</column>";
columnXML3 := columnXML3 + "</column>";
- columnXML4 := columnXML4 + "</column>";
- columnXML5 := columnXML5 + "</column>";
+ //columnXML4 := columnXML4 + "</column>";
+ //columnXML5 := columnXML5 + "</column>";
columnXML6 := columnXML6 + "</column>";
- xmlTemplate := xmlTemplate + columnXML1 + columnXML2 + columnXML3 + columnXML4 + columnXML5 + columnXML6 + "</table>";
+ xmlTemplate := xmlTemplate + columnXML1 + columnXML2 + columnXML3 + columnXML6 + "</table>";
tableGroupHandle := TableGroupHandle::Create( "tableGroupHandle" );
tableHandle := TableHandle::ImportXML( BinaryValue::Construct( xmlTemplate ));
tableGroupHandle.Add( tableHandle );
diff --git a/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl b/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl
index c81d400..f0abc2f 100644
--- a/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl
+++ b/_Main/BL/Type_EmployeeCost/StaticMethod_Import.qbl
@@ -27,8 +27,6 @@
employeeType := null( EmployeeType );
employeeNumber := 0;
unit := null( Unit );
- startDate := Date::MinDate();
- timeUnit := "";
baseSalary := 0.0;
traverse( row,GeneralExcelImportAndExportDataCell,cell ){
if( cell.GeneralExcelImportAndExportDataColumn().Name() = "浜哄憳绫诲埆" ){
@@ -59,12 +57,6 @@
unitIndexTree.Root().AddChild( unitHandle,units.Size() - 1 );
}
}
- }
- if( cell.GeneralExcelImportAndExportDataColumn().Name() = "寮�濮嬫椂闂�" ){
- startDate := cnv2.Convert( cell.Value() );
- }
- if( cell.GeneralExcelImportAndExportDataColumn().Name() = "鏃堕棿鍗曚綅" ){
- timeUnit := cell.Value();
}
if( cell.GeneralExcelImportAndExportDataColumn().Name() = "鍩烘湰宸ヨ祫" ){
baseSalary := [Real]cell.Value();
diff --git a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
index a33d7b0..3b61ec5 100644
--- a/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
+++ b/_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateStandardHoursReport.qbl
@@ -88,15 +88,16 @@
workingDayCell.RealValue( workingDayCell.RealValue() + 1 );
if( shiftPlan.IsHoliday() ){
// 鑺傚亣鏃ュ姞鐝�
- overtime := shiftPlan.GetBreakDayOvertimeHour( false );
+ overtime := shiftPlan.GetHolidayOvertimeHour( false );
holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + overtime );
if( not isnull( nextShiftPlan )){
- nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
if( nextShiftPlan.IsHoliday()){
// 涓嬩竴澶╂槸鑺傚亣鏃�
+ nextDayOvertime := shiftPlan.GetHolidayOvertimeHour( true );
holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + nextDayOvertime );
}else if( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) ){
// 涓嬩竴澶╂槸鍛ㄥ叚鎴栧懆鏃�
+ nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + nextDayOvertime );
}else{
// 涓嬩竴澶╂槸骞冲父鐨勫伐浣滄棩
@@ -109,12 +110,13 @@
overtime := shiftPlan.GetBreakDayOvertimeHour( false );
breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + overtime );
if( not isnull( nextShiftPlan )){
- nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
if( nextShiftPlan.IsHoliday()){
// 涓嬩竴澶╂槸鑺傚亣鏃�
+ nextDayOvertime := shiftPlan.GetHolidayOvertimeHour( true );
holidayOvertimeHourCell.RealValue( holidayOvertimeHourCell.RealValue() + nextDayOvertime );
}else if( shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄥ叚" ) or shiftPlan.DefaultRemark().LikeUserLocale( "鍛ㄦ棩" ) ){
// 涓嬩竴澶╂槸鍛ㄥ叚鎴栧懆鏃�
+ nextDayOvertime := shiftPlan.GetBreakDayOvertimeHour( true );
breakDayOvertimeHourCell.RealValue( breakDayOvertimeHourCell.RealValue() + nextDayOvertime );
}else{
// 涓嬩竴澶╂槸骞冲父鐨勫伐浣滄棩
diff --git a/_Main/BL/Type_ShiftPlan/Method_GetBreakDayOvertimeHour.qbl b/_Main/BL/Type_ShiftPlan/Method_GetBreakDayOvertimeHour.qbl
index 55d6b6b..9eae64e 100644
--- a/_Main/BL/Type_ShiftPlan/Method_GetBreakDayOvertimeHour.qbl
+++ b/_Main/BL/Type_ShiftPlan/Method_GetBreakDayOvertimeHour.qbl
@@ -7,28 +7,33 @@
TextBody:
[*
// Akari Sep-6-2024 (created)
+ //褰撳ぉ鐨勫姞鐝椂闀�
overtime := 0.0;
+ //褰撳ぉ瑕佺畻鍦ㄦ槑澶╃殑鍔犵彮鏃堕暱
nextDayOvertime := 0.0;
if( this.Outcome() = "1" ){
- overtime := 0;
+ overtime := 8.0;
nextDayOvertime := 0.0;
}else if( this.Outcome() = "2" ){
- overtime := 0;
+ overtime := 16.0;
nextDayOvertime := 0.0;
}else if(this.Outcome() = "9+9"){
- overtime := 1;
- nextDayOvertime := 1;
+ overtime := 18.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "10+10"){
- overtime := 2;
- nextDayOvertime := 2;
+ overtime := 20.0;
+ nextDayOvertime := 0.0;
+ }else if(this.Outcome() = "11+11"){
+ overtime := 22.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "1(9)" or this.Outcome() = "1锛�9锛�"){
- overtime := 1;
- nextDayOvertime := 0;
+ overtime := 9.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "1(10)" or this.Outcome() = "1锛�10锛�"){
- overtime := 2;
- nextDayOvertime := 0;
+ overtime := 10.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "3"){
- overtime := 0;
+ overtime := 22.5;
nextDayOvertime := 0;
}
result := 0.0;
diff --git a/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl b/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl
index ab6d8ac..d561c56 100644
--- a/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl
+++ b/_Main/BL/Type_ShiftPlan/Method_GetDefaultDayOvertimeHour.qbl
@@ -10,26 +10,29 @@
overtime := 0.0;
nextDayOvertime := 0.0;
if( this.Outcome() = "1" ){
- overtime := 0;
+ overtime := 0.0;
nextDayOvertime := 0.0;
}else if( this.Outcome() = "2" ){
- overtime := 0;
+ overtime := 0.0;
nextDayOvertime := 0.0;
}else if(this.Outcome() = "9+9"){
- overtime := 1;
- nextDayOvertime := 1;
+ overtime := 2.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "10+10"){
- overtime := 2;
- nextDayOvertime := 2;
+ overtime := 4.0;
+ nextDayOvertime := 0.0;
+ }else if(this.Outcome() = "11+11"){
+ overtime := 6.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "1(9)" or this.Outcome() = "1锛�9锛�"){
- overtime := 1;
- nextDayOvertime := 0;
+ overtime := 1.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "1(10)" or this.Outcome() = "1锛�10锛�"){
- overtime := 2;
- nextDayOvertime := 0;
+ overtime := 2.0;
+ nextDayOvertime := 0.0;
}else if(this.Outcome() = "3"){
- overtime := 0;
- nextDayOvertime := 0;
+ overtime := 0.0;
+ nextDayOvertime := 0.0;
}
result := 0.0;
if( isGetNextDay ){
diff --git "a/_Main/BL/Type_ShiftPlan/Method_GetHolidayOvertimeHour\0430.qbl" "b/_Main/BL/Type_ShiftPlan/Method_GetHolidayOvertimeHour\0430.qbl"
new file mode 100644
index 0000000..625537f
--- /dev/null
+++ "b/_Main/BL/Type_ShiftPlan/Method_GetHolidayOvertimeHour\0430.qbl"
@@ -0,0 +1,47 @@
+Quintiq file version 2.0
+#parent: #root
+Method GetHolidayOvertimeHour (
+ Boolean isGetNextDay
+) const declarative remote as Real
+{
+ TextBody:
+ [*
+ // Akari Sep-6-2024 (created)
+ //褰撳ぉ鐨勫姞鐝椂闀�
+ overtime := 0.0;
+ //褰撳ぉ瑕佺畻鍦ㄦ槑澶╃殑鍔犵彮鏃堕暱
+ nextDayOvertime := 0.0;
+ if( this.Outcome() = "1" ){
+ overtime := 8.0;
+ nextDayOvertime := 0.0;
+ }else if( this.Outcome() = "2" ){
+ overtime := 15.0;
+ nextDayOvertime := 1.0;
+ }else if(this.Outcome() = "9+9"){
+ overtime := 16.0;
+ nextDayOvertime := 2.0;
+ }else if(this.Outcome() = "10+10"){
+ overtime := 17.0;
+ nextDayOvertime := 3.0;
+ }else if(this.Outcome() = "11+11"){
+ overtime := 18.0;
+ nextDayOvertime := 4.0;
+ }else if(this.Outcome() = "1(9)" or this.Outcome() = "1锛�9锛�"){
+ overtime := 9.0;
+ nextDayOvertime := 0.0;
+ }else if(this.Outcome() = "1(10)" or this.Outcome() = "1锛�10锛�"){
+ overtime := 10.0;
+ nextDayOvertime := 0.0;
+ }else if(this.Outcome() = "3"){
+ overtime := 15.0;
+ nextDayOvertime := 7.5;
+ }
+ result := 0.0;
+ if( isGetNextDay ){
+ result := nextDayOvertime;
+ }else{
+ result := overtime;
+ }
+ return result;
+ *]
+}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def
index 494c839..1e2010b 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_DialogEditEmployeeCost/Method_New.def
@@ -14,5 +14,7 @@
cbUnit.Checked( true );
ApplicationMacroPlanner.ShowFormModal( this );
+
+ this.Title( "Create" );
*]
}
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
index e3c760f..31a0f50 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionBudget_dhBaseVersionBudget_OnDataChanged.def
@@ -11,10 +11,11 @@
Body:
[*
if( not isnull( this.Data())){
- if( this.Data().Name().LikeUserLocale( "M" )){
- dhDateUnitBudget.Data( "M" );
+ name := this.Data().Name().ReplaceAll( "VWED","vwed" );
+ if( name.LikeUserLocale( "W" )){
+ dhDateUnitBudget.Data( "W" );
}else{
- dhDateUnitBudget.Data( "W" );
+ dhDateUnitBudget.Data( "M" );
}
}
*]
diff --git a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
index 9a1bc55..dd59c3a 100644
--- a/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
+++ b/_Main/UI/MacroPlannerWebApp/Component_FormDemandComparison/Response_pSelectionPP_dhBaseVersionPP_OnDataChanged.def
@@ -10,10 +10,11 @@
Body:
[*
if( not isnull( this.Data())){
- if( this.Data().Name().LikeUserLocale( "M" )){
- dhDateUnitPP.Data( "M" );
+ name := this.Data().Name().ReplaceAll( "VWED","vwed" );
+ if( name.LikeUserLocale( "W" )){
+ dhDateUnitPP.Data( "W" );
}else{
- dhDateUnitPP.Data( "W" );
+ dhDateUnitPP.Data( "M" );
}
}
*]
--
Gitblit v1.9.3