/// <summary> /// 取得估驗單資料 /// </summary> public ContractModels getEstimationOrder(string formId) { ContractModels c = new ContractModels(); //3.取得估驗單資料 c.planEST = getForm(formId); //1.取得專案資料 c.project = getProjectById(c.planEST.PROJECT_ID); //2.合約資料 PurchaseFormService s = new PurchaseFormService(); s.getInqueryForm(c.planEST.CONTRACT_ID); c.supContract = s.formInquiry; c.supContractItems = s.formInquiryItem; c.contractPaymentTerms = getPaymentTerm(c.planEST.CONTRACT_ID, formId);//付款條件 //4.取得估驗明細資料 c.EstimationItems = getItems(c.planEST.EST_FORM_ID); //5.取得供應商資料 c.supplier = getSupplierInfo(c.planEST.PAYEE); //5.1 取得憑證資料 c.EstimationInvoices = getEstimationInvoice(c.planEST.EST_FORM_ID); //6.取得代付支出 c.EstimationHoldPayments = getHoldPayment(formId); //7.取得代扣支出 c.Hold4DeductForm = getPaymentTransfer(formId); //8.取得任務清單 Flow4EstimationForm wkservice = new Flow4EstimationForm(); wkservice.getTask(formId); c.task = wkservice.task.task; return(c); }
//主系統、次系統、九宮格第一階選單 public static Dictionary <string, object> getMapItemQueryCriteria(string id) { Dictionary <string, object> selectComponent = new Dictionary <string, object>(); List <SelectListItem> selectMain = new List <SelectListItem>(); PurchaseFormService service = new PurchaseFormService(); foreach (string itm in service.getSystemMain(id)) { log.Debug("Main System=" + itm); SelectListItem selectI = new SelectListItem(); selectI.Value = itm; selectI.Text = itm; if (null != itm && "" != itm) { selectMain.Add(selectI); } } selectComponent.Add("SystemMain", selectMain); //取得次系統資料 List <SelectListItem> selectSub = new List <SelectListItem>(); foreach (string itm in service.getSystemSub(id)) { log.Debug("Sub System=" + itm); SelectListItem selectI = new SelectListItem(); selectI.Value = itm; selectI.Text = itm; if (null != itm && "" != itm) { selectSub.Add(selectI); } } //selectSub.Add(empty); selectComponent.Add("SystemSub", selectSub); TypeManageService typeService = new TypeManageService(); List <REF_TYPE_MAIN> lstType1 = typeService.getTypeMainL1(); //取得九宮格 List <SelectListItem> selectType1 = new List <SelectListItem>(); for (int idx = 0; idx < lstType1.Count; idx++) { log.Debug("REF_TYPE_MAIN=" + idx + "," + lstType1[idx].CODE_1_DESC); SelectListItem selectI = new SelectListItem(); selectI.Value = lstType1[idx].TYPE_CODE_1; selectI.Text = lstType1[idx].CODE_1_DESC; selectType1.Add(selectI); } selectComponent.Add("TypeCodeL1", selectType1); return(selectComponent); }
public void getCostControlInfo(string projectId) { log.Debug("get Cost Controll Info By ProjectId=" + projectId); //專案基本資料 CostInfo.Project = getProject(projectId); //1.合約金額與追加減項目 CostInfo.Revenue = getPlanRevenueById(projectId); //1.1 異動單彙整資料 CostInfo.lstCostChangeEvent = getCostChangeEvnet(projectId); //2.直接成本:材料與工資 PurchaseFormService pfservice = new PurchaseFormService(); CostInfo.lstDirectCostItem = pfservice.getPlanContract(projectId); CostInfo.lstDirectCostItem.AddRange(pfservice.getPlanContract4Wage(projectId)); //3.間接成本 CostInfo.lstIndirectCostItem = getIndirectCost(); }