您的位置:首页 > 游戏 > 手游 > 自己做网站实时监控_郑州网站seo分析_seo评测论坛_推广代理公司

自己做网站实时监控_郑州网站seo分析_seo评测论坛_推广代理公司

2024/12/23 16:16:28 来源:https://blog.csdn.net/weixin_42132177/article/details/142954616  浏览:    关键词:自己做网站实时监控_郑州网站seo分析_seo评测论坛_推广代理公司
自己做网站实时监控_郑州网站seo分析_seo评测论坛_推广代理公司

目录

1、 CollageController

1.1、 查询客户接待单据信息

1.1.1、 //客户接待ID

1.1.2、 //客户来源名称

1.1.3、 //结算状态名称

  1. CollageController 

using QXQPS.Models;

using QXQPS.Vo;

using System;

using System.Collections;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

namespace QXQPS.Areas.MechanicsManagment.Controllers

{

    public class CollageController : Controller

    {

        // GET: MechanicsManagment/Collage

    1. 查询客户接待单据信息

        public ActionResult SelectReception(BsgridPage bsgridPage, string StartDate, string EndDate,string CollageState,string CarNum)//查询客户接待单据信息

        {

            var lingItem = (from tbReception in myModels.PW_Reception

                            join tbRepair in myModels.SYS_Repair on tbReception.RepairID equals tbRepair.RepairID

                            join tbDocumentState in myModels.SYS_DocumentState on tbReception.DocumentStateID equals tbDocumentState.DocumentStateID

                            join tbBalanceState in myModels.SYS_BalanceState on tbReception.BalanceStateID equals tbBalanceState.BalanceStateID

                            join tbCustomerSou in myModels.SYS_CustomerSou on tbReception.CustomerSouID equals tbCustomerSou.CustomerSouID

                            select new ReceptionVo

                            {

                                ReceptionID = tbReception.ReceptionID,

      1. //客户接待ID

                                RepairID = tbReception.RepairID,//修理类别ID

                                RepairName = tbRepair.RepairName.Trim(),//修理类别名称

                                CustomerSouID = tbReception.CustomerSouID,//客户来源ID

                                CustomerSou = tbCustomerSou.CustomerSou.Trim(),

      1. //客户来源名称

                                DocumentStateID = tbDocumentState.DocumentStateID,//单据状态ID

                                DocumentState = tbDocumentState.DocumentState.Trim(),//单据状态名称

                                BalanceStateID = tbBalanceState.BalanceStateID,//结算状态ID

                                BalanceState = tbBalanceState.BalanceState.Trim(),

      1. //结算状态名称

                                CarNum = tbReception.CarNum.Trim(),//车牌

                                VehicleType = tbReception.VehicleType.Trim(),//车型

                                Carder = tbReception.Carder.Trim(),//接车人名称

                                Mileage = tbReception.Mileage.Trim(),//进厂里程

                                MaintenanceNum = tbReception.MaintenanceNum.Trim(),//维修单号

                                Owner = tbReception.Owner.Trim(),//车主

                                Address = tbReception.Address.Trim(),//地址

                                OilQuantity = tbReception.OilQuantity.Trim(),//油量

                                OwnerTele = tbReception.OwnerTele,//车主电话

                                EngineNum = tbReception.EngineNum.Trim(),//发动机号码

                                Repairman = tbReception.Repairman.Trim(),//送修人

                                SelfCoding = tbReception.SelfCoding.Trim(),//自编号

                                FrameNum = tbReception.FrameNum,//车架号码

                                RepairmanTele = tbReception.RepairmanTele,//送修人电话

                                OpenDates = tbReception.OpenDate.ToString(),//开单日期

                                FactoryDates = tbReception.FactoryDate.ToString(),//进厂日期

                                BalanceDates = tbReception.BalanceDate.ToString(),//结算日期

                                openDates = tbReception.OpenDate.ToString(),//开单日期

                                factoryDates = tbReception.FactoryDate.ToString(),//进厂日期

                                balanceDates = tbReception.BalanceDate.ToString(),//结算日期

                                BalanceDateTo = tbReception.BalanceDate,//结算日期(判断)

                                Amount = tbReception.Amount,//总金额

                                AmountPaid = tbReception.AmountPaid,//应收金额

                                Describe = tbReception.Describe.Trim(),//描述

                                ToAudit = tbReception.ToAudit,//审核否

                                CompletionDates = tbReception.CompletionDate.ToString()!=null? tbReception.CompletionDate.ToString() : "0000-00-00",//完工日期

                                ToSendWork = tbReception.ToSendWork,//派工状态

                                CollageState = tbReception.CollageState.Trim(),//领料状态

                                MaintenAmount = tbReception.MaintenAmount,//维修总费

                            }).ToList();

            #region 拼接条件

           if (StartDate != "" && EndDate != "")

            {

                DateTime startDate = Convert.ToDateTime(StartDate);

                DateTime endDate = Convert.ToDateTime(EndDate);

                lingItem = lingItem.Where(m => m.BalanceDateTo >= startDate.Date && m.BalanceDateTo <= endDate.Date).ToList();

            }

            if (StartDate != "" && EndDate == "")

            {

                DateTime startDate = Convert.ToDateTime(StartDate);

                lingItem = lingItem.Where(m => m.BalanceDateTo >= startDate.Date).ToList();

            }

            if (StartDate == "" && EndDate != "")

            {

                DateTime endDate = Convert.ToDateTime(EndDate);

                lingItem = lingItem.Where(m =>m.BalanceDateTo <= endDate.Date).ToList();

            }

            if (!string.IsNullOrEmpty(CollageState))

            {

                lingItem = lingItem.Where(m => m.CollageState== CollageState).ToList();

            }

            if (!string.IsNullOrEmpty(CarNum))

            {

                lingItem = lingItem.Where(m => m.CarNum.Contains(CarNum)).ToList();

            }

            #endregion

            int count = lingItem.Count();

            List<ReceptionVo> listReception = lingItem.OrderBy(m => m.ToAudit).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid<ReceptionVo> bsgrid = new Bsgrid<ReceptionVo>()

            {

                success = true,

                totalRows = count,

                curPage = bsgridPage.curPage,

                data = listReception

            };

            return Json(bsgrid, JsonRequestBehavior.AllowGet);

        }

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com