public HttpResponseMessage UpdatePayRollDetai(ProjectMaster projectMaster) { if (projectMaster.Id == Guid.Empty) { return(toJson(null, OperatingState.Failure, "Id不能为空")); } var obj = _projectMaster.GetProjectMasterById(projectMaster.Id); if (projectMaster.ProjectSource == null) { projectMaster.ProjectSource = obj.ProjectSource; } if (projectMaster.BuildProjectCode == null) { projectMaster.BuildProjectCode = obj.BuildProjectCode; } if (projectMaster.StartDate == null) { projectMaster.StartDate = obj.StartDate; } if (projectMaster.CompleteDate == null) { projectMaster.CompleteDate = obj.CompleteDate; } if (projectMaster.ProjectCode == null) { projectMaster.ProjectCode = obj.ProjectCode; } if (projectMaster.ContractorOrgCode == null) { projectMaster.ContractorOrgCode = obj.ContractorOrgCode; } if (projectMaster.ProjectName == null) { projectMaster.ProjectName = obj.ProjectName; } if (projectMaster.ProjectActivityType == null) { projectMaster.ProjectActivityType = obj.ProjectActivityType; } if (projectMaster.ProjectDescription == null) { projectMaster.ProjectDescription = obj.ProjectDescription; } var result = _projectMaster.UpdateProjectMaster(projectMaster); if (result) { return(toJson(null, OperatingState.Success, "修改成功")); } return(toJson(null, OperatingState.Failure, "修改失败")); }