Selaa lähdekoodia

日服申请排序

wangh 1 vuosi sitten
vanhempi
commit
5fd4bb7332

+ 60 - 0
DAL/DailyFeePaymentService.cs

@@ -24,6 +24,26 @@ namespace DAL
             return ServiceBase<DailyFeePayment>.excuteSql(new DailyFeePayment(), "DailyFeePayment", sql, CommandType.Text, param);
         }
 
+        /// <summary>
+        /// 查询所有Desc
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="param">可变参数数组</param>
+        /// <returns>返回集合</returns>
+        List<DailyFeePaymentDesc> excuteSqlDesc(string sql, params SqlParameter[] param)
+        {
+            return ServiceBase<DailyFeePaymentDesc>.excuteSql(new DailyFeePaymentDesc(), "DailyFeePaymentDesc", sql, CommandType.Text, param);
+        }
+        /// <summary>
+        /// 查询所有Count
+        /// </summary>
+        /// <param name="sql">sql语句</param>
+        /// <param name="param">可变参数数组</param>
+        /// <returns>返回集合</returns>
+        List<CountData> excuteSqlCount(string sql, params SqlParameter[] param)
+        {
+            return ServiceBase<CountData>.excuteSql(new CountData(), "CountData", sql, CommandType.Text, param);
+        }
         /// <summary>
         /// 获取单个对象
         /// </summary>
@@ -82,7 +102,47 @@ namespace DAL
 
             return PageBase<DailyFeePayment>.excutePageSql(new DailyFeePayment(), "DailyFeePayment", "DailyFeePayment", "*", "OperatorDate desc", sqlwhere, 10, pageIndex, out sumPage, out totalRecord);
         }
