/// <summary> /// 加簽關卡 /// </summary> public CommonViewModel.Result addCustomActivity(string processSerialNumber, string activityID, string refActId, NaNaProcessViewModel.AddActivityParameter param) { CommonViewModel.Result ret = new CommonViewModel.Result(); XmlDocument defXML = this.getAddCustomAcivityXML(param); UtilitySvc.writeLog(defXML.OuterXml); this.plmSvc.addCustomParallelAndSerialActivity(processSerialNumber, activityID, refActId, defXML.OuterXml); return(ret.setResultValue(true, "200", string.Empty, string.Empty)); }
/// <summary> /// 驗證拋入參數 /// </summary> /// <returns></returns> private CommonViewModel.Result validateCreateProcessParam() { CommonViewModel.Result ret = new CommonViewModel.Result(); //填單人工號是否存在 if (string.IsNullOrEmpty(this.createParam.issuerId)) { return(ret.setResultValue(false, "301", "填單人工號不能為空值", string.Empty)); } if (!string.IsNullOrEmpty(this.createParam.applyerId) && this.createParam.issuerId != this.createParam.applyerId) { return(ret.setResultValue(false, "301", "若申請人有填寫則須與填單人工號相同", string.Empty)); } //評鑑人員是否存在 if (string.IsNullOrEmpty(this.createParam.evaluationEmpId)) { return(ret.setResultValue(false, "301", "評鑑人員工號不能為空值", string.Empty)); } //受評人相關 //是否存在於 HCP this.hcpEvaEmpInfoList = this.newEmpEvaDao.getHCPInfoByEmpId(this.createParam.evaluationEmpId); if (this.hcpEvaEmpInfoList.Count == 0) { return(ret.setResultValue(false, "302", "於HCP中查無受評人資料", string.Empty)); } //是否存在於 EP this.evaEmpInfoList = this.newEmpEvaDao.getEmpInfoByID(this.createParam.evaluationEmpId); if (this.evaEmpInfoList.Count == 0) { return(ret.setResultValue(false, "303", "於EP中查無受評人資料", string.Empty)); } //起單人相關 this.issuerEmpInfoList = this.newEmpEvaDao.getEmpInfoByID(this.createParam.issuerId); if (this.issuerEmpInfoList.Count == 0) { return(ret.setResultValue(false, "304", "於EP中查無填單人資料", string.Empty)); } //流程是否正在進行中 if (this.newEmpEvaDao.isProcessing(this.createParam.evaluationEmpId)) { ret.success = false; ret.resultCode = "306"; ret.resultMessage = "此評核人員正在評鑑中"; return(ret); } //是否是已開過的流程 if (this.newEmpEvaDao.isProcessComplete(this.createParam.evaluationEmpId)) { ret.success = false; ret.resultCode = "307"; ret.resultMessage = "此評核人員已評鑑過"; return(ret); } ret.success = true; ret.resultCode = "200"; return(ret); }