48 lines
2.0 KiB
C#
48 lines
2.0 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 || reportType == Const.ReportType_8)
|
|
{
|
|
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 || reportType == Const.ReportType_9)
|
|
{
|
|
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);
|
|
}
|
|
else if (reportType == Const.ReportType_6 || reportType == Const.ReportType_7 || reportType == Const.ReportType_10)
|
|
{
|
|
urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year);
|
|
}
|
|
if (urgeReport != null)
|
|
{
|
|
urgeReport.IsComplete = true;
|
|
Funs.DB.SubmitChanges();
|
|
}
|
|
}
|
|
}
|
|
}
|