+        /// <summary>
+        /// 获取全部 - 分页
+        /// </summary>
+        /// <returns></returns>
+        public List<DailyFeePaymentDesc> GetDailyFeePaymentDesc(int pageIndex, out int sumPage, out int totalRecord, int audit, int auditGM, int auditRM, string instructions, string UniversiadePriceType, int operators, string idCard)
+        {
+            string sqlwhere = "where  IsDel = 0 and Instructions like '%" + instructions + "%'";
+
+            if (operators != 0)
+            {
+                sqlwhere += " and Operator = " + operators;
+            }
+            if (idCard == "2")
+                sqlwhere += " and FAudit = 1 and MAudit = " + auditGM;
+            if (idCard == "3" || idCard == "")
+                sqlwhere += " and FAudit = " + audit + " and MAudit = " + auditGM;
+            if (idCard == "4")
+                sqlwhere += " and (PriceType=288 or PriceType = 301 or operator=" + operators + ") and RAudit=" + auditRM;
 
+            if ((idCard == "2" || idCard == "3") && UniversiadePriceType == "741")
+                sqlwhere = sqlwhere + "and PriceType IN (select Id from setdata where STID = 55)";
+            else if ((idCard == "2" || idCard == "3") && UniversiadePriceType != "--未选择--" && !string.IsNullOrEmpty(UniversiadePriceType.ToString()))
+                sqlwhere = sqlwhere + "and PriceType IN (" + Convert.ToInt32(UniversiadePriceType) + ")";
+
+            int startIndex = (pageIndex - 1) * 10 + 1;
+            int endIndex = startIndex + 10 - 1;
+            string sql = string.Format(@"Select * From (Select row_number() over (order by OperatorDate) as RowNumber,* From DailyFeePayment {0}) 
+                                        temp Where RowNumber Between {1} and {2}", sqlwhere, startIndex, endIndex);
+
+
+            string CountSql = string.Format(@"Select COUNT(1) as Count From (Select * From DailyFeePayment {0}) temp", sqlwhere);
+            List<CountData> CountList= excuteSqlCount(CountSql);
+            float totalPage = (float)CountList[0].Count / 10;//总页数
+            if (totalPage == 0) totalPage = 1;
+            else totalPage = (int)Math.Ceiling((double)totalPage);
+            sumPage = Convert.ToInt32(totalPage);
+            totalRecord = CountList[0].Count;
+
+
+            return excuteSqlDesc(sql);
+        }
         /// <summary>
         /// 获取全部 - 不分页
         /// </summary>

+ 25 - 0
DAL/ServiceBase.cs

@@ -802,6 +802,31 @@ namespace DAL
                                 (t as DailyFeePayment).RAuditDate = dr["RAuditDate"].ToString();
                                 (t as DailyFeePayment).AuditOperator = Convert.ToInt32(dr["AuditOperator"]);
                                 break;
+                            case "DailyFeePaymentDesc":
+                                (t as DailyFeePaymentDesc).Id = Convert.ToInt32(dr["Id"]);
+                                (t as DailyFeePaymentDesc).Instructions = dr["Instructions"].ToString();
+                                (t as DailyFeePaymentDesc).SumPrice = float.Parse(dr["SumPrice"].ToString());
+                                (t as DailyFeePaymentDesc).Operators = Convert.ToInt32(dr["Operator"]);
+                                (t as DailyFeePaymentDesc).OperatorsDate = dr["OperatorDate"].ToString();
+                                (t as DailyFeePaymentDesc).FAudit = Convert.ToInt32(dr["FAudit"]);
+                                (t as DailyFeePaymentDesc).FAuditDate = dr["FAuditDate"].ToString();
+                                (t as DailyFeePaymentDesc).MAudit = Convert.ToInt32(dr["MAudit"]);
+                                (t as DailyFeePaymentDesc).MAuditDate = dr["MAuditDate"].ToString();
+                                (t as DailyFeePaymentDesc).Reason = dr["Reason"].ToString();
+                                (t as DailyFeePaymentDesc).IsDel = Convert.ToInt32(dr["IsDel"]);
+                                (t as DailyFeePaymentDesc).IsPay = Convert.ToInt32(dr["IsPay"]);
+                                (t as DailyFeePaymentDesc).OrbitalPrivateTransfer = Convert.ToInt32(dr["OrbitalPrivateTransfer"]);
+                                (t as DailyFeePaymentDesc).PriceType = Convert.ToInt32(dr["PriceType"]);
+                                (t as DailyFeePaymentDesc).CId = Convert.ToInt32(dr["CId"]);
+                                (t as DailyFeePaymentDesc).CName = dr["CName"].ToString();
+                                (t as DailyFeePaymentDesc).RAudit = Convert.ToInt32(dr["RAudit"]);
+                                (t as DailyFeePaymentDesc).RAuditDate = dr["RAuditDate"].ToString();
+                                (t as DailyFeePaymentDesc).AuditOperator = Convert.ToInt32(dr["AuditOperator"]);
+                                (t as DailyFeePaymentDesc).RowNumber = Convert.ToInt32(dr["RowNumber"]);
+                                break;
+                            case "CountData":
+                                (t as CountData).Count = Convert.ToInt32(dr["Count"]);
+                                break;
                             case "DailyFeePaymentContent":
                                 (t as DailyFeePaymentContent).Id = Convert.ToInt32(dr["Id"]);
                                 (t as DailyFeePaymentContent).DFPID = Convert.ToInt32(dr["DFPID"]);

+ 2 - 0
Models/Models.csproj

@@ -90,8 +90,10 @@
     <Compile Include="CheckBoxs.cs" />
     <Compile Include="Commission.cs" />
     <Compile Include="CostTypeHotelNumber.cs" />
+    <Compile Include="Count.cs" />
     <Compile Include="Country_FeeCost.cs" />
     <Compile Include="CreditCardBilInfo.cs" />
+    <Compile Include="DailyFeePaymentDesc.cs" />
     <Compile Include="DeleClientNeeds.cs" />
     <Compile Include="DelegationInfoOrFeeCost.cs" />
     <Compile Include="ErrorCode.cs" />

+ 32 - 25
OA2021/DepartmentPage/AccountingDepartmentPage2.aspx

@@ -57,50 +57,50 @@
                 <br />
                 <asp:AjaxScriptManager ID="AjaxScriptManager1" runat="server"></asp:AjaxScriptManager>
                 <div class="ps">
-                <table class="ps" cellpadding="0" cellspacing="0" border="0" style="width: 100%">
-                    <tr>
-                        <td style="width: 65%;">财务审核:
+                    <table class="ps" cellpadding="0" cellspacing="0" border="0" style="width: 100%">
+                        <tr>
+                            <td style="width: 65%;">财务审核:
                         <asp:DropDownList ID="ddlAudit" runat="server" AutoPostBack="true"
                             OnTextChanged="ddlAudit_TextChanged">
                             <asp:ListItem Text="未审核" Value="0" />
                             <asp:ListItem Text="已通过" Value="1" />
                             <asp:ListItem Text="未通过" Value="2" />
                         </asp:DropDownList>
-                            总经理审核:
+                                总经理审核:
                         <asp:DropDownList ID="ddlAuditGM" runat="server" AutoPostBack="true"
                             OnTextChanged="ddlAuditGM_TextChanged">
                             <asp:ListItem Text="未审核" Value="0" />
                             <asp:ListItem Text="已通过" Value="1" />
                             <asp:ListItem Text="未通过" Value="2" />
                         </asp:DropDownList>
-                            <asp:Label runat="server" ID="RAuditLabel">人事审核:</asp:Label>
-                            <asp:DropDownList ID="ddlAuditRM" runat="server" AutoPostBack="true"
-                                OnTextChanged="ddlAuditRM_TextChanged">
-                                <asp:ListItem Text="未审核" Value="0" />
-                                <asp:ListItem Text="已通过" Value="1" />
-                                <asp:ListItem Text="未通过" Value="2" />
-                            </asp:DropDownList>
-                            申请说明:<asp:TextBox ID="txtInstructions" runat="server" Style="border: 1px solid #b3b3b3; width: 150px" />
-                            申请人:<asp:TextBox ID="txtOPer" runat="server" Style="border: 1px solid #b3b3b3; width: 50px" />&nbsp;
+                                <asp:Label runat="server" ID="RAuditLabel">人事审核:</asp:Label>
+                                <asp:DropDownList ID="ddlAuditRM" runat="server" AutoPostBack="true"
+                                    OnTextChanged="ddlAuditRM_TextChanged">
+                                    <asp:ListItem Text="未审核" Value="0" />
+                                    <asp:ListItem Text="已通过" Value="1" />
+                                    <asp:ListItem Text="未通过" Value="2" />
+                                </asp:DropDownList>
+                                申请说明:<asp:TextBox ID="txtInstructions" runat="server" Style="border: 1px solid #b3b3b3; width: 150px" />
+                                申请人:<asp:TextBox ID="txtOPer" runat="server" Style="border: 1px solid #b3b3b3; width: 50px" />&nbsp;
                             <asp:Button ID="btnSelect" runat="server" Text="查 询" CssClass="btn" Style="width: 45px;"
-                                OnClick="btnSelect_Click" />
-                        </td>
-                        <td style="width: 35%; text-align: right;">
-                            <asp:DropDownList runat="server" ID="ddlUniversiade" Style="width: 100px"
-                                OnTextChanged="ddlUniversiade_TextChanged" AutoPostBack="true">
-                            </asp:DropDownList>
-                            ||
+                                OnClick="btnSelect_Click1" />
+                            </td>
+                            <td style="width: 35%; text-align: right;">
+                                <asp:DropDownList runat="server" ID="ddlUniversiade" Style="width: 100px"
+                                    OnTextChanged="ddlUniversiade_TextChanged" AutoPostBack="true">
+                                </asp:DropDownList>
+                                ||
                             <asp:Button ID="btnUniversiade" runat="server" Text="导出费用" CssClass="btn" Style="width: 75px;"
                                 OnClick="btnUniversiade_Click" />
-                            ||
+                                ||
                             <asp:Button ID="btnManyDown" runat="server" Text="批量生成" CssClass="btn" Style="width: 65px;"
                                 OnClick="btnManyDown_Click" />
-                            ||
+                                ||
                             <asp:Button ID="btnAdd" runat="server" Text="新增数据" CssClass="btn" Style="width: 65px;"
                                 OnClick="btnAdd_Click" />
-                        </td>
-                    </tr>
-                </table>
+                            </td>
+                        </tr>
+                    </table>
                 </div>
                 <div class="list">
                     <table class="list" cellpadding="0" cellspacing="0" border="0">
@@ -109,6 +109,7 @@
                             <td class="td">公司 </td>
                             <td class="td" style="width: 200px;">费用说明 </td>
                             <td class="td">合 计 </td>
+                            <td class="td">是否付款 </td>
                             <td class="td"><a runat="server" style="color: white;" id="AMan">申请人</a> </td>
                             <td class="td">申请时间 </td>
                             <td class="td">财务审核 </td>
@@ -131,6 +132,11 @@
                                     <td class="td">
                                         <%#Eval("SumPrice").ToString()%>RMB
                                     </td>
+                                    <td class="td">
+                                        <asp:Label ID="lblIsPayVal" runat="server" Text='<%#Eval("IsPay") %>' Visible="false" />
+                                        <asp:Label ID="lblIsPay" runat="server" />
+
+                                    </td>
                                     <td class="td">
                                         <asp:Label ID="lblOperatorsVal" runat="server" Visible="false" Text='<%#Eval("Operators") %>' />
                                         <asp:Label ID="lblOperators" runat="server" />
@@ -138,6 +144,7 @@
                                     <td class="td">
                                         <%#Convert.ToDateTime(Eval("OperatorsDate")).ToString("yyyy-MM-dd hh:mm:ss")%>
                                     </td>
+
                                     <td class="td">
                                         <asp:Label ID="lblFAuditVal" runat="server" Text='<%#Eval("FAudit") %>' Visible="false" />
                                         <asp:Label ID="lblFAudit" runat="server" />

+ 21 - 2
OA2021/DepartmentPage/AccountingDepartmentPage2.aspx.cs

@@ -109,12 +109,13 @@ namespace OA2014.DepartmentPage
                 }
                 //分页设置
                 int pageIndex = pageControl.getPageIndex();
