44 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			44 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			C#
		
	
	
	
| 
								 | 
							
								using System;
							 | 
						|||
| 
								 | 
							
								using System.Collections.Generic;
							 | 
						|||
| 
								 | 
							
								using System.Linq;
							 | 
						|||
| 
								 | 
							
								using System.Text;
							 | 
						|||
| 
								 | 
							
								using System.Threading.Tasks;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								namespace BLL
							 | 
						|||
| 
								 | 
							
								{
							 | 
						|||
| 
								 | 
							
								    /// <summary>
							 | 
						|||
| 
								 | 
							
								    /// 
							 | 
						|||
| 
								 | 
							
								    /// </summary>
							 | 
						|||
| 
								 | 
							
								    public static class UrgeReportService
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
								        /// <summary>
							 | 
						|||
| 
								 | 
							
								        /// 更新催报完成
							 | 
						|||
| 
								 | 
							
								        /// </summary>
							 | 
						|||
| 
								 | 
							
								        /// <param name="unitId"></param>
							 | 
						|||
| 
								 | 
							
								        /// <param name="reportType"></param>
							 | 
						|||
| 
								 | 
							
								        /// <param name="Year"></param>
							 | 
						|||
| 
								 | 
							
								        /// <param name="Month"></param>
							 | 
						|||
| 
								 | 
							
								        public static void SetComplete(string unitId, string reportType, string year, string value)
							 | 
						|||
| 
								 | 
							
								        {
							 | 
						|||
| 
								 | 
							
								            Model.Information_UrgeReport urgeReport = new Model.Information_UrgeReport();
							 | 
						|||
| 
								 | 
							
								            if (reportType == Const.ReportType_1 || reportType == Const.ReportType_2)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.MonthId == value);
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								            else if (reportType == Const.ReportType_3 || reportType == Const.ReportType_4)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.QuarterId == value);
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								            else if (reportType == Const.ReportType_5)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.HalfYearId == value);
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								            if (urgeReport != null)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                urgeReport.IsComplete = true;
							 | 
						|||
| 
								 | 
							
								                Funs.DB.SubmitChanges();
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |