@@ -69,6 +69,9 @@ open class Project : BaseEntity<Long>() { | |||||
@Column(name = "totalManhour") | @Column(name = "totalManhour") | ||||
open var totalManhour: Double? = null | open var totalManhour: Double? = null | ||||
@Column(name = "ratePerManhour") | |||||
open var ratePerManhour: Double? = null | |||||
@OneToMany(mappedBy = "project", cascade = [CascadeType.ALL], orphanRemoval = true) | @OneToMany(mappedBy = "project", cascade = [CascadeType.ALL], orphanRemoval = true) | ||||
open var gradeAllocations: MutableSet<GradeAllocation> = mutableSetOf() | open var gradeAllocations: MutableSet<GradeAllocation> = mutableSetOf() | ||||
@@ -227,6 +227,7 @@ open class ProjectsService( | |||||
expectedTotalFee = request.expectedProjectFee | expectedTotalFee = request.expectedProjectFee | ||||
subContractFee = request.subContractFee | subContractFee = request.subContractFee | ||||
totalManhour = request.totalManhour | totalManhour = request.totalManhour | ||||
ratePerManhour = request.ratePerManhour | |||||
actualStart = request.projectActualStart | actualStart = request.projectActualStart | ||||
actualEnd = request.projectActualEnd | actualEnd = request.projectActualEnd | ||||
status = if (this.status == "Deleted" || this.deleted == true) "Deleted" | status = if (this.status == "Deleted" || this.deleted == true) "Deleted" | ||||
@@ -729,6 +730,7 @@ open class ProjectsService( | |||||
expectedProjectFee = row.getCell(9).numericCellValue, | expectedProjectFee = row.getCell(9).numericCellValue, | ||||
subContractFee = null, | subContractFee = null, | ||||
totalManhour = row.getCell(11).numericCellValue, | totalManhour = row.getCell(11).numericCellValue, | ||||
ratePerManhour = 250.0, | |||||
locationId = 1, // HK | locationId = 1, // HK | ||||
buildingTypeIds = mutableListOf(buildingType!!.id!!), | buildingTypeIds = mutableListOf(buildingType!!.id!!), | ||||
workNatureIds = mutableListOf(workNature!!.id!!), | workNatureIds = mutableListOf(workNature!!.id!!), | ||||
@@ -41,6 +41,7 @@ data class NewProjectRequest( | |||||
val manhourPercentageByGrade: Map<Long, Double>, | val manhourPercentageByGrade: Map<Long, Double>, | ||||
val taskGroups: Map<Long, TaskGroupAllocation>, | val taskGroups: Map<Long, TaskGroupAllocation>, | ||||
val allocatedStaffIds: List<Long>, | val allocatedStaffIds: List<Long>, | ||||
val ratePerManhour: Double, | |||||
// Milestones | // Milestones | ||||
val milestones: Map<Long, Milestone>, | val milestones: Map<Long, Milestone>, | ||||
@@ -0,0 +1,5 @@ | |||||
-- liquibase formatted sql | |||||
-- changeset cyril:project | |||||
ALTER TABLE `project` | |||||
ADD COLUMN `ratePerManhour` DOUBLE NULL DEFAULT NULL AFTER `totalManhour`; |