-                dtResult = dfps.GetDailyFeePayment(pageIndex, out sumPage, out totalRecord, Convert.ToInt32(ddlAudit.SelectedValue),
+                List<DailyFeePaymentDesc> dtResult = new List<DailyFeePaymentDesc>();
+                dtResult = dfps.GetDailyFeePaymentDesc(pageIndex, out sumPage, out totalRecord, Convert.ToInt32(ddlAudit.SelectedValue),
                                                   Convert.ToInt32(ddlAuditGM.SelectedValue), Convert.ToInt32(ddlAuditRM.SelectedValue),
                                                   txtInstructions.Text, ddlUniversiade.SelectedValue, operators, idCard);
                 if (dtResult != null && dtResult.Count > 0)
                 {
-                    dt = ListToDataTable<DailyFeePayment>(dtResult);
+                    dt = ListToDataTable<DailyFeePaymentDesc>(dtResult);
                     Session["dtResult"] = dt;
                 }
                 if (UserId == 22)
@@ -281,6 +282,11 @@ namespace OA2014.DepartmentPage
             if (maudit == "2")
                 (e.Item.FindControl("lblMAudit") as Label).Text = "未通过";
 
+            string lblIsPayVal = (e.Item.FindControl("lblIsPayVal") as Label).Text;
+            if (lblIsPayVal == "0")
+                (e.Item.FindControl("lblIsPay") as Label).Text = "未付款";
+            if (lblIsPayVal == "1")
+                (e.Item.FindControl("lblIsPay") as Label).Text = "已付款";
 
             int id = Convert.ToInt32((e.Item.FindControl("lblAuditOperator") as Label).Text);
             if (id == 0)
@@ -871,5 +877,18 @@ namespace OA2014.DepartmentPage
                     + "&priceType=" + ddlUniversiade.SelectedValue);
             }
         }
