private void AddReport(ref List <clsT_OPR_LIS_APP_REPORT_VO> lstReports, string unitId) { ApplyUnitDetail detail = m_dicApplyUnitDetail[unitId]; clsReportGroup_VO objReportGroupVO = detail.ReportGroup; bool isExist = false; string reportGroupId = objReportGroupVO.strReportGroupID; foreach (clsT_OPR_LIS_APP_REPORT_VO report in lstReports) { if (report.m_strREPORT_GROUP_ID_CHR == reportGroupId) { isExist = true; break; } } if (!isExist) { clsT_OPR_LIS_APP_REPORT_VO reportVO = new clsT_OPR_LIS_APP_REPORT_VO(); reportVO.m_strREPORT_GROUP_ID_CHR = reportGroupId; //初始化状态 reportVO.m_intSTATUS_INT = 1; lstReports.Add(reportVO); } }
public long m_lngAddReportGroupAndDetail(ref clsReportGroup_VO objReportGroupVO, ref clsReportGroupDetail_VO[] objReportGroupDetailVOList) { long lngRes = 0; com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc objCheckGroupSvc = (com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType( typeof(com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc)); lngRes = objCheckGroupSvc.m_lngAddReportGroupAndDetail(objPrincipal, ref objReportGroupVO, ref objReportGroupDetailVOList); objCheckGroupSvc.Dispose(); return(lngRes); }
private void ConstructReportGroupVO(System.Data.DataRow objRow, ref clsReportGroup_VO objReportGroupVO) { objReportGroupVO.strReportGroupID = objRow["REPORT_GROUP_ID_CHR"].ToString().Trim(); objReportGroupVO.strReportGroupName = objRow["REPORT_GROUP_NAME_VCHR"].ToString().Trim(); objReportGroupVO.strPYCode = objRow["PY_CODE_CHR"].ToString().Trim(); objReportGroupVO.strPrintTitle = objRow["PRINT_TITLE_VCHR"].ToString().Trim(); objReportGroupVO.strWBCode = objRow["WB_CODE_CHR"].ToString().Trim(); objReportGroupVO.strAssistCode01 = objRow["ASSIST_CODE01_CHR"].ToString().Trim(); objReportGroupVO.strAssistCode02 = objRow["ASSIST_CODE02_CHR"].ToString().Trim(); objReportGroupVO.strPrintCategoryID = objRow["PRINT_CATEGORY_ID_CHR"].ToString().Trim(); }
public long m_lngGetReportGroupVOByReportGroupID(string p_strReportGroupID, out clsReportGroup_VO p_objReportGroupVO) { long lngRes = 0; com.digitalwave.iCare.middletier.LIS.clsQueryReportGroupSvc objReportGroupSvc = (com.digitalwave.iCare.middletier.LIS.clsQueryReportGroupSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType( typeof(com.digitalwave.iCare.middletier.LIS.clsQueryReportGroupSvc)); lngRes = objReportGroupSvc.m_lngGetReportGroupVOByReportGroupID(objPrincipal, p_strReportGroupID, out p_objReportGroupVO); // objReportGroupSvc.Dispose(); return(lngRes); }
/// <summary> /// 创建申请单的报告组【3】 /// </summary> private void m_mthGenerateAppReports() { clsAppSampleGroupCollection objSampleGroups = m_objGenerateAppSampleGroups(); foreach (clsLIS_AppSampleGroup objAppSampleGroup in objSampleGroups) { bool blnAppReportGroupExist = false; clsReportGroup_VO objReportGroupVO = null; long lngRes = clsReportGroupSmp.s_obj.m_lngGetReportGoupVO(objAppSampleGroup.m_ObjDataVO.m_strSAMPLE_GROUP_ID_CHR, out objReportGroupVO); if (lngRes > 0 && objReportGroupVO != null) { objAppSampleGroup.m_ObjDataVO.m_strREPORT_GROUP_ID_CHR = objReportGroupVO.strReportGroupID; foreach (clsLIS_AppCheckItem objAppCheckItem in objAppSampleGroup.m_ObjAppCheckItems) { objAppCheckItem.m_ObjDataVO.m_strREPORT_GROUP_ID_CHR = objReportGroupVO.strReportGroupID; } foreach (clsLIS_AppCheckReport objAppCheckReport in this.m_objAppReports) { if (objAppCheckReport.m_ObjCheckReport.m_ObjDataVO.strReportGroupID == objReportGroupVO.strReportGroupID) { objAppCheckReport.m_ObjAppSampleGroups.Add(objAppSampleGroup); System.Collections.ArrayList arlSGID = new System.Collections.ArrayList(); if (objAppCheckReport.m_ObjDataVO.m_strSampleGroupIDArr != null) { arlSGID.AddRange(objAppCheckReport.m_ObjDataVO.m_strSampleGroupIDArr); } arlSGID.Add(objAppSampleGroup.m_StrSampleGroupID); objAppCheckReport.m_ObjDataVO.m_strSampleGroupIDArr = (string[])arlSGID.ToArray(typeof(string)); blnAppReportGroupExist = true; break; } } if (!blnAppReportGroupExist) { clsLIS_CheckReport objCheckReport = new clsLIS_CheckReport(); objCheckReport.m_ObjDataVO = objReportGroupVO; clsT_OPR_LIS_APP_REPORT_VO objAppReportVO = new clsT_OPR_LIS_APP_REPORT_VO(); clsLIS_AppCheckReport objAppReport = new clsLIS_AppCheckReport(objAppReportVO); objAppReport.m_ObjCheckReport = objCheckReport; objAppReport.m_StrReportGroupID = objCheckReport.m_ObjDataVO.strReportGroupID; objAppReport.m_ObjAppSampleGroups.Add(objAppSampleGroup); objAppReport.m_ObjDataVO.m_strSampleGroupIDArr = new string[] { objAppSampleGroup.m_StrSampleGroupID }; objAppReport.m_IntStatus = 1; m_objAppReports.Add(objAppReport); } } } }
/// <summary> /// 根据检验标本组ID得到它所在报告组的VO及打印顺序 /// </summary> /// <param name="sampleGroupId">检验标本组ID</param> /// <param name="reportGroupVO">报告组的VO</param> /// <returns></returns> public long m_lngGetReportGoupVO(string sampleGroupId, out clsReportGroup_VO reportGroupVO) { long lngRes = 0; reportGroupVO = null; try { lngRes = objSvc.m_lngGetReportGoupVOBySampleGroupID(objPrincipal, sampleGroupId, out reportGroupVO); } catch { lngRes = 0; } return(lngRes); }
public static ApplyUnitDetail GetApplyUnitDetail(string unitId) { // new clsLogText().LogError(string.Format("申请单元ID为({0})!",unitId)); long lngRes = 0; string message; clsApplUnit_VO applyUnitVO = null; lngRes = clsApplyUnitSmp.s_obj.m_lngGetApplyUnitVO(unitId, out applyUnitVO); if (lngRes == 0 || applyUnitVO == null) { message = string.Format("申请单元ID为({0})的申请单元不存在或者为空!", unitId); throw new LisCreateApplyException(message); } string unitName = applyUnitVO.strApplUnitName; clsSampleGroup_VO sampleGroup = null; lngRes = clsSampleGroupSmp.s_obj.m_lngGetSampleGoupVO(unitId, out sampleGroup); if (lngRes == 0 || sampleGroup == null) { message = string.Format("申请单元ID为({0})({1})下的标本组不存在或者为空!", unitId, unitName); throw new LisCreateApplyException(message); } clsCheckItem_VO[] items = null; lngRes = clsCheckItemSmp.s_obj.m_lngGetCheckItem(unitId, out items); if (lngRes == 0 || items == null) { message = string.Format("申请单元ID为({0})({1})下的检验项目不存在或者为空!", unitId, unitName); throw new LisCreateApplyException(message); } clsReportGroup_VO reportGroup = null; lngRes = clsReportGroupSmp.s_obj.m_lngGetReportGoupVO(sampleGroup.strSampleGroupID, out reportGroup); if (lngRes == 0 || reportGroup == null) { message = string.Format("申请单元ID为({0})({1})下的报告组不存在或者为空!", unitId, unitName); throw new LisCreateApplyException(message); } return(new ApplyUnitDetail(unitId, applyUnitVO, sampleGroup, reportGroup, items)); }
public long m_lngGetReportGoupVOBySampleGroupID(System.Security.Principal.IPrincipal p_objPrincipal, string p_strSampleGroupID, out clsReportGroup_VO p_objReportGroupVO) { long lngRes = 0; p_objReportGroupVO = null; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsReportGroupSvc", "m_lngGetReportGoupVOBySampleGroupID"); if (lngRes < 0) { return(-1); } string strSQL = @"SELECT t1.* FROM t_aid_lis_report_group t1,t_aid_lis_report_group_detail t2 WHERE t1.report_group_id_chr = t2.report_group_id_chr AND t2.sample_group_id_chr = '" + p_strSampleGroupID + "'"; DataTable dtbRet = null; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbRet); objHRPSvc.Dispose(); if (lngRes > 0 && dtbRet != null) { if (dtbRet.Rows.Count > 0) { p_objReportGroupVO = new clsReportGroup_VO(); ConstructReportGroupVO(dtbRet.Rows[0], ref p_objReportGroupVO); } } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); //要在LogError方法中抛出异常。 } return(lngRes); }
public long m_lngGetAllReportGroup(System.Security.Principal.IPrincipal p_objPrincipal, ref clsReportGroup_VO[] objReportGroupList) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngGetAllReportGroup"); if (lngRes < 0) { return(-1); } string strSQL = @"SELECT * FROM T_AID_LIS_REPORT_GROUP ORDER BY REPORT_GROUP_ID_CHR"; DataTable dtbReportGroup = null; objReportGroupList = null; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbReportGroup); objHRPSvc.Dispose(); if (lngRes > 0 && dtbReportGroup != null) { if (dtbReportGroup.Rows.Count > 0) { objReportGroupList = new clsReportGroup_VO[dtbReportGroup.Rows.Count]; for (int i = 0; i < dtbReportGroup.Rows.Count; i++) { objReportGroupList[i] = new clsReportGroup_VO(); ConstructReportGroupVO(dtbReportGroup.Rows[i], ref objReportGroupList[i]); m_lngGetReportGroupDetail(p_objPrincipal, objReportGroupList[i].strReportGroupID, ref objReportGroupList[i].objSampleGroupVO); } } } } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public ApplyUnitDetail(string unitId, clsApplUnit_VO applyUnit, clsSampleGroup_VO sampleGroup, clsReportGroup_VO reportGroup, clsCheckItem_VO[] items) { this.unitId = unitId; this.applyUnit = applyUnit; this.sampleGroup = sampleGroup; this.reportGroup = reportGroup; this.items = items; }
public long m_lngAddReportGroup(System.Security.Principal.IPrincipal p_objPrincipal, ref clsReportGroup_VO objReportGroupVO) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngAddReportGroup"); if (lngRes < 0) { return(-1); } string strSQL = @"INSERT INTO t_aid_lis_report_group (report_group_id_chr, report_group_name_vchr, py_code_chr, print_title_vchr, wb_code_chr, assist_code01_chr, assist_code02_chr, print_category_id_chr ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)" ; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); System.Data.IDataParameter[] objReportGroupArr = null; objHRPSvc.CreateDatabaseParameter(8, out objReportGroupArr); if (objReportGroupVO.strReportGroupID == null) { objReportGroupVO.strReportGroupID = objHRPSvc.m_strGetNewID("t_aid_lis_report_group", "REPORT_GROUP_ID_CHR", 6); } objReportGroupArr[0].Value = objReportGroupVO.strReportGroupID; objReportGroupArr[1].Value = objReportGroupVO.strReportGroupName; objReportGroupArr[2].Value = objReportGroupVO.strPYCode; objReportGroupArr[3].Value = objReportGroupVO.strPrintTitle; objReportGroupArr[4].Value = objReportGroupVO.strWBCode; objReportGroupArr[5].Value = objReportGroupVO.strAssistCode01; objReportGroupArr[6].Value = objReportGroupVO.strAssistCode02; objReportGroupArr[7].Value = objReportGroupVO.strPrintCategoryID; long lngRecEff = -1; lngRes = objHRPSvc.lngExecuteParameterSQL(strSQL, ref lngRecEff, objReportGroupArr); objHRPSvc.Dispose(); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngModifyReportGroup(System.Security.Principal.IPrincipal p_objPrincipal, ref clsReportGroup_VO objReportGroupVO) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngModifyReportGroup"); if (lngRes < 0) { return(-1); } string strSQL = @"UPDATE t_aid_lis_report_group SET report_group_name_vchr = '" + objReportGroupVO.strReportGroupName + @"', py_code_chr = '" + objReportGroupVO.strPYCode + @"', print_title_vchr = '" + objReportGroupVO.strPrintTitle + @"', wb_code_chr = '" + objReportGroupVO.strWBCode + @"', assist_code01_chr = '" + objReportGroupVO.strAssistCode01 + @"', assist_code02_chr = '" + objReportGroupVO.strAssistCode02 + @"', print_category_id_chr = '" + objReportGroupVO.strPrintCategoryID + @"' WHERE report_group_id_chr = '" + objReportGroupVO.strReportGroupID + @"'"; try { com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService(); lngRes = objHRPSvc.DoExcute(strSQL); objHRPSvc.Dispose(); } catch (Exception objEx) { com.digitalwave.Utility.clsLogText objLogger = new clsLogText(); bool blnRes = objLogger.LogError(objEx); } return(lngRes); }
public long m_lngAddReportGroupAndDetail(System.Security.Principal.IPrincipal p_objPrincipal, ref clsReportGroup_VO objReportGroupVO, ref clsReportGroupDetail_VO[] objReportGroupDetailVO)//,clsSampleGroup_VO[] p_objSampleGroupArr) { long lngRes = 0; clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService(); lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsCheckGroupSvc", "m_lngAddReportGroupDetail"); if (lngRes < 0) { return(-1); } if (objReportGroupVO.strReportGroupID == null) { lngRes = m_lngAddReportGroup(p_objPrincipal, ref objReportGroupVO); } else { lngRes = m_lngModifyReportGroup(p_objPrincipal, ref objReportGroupVO); // if(lngRes > 0) // { // for(int i=0;i<p_objSampleGroupArr.Length;i++) // { // if(lngRes > 0) // { // lngRes = m_lngSetSampleGroupPrintOrder(p_objPrincipal,p_objSampleGroupArr[i]); // } // } // } } if (lngRes > 0) { lngRes = m_lngDelReportGroupDetail(p_objPrincipal, objReportGroupVO.strReportGroupID); if (lngRes > 0) { for (int i = 0; i < objReportGroupDetailVO.Length; i++) { objReportGroupDetailVO[i].strReportGroupID = objReportGroupVO.strReportGroupID; lngRes = m_lngAddReportGroupDetail(p_objPrincipal, ref objReportGroupDetailVO[i]); } } } return(lngRes); }