private static ConstructPlanItem getConstructPackageItem(this HttpRequest request, IDatabase database)
        {
            var id = request.GetInt("id");
            if (id.HasValue)
                return database.ConstructPlanItems.GetByID(id.Value);

            var packageItem = new ConstructPlanItem();
            return packageItem;
        }
 /// <summary>
 /// 根据建设计划条目取得建设计划包
 /// </summary>
 /// <param name="request"></param>
 /// <param name="database"></param>
 /// <param name="constructPlanItem"></param>
 /// <returns></returns>
 public static ConstructPlanPackage GetPackageByItem(this HttpRequest request, IDatabase database, ConstructPlanItem constructPlanItem)
 {
     var package = database.ConstructPlanPackages.SingleOrDefault(cp => cp == constructPlanItem.ConstructPlanPackage);
     return package;
 }
 /// <summary>
 /// 删除建设计划条目时,调整计划包控制总额
 /// </summary>
 /// <param name="request"></param>
 /// <param name="package"></param>
 /// <param name="packageItem"></param>
 /// <returns></returns>
 public static long? GetControlerDescendAmount(this HttpRequest request, ConstructPlanPackage package, ConstructPlanItem packageItem)
 {
     return package.ControllerAmount - packageItem.BudgetAmount;
 }
Beispiel #4
0
        /// <summary>
        /// 处理调整后明细,加入新条目。
        /// </summary>
        /// <param name="stage"></param>
        /// <param name="beforeAdjustDetail"></param>
        /// <param name="afterString"></param>
        /// <param name="Database"></param>
        private void processAfterAdjustDetail(Ipms.Server.Business.Adjusts.Adjust adjust, int stage, BeforeAdjustDetail beforeAdjustDetail, string afterString, Server.DataAccess.Database Database)
        {
            var afterItems = afterString.Split(new string[] { "#" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (var afterItem in afterItems)
            {
                var afterDetails = afterItem.Split(new string[] { "," }, StringSplitOptions.None);
                if (afterDetails.Count() != 2)
                    throw new Exception("调整后条目参数不正确!");
                else
                {
                    //设备
                    var device = Database.ApplyDevices.SingleOrDefault(c => c.ID.ToString() == afterDetails[0].Trim());
                    //设备数目
                    var amount = Convert.ToInt32(afterDetails[1].Trim());
                    //新建调整后条目
                    var afterAdjustDetail = new AfterAdjustDetail();
                    afterAdjustDetail.Adjust = adjust;
                    //新建申购条目
                    MemberApplyItem memberApplyItem = new MemberApplyItem();
                    memberApplyItem.IsAfterAdjust = true;
                    memberApplyItem.IsBeforeAdjust = false;
                    memberApplyItem.MemberApply = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.MemberApply;
                    memberApplyItem.ApplyDevice = device;
                    memberApplyItem.LogicDevice = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.LogicDevice;
                    memberApplyItem.CurrentState = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.CurrentState;
                    memberApplyItem.Quantity = amount;
                    memberApplyItem.Rank = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.Rank;
                    memberApplyItem.Applicant = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.Applicant;
                    memberApplyItem.ApplicantName = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.ApplicantName;
                    memberApplyItem.PhoneNumber = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.PhoneNumber;
                    memberApplyItem.Email = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.Email;
                    memberApplyItem.ModifyTime = System.DateTime.Now;
                    // memberApplyItem.ModifyBy = User;
                    memberApplyItem.Link_url = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.Link_url;
                    memberApplyItem.IconCls = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.IconCls;
                    MemberApplyItemStatic newstatic = new MemberApplyItemStatic();
                    newstatic.Save(Database);
                    memberApplyItem.MemberApplyItemStatic = newstatic;
                    memberApplyItem.Save(Database);

                    //新建建设计划条目
                    ConstructPlanItem constructPlanItem = new ConstructPlanItem();
                    constructPlanItem.MemberApplyItem = memberApplyItem;
                    var DeviceNumberString = "TZ" + beforeAdjustDetail.ConstructPlanItem.DeviceNumber + adjust.Count.ToString();
                    adjust.Count++;
                    adjust.Save(Database);
                    while (Database.ConstructPlanItems.SingleOrDefault(c => c.DeviceNumber == DeviceNumberString) != null)
                    {
                        DeviceNumberString = DeviceNumberString.Substring(0, DeviceNumberString.Length - 2) + (Convert.ToInt16(DeviceNumberString.Substring(DeviceNumberString.Length - 2, 2)) + 1).ToString("00");
                    }

                    constructPlanItem.DeviceNumber = DeviceNumberString;
                    constructPlanItem.ConstructPlanPackage = beforeAdjustDetail.ConstructPlanItem.ConstructPlanPackage;
                    //预算金额默认为申购单价乘以数量,规则待定
                    constructPlanItem.BudgetAmount = beforeAdjustDetail.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * amount;
                    constructPlanItem.IsBeforeAdjust = false;
                    constructPlanItem.IsAfterAdjust = true;
                    constructPlanItem.Save(Database);

                    afterAdjustDetail.ConstructPlanItem = constructPlanItem;

                    //建设任务之后的阶段时,新建建设任务
                    if (stage > 0)
                    {
                        ConstructTaskItem constructTaskItem = new ConstructTaskItem();
                        constructTaskItem.Quantity = amount;
                        constructTaskItem.ConstructTask = beforeAdjustDetail.ConstructTaskItem.ConstructTask;
                        constructTaskItem.ConstructTask.IsSend = false;
                        constructTaskItem.ConstructPlanItem = constructPlanItem;
                        constructTaskItem.IsPurchasePlanItem = false;
                        constructTaskItem.IsBeforeAdjust = false;
                        constructTaskItem.IsAfterAdjust = true;
                        constructTaskItem.Save(Database);
                        afterAdjustDetail.ConstructTaskItem = constructTaskItem;

                        ////采购计划之后的阶段时,新建采购计划
                        //if (stage > 1)
                        //{
                        //    var purchasePlanItem = new PurchasePlanItem();
                        //    purchasePlanItem.PurchasePlanPackage = beforeAdjustDetail.PurchasePlanItem.PurchasePlanPackage;
                        //    purchasePlanItem.ConstructTaskItem = constructTaskItem;
                        //    //成员是否确认,默认未确认。可修改
                        //    purchasePlanItem.IsAffirm = false;
                        //    purchasePlanItem.IsBeforeAdjust = false;
                        //    purchasePlanItem.IsAfterAdjust = true;
                        //    purchasePlanItem.Save(Database);
                        //    afterAdjustDetail.PurchasePlanItem = purchasePlanItem;
                        //    //采购计划之后的阶段时,新建采购计划
                        //    if (stage > 2)
                        //    {
                        //        //流标的条目下达采购指令
                        //        var purchaseOrderItem = new PurchaseOrderItem();
                        //        purchaseOrderItem.PurchasePlanItem = purchasePlanItem;
                        //        purchaseOrderItem.IsAfterAdjust = true;
                        //        purchaseOrderItem.PurchaseOrderPackage = Database.PurchaseOrderPackages.SingleOrDefault(c => c.PurchasePlanPackage == beforeAdjustDetail.PurchasePlanItem.PurchasePlanPackage);
                        //        purchaseOrderItem.Save(Database);
                        //    }
                        //}

                    }
                    afterAdjustDetail.Save(Database);
                }
            }
        }
Beispiel #5
0
        /*
        因考虑到审核,该方法不可逆,所以该方法已经不用,分裂成两个方法。
        /// <summary>
        /// 处理调整前已存在记录(标记为已调整,处理受影响的建设计划条目),返回一条调整前记录
        /// </summary>
        /// <param name="stage"></param>
        /// <param name="beforeAdjustDetailList"></param>
        /// <param name="Database"></param>
        /// <returns></returns>
        private void processBeforeAdjustDetail(int stage, List<BeforeAdjustDetail> beforeAdjustDetailList, Server.DataAccess.Database Database)
        {
            if (stage != 3)
                foreach (var item in beforeAdjustDetailList)
                {
                    if (stage == 0)
                    {
                        //标记申购条目与建设计划条目为已调整
                        item.ConstructPlanItem.IsBeforeAdjust = true;
                        item.ConstructPlanItem.Save(Database);
                        item.ConstructPlanItem.MemberApplyItem.IsBeforeAdjust = true;
                        item.ConstructPlanItem.MemberApplyItem.Save(Database);

                        //对与建设计划阶段,如果建设计划条目已有下达的任务,为这部分任务单独生成一条建设计划条目与申购条目,使下达的任务指向它。
                        if (item.ConstructPlanItem.GetAllocatedCount(Database) > 0)
                        {
                            MemberApplyItem memberApplyItem = new MemberApplyItem();
                            memberApplyItem.IsAfterAdjust = true;
                            memberApplyItem.IsBeforeAdjust = false;
                            memberApplyItem.MemberApply = item.ConstructPlanItem.MemberApplyItem.MemberApply;
                            memberApplyItem.ApplyDevice = item.ConstructPlanItem.MemberApplyItem.ApplyDevice;
                            memberApplyItem.LogicDevice = item.ConstructPlanItem.MemberApplyItem.LogicDevice;
                            memberApplyItem.CurrentState = item.ConstructPlanItem.MemberApplyItem.CurrentState;
                            memberApplyItem.Quantity = item.ConstructPlanItem.GetAllocatedCount(Database);
                            memberApplyItem.Rank = item.ConstructPlanItem.MemberApplyItem.Rank;
                            memberApplyItem.Applicant = item.ConstructPlanItem.MemberApplyItem.Applicant;
                            memberApplyItem.ApplicantName = item.ConstructPlanItem.MemberApplyItem.ApplicantName;
                            memberApplyItem.PhoneNumber = item.ConstructPlanItem.MemberApplyItem.PhoneNumber;
                            memberApplyItem.Email = item.ConstructPlanItem.MemberApplyItem.Email;
                            memberApplyItem.ModifyTime = System.DateTime.Now;
                            memberApplyItem.ModifyBy = User;
                            memberApplyItem.Link_url = item.ConstructPlanItem.MemberApplyItem.Link_url;
                            memberApplyItem.IconCls = item.ConstructPlanItem.MemberApplyItem.IconCls;
                            memberApplyItem.Save(Database);

                            ConstructPlanItem constructPlanItem = new ConstructPlanItem();
                            constructPlanItem.MemberApplyItem = memberApplyItem;
                            constructPlanItem.DeviceNumber = item.ConstructPlanItem.DeviceNumber;
                            constructPlanItem.ConstructPlanPackage = item.ConstructPlanItem.ConstructPlanPackage;
                            constructPlanItem.BudgetAmount = item.ConstructPlanItem.BudgetAmount;
                            constructPlanItem.IsBeforeAdjust = false;
                            //这里需要注意,本条是调整时所影响的记录,不是直接调整的对象,也标记为是调整后条目。
                            constructPlanItem.IsAfterAdjust = true;
                            constructPlanItem.Save(Database);

                            var constructTaskItemList = Database.ConstructTaskItems.Where(c => c.ConstructPlanItem == item.ConstructPlanItem);
                            foreach (var cti in constructTaskItemList)
                            {
                                cti.ConstructPlanItem = constructPlanItem;
                                cti.Save(Database);
                            }
                        }
                    }
                    if (stage == 1 || stage == 2)
                    {
                        item.ConstructTaskItem.IsBeforeAdjust = true;
                        item.ConstructTaskItem.IsAfterAdjust = false;
                        item.ConstructTaskItem.Save(Database);
                        item.ConstructTaskItem.ConstructPlanItem.IsBeforeAdjust = true;
                        item.ConstructTaskItem.ConstructPlanItem.IsAfterAdjust = false;
                        item.ConstructTaskItem.ConstructPlanItem.Save(Database);
                        item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.IsBeforeAdjust = true;
                        item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.IsAfterAdjust = false;
                        item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Save(Database);
                        //对与建设任务与采购计划阶段,如果对应建设任务数目不等于申购总数,说明申购可能存在其他未下达的设备或者其他建设任务,需要新建一条申购。
                        //如果对应建设任务数目不等于申购已下达建设任务数目,说明存在其他建设任务,为这部分任务单独生成一条建设计划条目与申购条目,使下达的任务指向它。
                        if (item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity != item.ConstructTaskItem.Quantity)
                        {

                            MemberApplyItem memberApplyItem = new MemberApplyItem();
                            memberApplyItem.IsAfterAdjust = true;
                            memberApplyItem.IsBeforeAdjust = false;
                            memberApplyItem.MemberApply = item.ConstructPlanItem.MemberApplyItem.MemberApply;
                            memberApplyItem.ApplyDevice = item.ConstructPlanItem.MemberApplyItem.ApplyDevice;
                            memberApplyItem.LogicDevice = item.ConstructPlanItem.MemberApplyItem.LogicDevice;
                            memberApplyItem.CurrentState = item.ConstructPlanItem.MemberApplyItem.CurrentState;

                            memberApplyItem.Quantity = item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity - item.ConstructTaskItem.Quantity;
                            memberApplyItem.Rank = item.ConstructPlanItem.MemberApplyItem.Rank;
                            memberApplyItem.Applicant = item.ConstructPlanItem.MemberApplyItem.Applicant;
                            memberApplyItem.ApplicantName = item.ConstructPlanItem.MemberApplyItem.ApplicantName;
                            memberApplyItem.PhoneNumber = item.ConstructPlanItem.MemberApplyItem.PhoneNumber;
                            memberApplyItem.Email = item.ConstructPlanItem.MemberApplyItem.Email;
                            memberApplyItem.ModifyTime = System.DateTime.Now;
                            memberApplyItem.ModifyBy = User;
                            memberApplyItem.Link_url = item.ConstructPlanItem.MemberApplyItem.Link_url;
                            memberApplyItem.IconCls = item.ConstructPlanItem.MemberApplyItem.IconCls;
                            memberApplyItem.Save(Database);

                            ConstructPlanItem constructPlanItem = new ConstructPlanItem();
                            constructPlanItem.MemberApplyItem = memberApplyItem;
                            constructPlanItem.DeviceNumber = item.ConstructPlanItem.DeviceNumber;
                            constructPlanItem.ConstructPlanPackage = item.ConstructPlanItem.ConstructPlanPackage;

                            constructPlanItem.BudgetAmount = Convert.ToInt32(item.ConstructPlanItem.BudgetAmount * ((item.ConstructTaskItem.Quantity * 1.0) / item.ConstructPlanItem.MemberApplyItem.Quantity));

                            constructPlanItem.IsBeforeAdjust = false;
                            //这里需要注意,本条是调整时所影响的记录,不是直接调整的对象,也标记为是调整后条目。
                            constructPlanItem.IsAfterAdjust = true;
                            constructPlanItem.Save(Database);

                            var constructTaskItemList = Database.ConstructTaskItems.Where(c => c.ConstructPlanItem == item.ConstructTaskItem.ConstructPlanItem && c != item.ConstructTaskItem);
                            foreach (var cti in constructTaskItemList)
                            {
                                cti.ConstructPlanItem = constructPlanItem;
                                cti.Save(Database);
                            }
                        }
                    }
                    if (stage == 2)
                    {
                        item.PurchasePlanItem.IsBeforeAdjust = true;
                        item.PurchasePlanItem.IsAfterAdjust = false;
                        item.PurchasePlanItem.Save(Database);
                    }

                }
            //对于流标阶段,标记流标结果
            if (stage == 3)
                foreach (var item in beforeAdjustDetailList)
                {
                    item.BidFailedResultItem.IsBeforeAdjust = true;
                    item.BidFailedResultItem.Save(Database);
                }
        }
         * */
        /// <summary>
        /// 处理调整所影响的任务,为影响的任务新建申购与建设计划,让所影响的任务指向新生成的建设计划。
        /// </summary>
        /// <param name="stage"></param>
        /// <param name="beforeAdjustDetailList"></param>
        /// <param name="Database"></param>
        /// <returns></returns>
        private void createAdjustInfluencedItemsAndRedirectTaskToNewPlan(int stage, List<BeforeAdjustDetail> beforeAdjustDetailList, Server.DataAccess.Database Database)
        {
            if (stage != 3)
                foreach (var item in beforeAdjustDetailList)
                {
                    if (stage == 0)
                    {

                        //对与建设计划阶段,如果建设计划条目已有下达的任务,为这部分任务单独生成一条建设计划条目与申购条目,使下达的任务指向它。
                        if (item.ConstructPlanItem.GetAllocatedCount(Database) > 0)
                        {
                            MemberApplyItem memberApplyItem = new MemberApplyItem();
                            memberApplyItem.IsAfterAdjust = true;
                            memberApplyItem.IsBeforeAdjust = false;
                            memberApplyItem.MemberApply = item.ConstructPlanItem.MemberApplyItem.MemberApply;
                            memberApplyItem.ApplyDevice = item.ConstructPlanItem.MemberApplyItem.ApplyDevice;
                            memberApplyItem.LogicDevice = item.ConstructPlanItem.MemberApplyItem.LogicDevice;
                            memberApplyItem.CurrentState = item.ConstructPlanItem.MemberApplyItem.CurrentState;
                            memberApplyItem.Quantity = item.ConstructPlanItem.GetAllocatedCount(Database);
                            memberApplyItem.Rank = item.ConstructPlanItem.MemberApplyItem.Rank;
                            memberApplyItem.Applicant = item.ConstructPlanItem.MemberApplyItem.Applicant;
                            memberApplyItem.ApplicantName = item.ConstructPlanItem.MemberApplyItem.ApplicantName;
                            memberApplyItem.PhoneNumber = item.ConstructPlanItem.MemberApplyItem.PhoneNumber;
                            memberApplyItem.Email = item.ConstructPlanItem.MemberApplyItem.Email;
                            memberApplyItem.ModifyTime = System.DateTime.Now;
                            memberApplyItem.ModifyBy = User;
                            memberApplyItem.Link_url = item.ConstructPlanItem.MemberApplyItem.Link_url;
                            memberApplyItem.IconCls = item.ConstructPlanItem.MemberApplyItem.IconCls;
                            memberApplyItem.Save(Database);

                            ConstructPlanItem constructPlanItem = new ConstructPlanItem();
                            constructPlanItem.MemberApplyItem = memberApplyItem;
                            constructPlanItem.DeviceNumber = item.ConstructPlanItem.DeviceNumber;
                            constructPlanItem.ConstructPlanPackage = item.ConstructPlanItem.ConstructPlanPackage;
                            constructPlanItem.BudgetAmount = item.ConstructPlanItem.BudgetAmount;
                            constructPlanItem.IsBeforeAdjust = false;
                            //这里需要注意,本条是调整时所影响的记录,不是直接调整的对象,也标记为是调整后条目。
                            constructPlanItem.IsAfterAdjust = true;
                            constructPlanItem.Save(Database);

                            var constructTaskItemList = Database.ConstructTaskItems.Where(c => c.ConstructPlanItem == item.ConstructPlanItem);
                            foreach (var cti in constructTaskItemList)
                            {
                                cti.ConstructPlanItem = constructPlanItem;
                                cti.Save(Database);
                            }
                        }
                    }
                    if (stage == 1 || stage == 2)
                    {
                        item.ConstructTaskItem.IsBeforeAdjust = true;
                        item.ConstructTaskItem.IsAfterAdjust = false;
                        item.ConstructTaskItem.Save(Database);
                        item.ConstructTaskItem.ConstructPlanItem.IsBeforeAdjust = true;
                        item.ConstructTaskItem.ConstructPlanItem.IsAfterAdjust = false;
                        item.ConstructTaskItem.ConstructPlanItem.Save(Database);
                        item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.IsBeforeAdjust = true;
                        item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.IsAfterAdjust = false;
                        item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Save(Database);
                        //对与建设任务与采购计划阶段,如果对应建设任务数目不等于申购总数,说明申购可能存在其他未下达的设备或者其他建设任务,需要新建一条申购。
                        //如果对应建设任务数目不等于申购已下达建设任务数目,说明存在其他建设任务,为这部分任务单独生成一条建设计划条目与申购条目,使下达的任务指向它。
                        if (item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity != item.ConstructTaskItem.Quantity)
                        {

                            MemberApplyItem memberApplyItem = new MemberApplyItem();
                            memberApplyItem.IsAfterAdjust = true;
                            memberApplyItem.IsBeforeAdjust = false;
                            memberApplyItem.MemberApply = item.ConstructPlanItem.MemberApplyItem.MemberApply;
                            memberApplyItem.ApplyDevice = item.ConstructPlanItem.MemberApplyItem.ApplyDevice;
                            memberApplyItem.LogicDevice = item.ConstructPlanItem.MemberApplyItem.LogicDevice;
                            memberApplyItem.CurrentState = item.ConstructPlanItem.MemberApplyItem.CurrentState;

                            memberApplyItem.Quantity = item.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity - item.ConstructTaskItem.Quantity;
                            memberApplyItem.Rank = item.ConstructPlanItem.MemberApplyItem.Rank;
                            memberApplyItem.Applicant = item.ConstructPlanItem.MemberApplyItem.Applicant;
                            memberApplyItem.ApplicantName = item.ConstructPlanItem.MemberApplyItem.ApplicantName;
                            memberApplyItem.PhoneNumber = item.ConstructPlanItem.MemberApplyItem.PhoneNumber;
                            memberApplyItem.Email = item.ConstructPlanItem.MemberApplyItem.Email;
                            memberApplyItem.ModifyTime = System.DateTime.Now;
                            memberApplyItem.ModifyBy = User;
                            memberApplyItem.Link_url = item.ConstructPlanItem.MemberApplyItem.Link_url;
                            memberApplyItem.IconCls = item.ConstructPlanItem.MemberApplyItem.IconCls;
                            memberApplyItem.Save(Database);

                            ConstructPlanItem constructPlanItem = new ConstructPlanItem();
                            constructPlanItem.MemberApplyItem = memberApplyItem;
                            constructPlanItem.DeviceNumber = item.ConstructPlanItem.DeviceNumber;
                            constructPlanItem.ConstructPlanPackage = item.ConstructPlanItem.ConstructPlanPackage;

                            constructPlanItem.BudgetAmount = Convert.ToInt32(item.ConstructPlanItem.BudgetAmount * ((item.ConstructTaskItem.Quantity * 1.0) / item.ConstructPlanItem.MemberApplyItem.Quantity));

                            constructPlanItem.IsBeforeAdjust = false;
                            //这里需要注意,本条是调整时所影响的记录,不是直接调整的对象,也标记为是调整后条目。
                            constructPlanItem.IsAfterAdjust = true;
                            constructPlanItem.Save(Database);

                            var constructTaskItemList = Database.ConstructTaskItems.Where(c => c.ConstructPlanItem == item.ConstructTaskItem.ConstructPlanItem && c != item.ConstructTaskItem);
                            foreach (var cti in constructTaskItemList)
                            {
                                cti.ConstructPlanItem = constructPlanItem;
                                cti.Save(Database);
                            }
                        }
                    }

                }
        }
Beispiel #6
0
        /// <summary>
        /// XML序列化建设计划条目
        /// </summary>
        /// <param name="constructPlanItem"></param>
        /// <param name="Database"></param>
        private void showConstructPlanitem(ConstructPlanItem constructPlanItem, Server.DataAccess.Database Database)
        {
            Response.WriteTagBegin("Record");
            Response.WriteTagWithValue("ProjectID", constructPlanItem.MemberApplyItem.MemberApply.ProjectID);
            Response.WriteTagWithValue("ProjectName", constructPlanItem.MemberApplyItem.MemberApply.Project.ProjectName);
            Response.WriteTagWithValue("ConstructPlanItemID", constructPlanItem.ID);
            Response.WriteTagWithValue("ConstructPlanID", constructPlanItem.ConstructPlanPackageID);
            Response.WriteTagWithValue("PackageNumber", constructPlanItem.ConstructPlanPackage.PackageNumber);

            Response.WriteTagWithValue("ConstructTaskItemID", 0);
            Response.WriteTagWithValue("ConstructTaskNumber", "未下达建设任务");
            Response.WriteTagWithValue("ConstructTaskID", 0);

            Response.WriteTagWithValue("MemberApplyItemID", constructPlanItem.MemberApplyItemID);
            Response.WriteTagWithValue("ApplyDeviceID", constructPlanItem.MemberApplyItem.ApplyDeviceID);
            Response.WriteTagWithValue("DeviceNumber", constructPlanItem.DeviceNumber);
            Response.WriteTagWithValue("DeviceName", constructPlanItem.MemberApplyItem.ApplyDevice.DeviceName);
            Response.WriteTagWithValue("Price", constructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice);

            Response.WriteTagWithValue("Configuration", constructPlanItem.MemberApplyItem.ApplyDevice.Configuration);
            Response.WriteTagWithValue("MainSpec", constructPlanItem.MemberApplyItem.ApplyDevice.MainSpec);

            ////任务量
            //Response.WriteTagWithValue("DesendCount", 0);
            ////计划量
            //Response.WriteTagWithValue("Count", constructPlanItem.MemberApplyItem.Quantity);
            ////申购完成量
            //Response.WriteTagWithValue("CompleteCount", constructPlanItem.MemberApplyItem.GetCompleteAmount(Database));
            ////申购流标量
            //Response.WriteTagWithValue("FailCount", constructPlanItem.MemberApplyItem.GetFailAmount(Database));
            ////任务完成量
            //Response.WriteTagWithValue("TempCompleteCount", constructPlanItem.MemberApplyItem.GetCompleteAmount(Database));
            ////任务流标量
            //Response.WriteTagWithValue("TempFailCount", constructPlanItem.MemberApplyItem.GetFailAmount(Database));

            //任务量
            Response.WriteTagWithValue("DesendCount", 0);
            //计划量
            Response.WriteTagWithValue("Count", constructPlanItem.MemberApplyItem.Quantity);
            //申购完成量
            Response.WriteTagWithValue("CompleteCount", 0);
            //申购流标量
            Response.WriteTagWithValue("FailCount", 0);
            //任务完成量
            Response.WriteTagWithValue("TempCompleteCount", 0);
            //任务流标量
            Response.WriteTagWithValue("TempFailCount", 0);

            Response.WriteTagWithValue("CurrentStage", "已制定建设计划/未下达建设任务");
            //调整量
            Response.WriteTagWithValue("AdjustCount", constructPlanItem.MemberApplyItem.Quantity - constructPlanItem.GetAllocatedCount(Database));
            //调整金额
            Response.WriteTagWithValue("Cost", constructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * (constructPlanItem.MemberApplyItem.Quantity - constructPlanItem.GetAllocatedCount(Database)));
            Response.WriteTagEnd("Record");
        }