+
+        protected void btnSelect_Click1(object sender, EventArgs e)
+        {
+            if (txtOPer.Text != "" && !string.IsNullOrEmpty(txtOPer.Text))
+            {
+                Users u = new UsersService().GetUsersByName(txtOPer.Text);
+                Response.Redirect("../DepartmentPage/AccountingDepartmentPage2.aspx?Page=1&instructions=" + txtInstructions.Text + "&audit=" + ddlAudit.SelectedValue + "&auditGM=" + ddlAuditGM.SelectedValue + "&OPer=" + u.Id);
+            }
+            else
+            {
+                Response.Redirect("../DepartmentPage/AccountingDepartmentPage2.aspx?Page=1&instructions=" + txtInstructions.Text + "&audit=" + ddlAudit.SelectedValue + "&auditGM=" + ddlAuditGM.SelectedValue);
+            }
+        }
     }
 }

+ 5 - 5
OA2021/finance/dailyFeePayment.aspx.cs

@@ -104,14 +104,14 @@ namespace OA2014.finance
 
                 //分页设置
                 int pageIndex = pageControl.getPageIndex();
-
-                dtResult = dfps.GetDailyFeePayment(pageIndex, out sumPage, out totalRecord, Convert.ToInt32(ddlAudit.SelectedValue),
+                List<DailyFeePaymentDesc> dtResult = new List<DailyFeePaymentDesc>();
+                dtResult = dfps.GetDailyFeePaymentDesc(pageIndex, out sumPage, out totalRecord, Convert.ToInt32(ddlAudit.SelectedValue),
                                                   Convert.ToInt32(ddlAuditGM.SelectedValue), Convert.ToInt32(ddlAuditRM.SelectedValue),
                                                   txtInstructions.Text, ddlUniversiade.SelectedValue, operators, idCard);
 
                 if (dtResult != null && dtResult.Count > 0)
                 {
-                    dt = ListToDataTable<DailyFeePayment>(dtResult);
+                    dt = ListToDataTable<DailyFeePaymentDesc>(dtResult);
                     Session["dtResult"] = dt;
                 }
 
@@ -290,9 +290,9 @@ namespace OA2014.finance
                 (e.Item.FindControl("lblMAudit") as Label).Text = "未通过";
 
             string lblIsPayVal = (e.Item.FindControl("lblIsPayVal") as Label).Text;
-            if (maudit == "0")
+            if (lblIsPayVal == "0")
                 (e.Item.FindControl("lblIsPay") as Label).Text = "未付款";
-            if (maudit == "1")
+            if (lblIsPayVal == "1")
                 (e.Item.FindControl("lblIsPay") as Label).Text = "已付款";
 
             int id = Convert.ToInt32((e.Item.FindControl("lblAuditOperator") as Label).Text);