This commit is contained in:
李超 2025-09-28 12:59:13 +08:00
commit d7a11fdce3
9 changed files with 72 additions and 46 deletions

View File

@ -10,7 +10,7 @@ namespace BLL
/// </summary>
public class MonthPlanService
{
public static Model.SGGLDB db = Funs.DB;
//public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取月度计划情况

View File

@ -10,8 +10,6 @@ namespace BLL
/// </summary>
public class WeekItemService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取自定义周情况
/// </summary>
@ -19,6 +17,7 @@ namespace BLL
/// <returns></returns>
public static Model.JDGL_WeekItem GetWeekItemById(string WeekId)
{
Model.SGGLDB db = Funs.DB;
return db.JDGL_WeekItem.FirstOrDefault(e => e.WeekId == WeekId);
}
@ -30,6 +29,7 @@ namespace BLL
/// <returns></returns>
public static Model.JDGL_WeekItem GetWeekItemByProjectIdAndWeekNo(string ProjectId, int WeekNo)
{
Model.SGGLDB db = Funs.DB;
return db.JDGL_WeekItem.FirstOrDefault(e => e.ProjectId == ProjectId && e.WeekNo == WeekNo);
}
@ -40,6 +40,7 @@ namespace BLL
/// <returns></returns>
public static Model.JDGL_WeekItem GetWeekItemByDateNow(string ProjectId)
{
Model.SGGLDB db = Funs.DB;
return db.JDGL_WeekItem.FirstOrDefault(e => e.ProjectId == ProjectId && e.StartDate < DateTime.Now && e.EndDate > DateTime.Now);
}
/// <summary>
@ -48,6 +49,7 @@ namespace BLL
/// <param name="WeekItem"></param>
public static void AddWeekItem(Model.JDGL_WeekItem WeekItem)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WeekItem newWeekItem = new Model.JDGL_WeekItem
{
WeekId = WeekItem.WeekId,
@ -68,6 +70,7 @@ namespace BLL
/// <param name="WeekItem"></param>
public static void UpdateWeekItem(Model.JDGL_WeekItem WeekItem)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WeekItem newWeekItem = db.JDGL_WeekItem.FirstOrDefault(e => e.WeekId == WeekItem.WeekId);
if (newWeekItem != null)
{
@ -86,6 +89,7 @@ namespace BLL
/// <param name="WeekId"></param>
public static void DeleteWeekItemById(string WeekId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.JDGL_WeekItem where x.WeekId == WeekId select x).FirstOrDefault();
if (q != null)
{
@ -102,6 +106,7 @@ namespace BLL
/// <returns></returns>
public static List<JDGL_WeekItem> GetWeekItemList(string ProjectId)
{
Model.SGGLDB db = Funs.DB;
return (from x in db.JDGL_WeekItem where x.ProjectId == ProjectId orderby x.WeekNo descending select x).ToList();
}

View File

@ -11,10 +11,8 @@ namespace BLL
public class CNCECHSSEGetWebService
{
#region
/// <summary>
/// 督查检查整改上报
/// </summary>
@ -23,6 +21,7 @@ namespace BLL
string code = "0";
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
string filePath = Funs.SGGLUrl;
try
{
var upCheckReport = from x in db.View_DCGL_CheckRectifyListFromSUB
@ -50,7 +49,7 @@ namespace BLL
ToKeyId = x.ToKeyId2,
AttachSource = x.AttachSource2,
AttachUrl = x.AttachUrl2,
FilePath = Funs.SGGLUrl
FilePath = filePath
//////附件转为字节传送
//FileContext = FileStructService.GetMoreFileStructByAttachUrl(x.AttachUrl2),
};
@ -62,9 +61,12 @@ namespace BLL
{ "token", ServerService.GetToken().Token }
};
var pushContent = JsonConvert.SerializeObject(upCheckReport.ToList());
//ErrLogInfo.WriteLog($"【集团检查整改上报数据】:{pushContent}");
var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent);
if (!string.IsNullOrEmpty(strJosn))
{
//ErrLogInfo.WriteLog($"【集团检查整改上报数据结果】:{strJosn}");
JObject obj = JObject.Parse(strJosn);
code = obj["code"].ToString();
@ -78,8 +80,12 @@ namespace BLL
var newCheckRectify = db.DCGL_Check_CheckRectify.FirstOrDefault(e => e.CheckRectifyId == item);
if (newCheckRectify != null)
{
newCheckRectify.HandleState = BLL.Const.State_3; //已完成
db.SubmitChanges();
var getNoUpdateItem = db.DCGL_Check_CheckRectifyItem.FirstOrDefault(x => x.CheckRectifyId == checkRectifyId && !x.RealEndDate.HasValue);
if (getNoUpdateItem == null)
{//问题全部整改完成
newCheckRectify.HandleState = BLL.Const.State_3; //已完成
db.SubmitChanges();
}
}
}
}
@ -95,10 +101,7 @@ namespace BLL
return code;
}
}
#endregion
}
}

File diff suppressed because one or more lines are too long

View File

@ -4125,20 +4125,31 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
string Quantity2Sum = String.Empty;//累计检查合格点数/累计检查点数
var inspectionUnits = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
from u in unitJoin.DefaultIfEmpty()
select new
{
c.InspectionDate,
c.ProjectId,
u.UnitId,
u.UnitName,
c.IsOnceQualified
};
//var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail
// join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
// from u in unitJoin.DefaultIfEmpty()
// select new
// {
// c.InspectionDate,
// c.ProjectId,
// u.UnitId,
// u.UnitName,
// c.IsOnceQualified
// };
var cqmsList = from c in db.ProcessControl_InspectionManagement
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
from u in unitJoin.DefaultIfEmpty()
select new
{
c.InspectionDate,
c.ProjectId,
u.UnitId,
u.UnitName,
c.IsOnceQualified
};
foreach (var item in inspectionUnits)
{
var query = from x in cqmsDetail
var query = from x in cqmsList
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
select new
{

View File

@ -1562,20 +1562,31 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
// orderby y.UnitCode
// select new { x.UnitId, y.UnitName };
var unitLists = units.Where(x => x.UnitType == BLL.Const.ProjectUnitType_2 || x.UnitType == BLL.Const.ProjectUnitType_1).ToList();
var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
from u in unitJoin.DefaultIfEmpty()
select new
{
c.CheckDate,
c.ProjectId,
u.UnitId,
u.UnitName,
c.IsOnceQualified
};
//var cqmsDetail = from c in db.View_CQMS_InspectionManagementDetail
// join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
// from u in unitJoin.DefaultIfEmpty()
// select new
// {
// c.CheckDate,
// c.ProjectId,
// u.UnitId,
// u.UnitName,
// c.IsOnceQualified
// };
var cqmsList = from c in db.ProcessControl_InspectionManagement
join u in db.Base_Unit on c.UnitId equals u.UnitId into unitJoin
from u in unitJoin.DefaultIfEmpty()
select new
{
c.CheckDate,
c.ProjectId,
u.UnitId,
u.UnitName,
c.IsOnceQualified
};
foreach (var item in unitLists)
{
var query = from x in cqmsDetail
var query = from x in cqmsList
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == item.UnitId
select new
{

View File

@ -95,6 +95,7 @@ namespace FineUIPro.Web.DCGL.ServerCheck
if (attachFile != null)
{
CNCECPath = !string.IsNullOrWhiteSpace(CNCECPath) ? CNCECPath : "https://qhse.cncecoa.com/QHSE/";
url = BLL.UploadAttachmentService.ShowImage(CNCECPath, attachFile.AttachUrl);
}
}

View File

@ -165,7 +165,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString());
if (datetime1.HasValue)
{
@ -187,7 +187,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getT = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString() && x.IsOnceQualified == true);
if (datetime1.HasValue)
{
@ -209,7 +209,7 @@ namespace FineUIPro.Web.DataShow
if (projectId != null)
{
var datetime1 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtStartTime.Text);
var datetime2 = Funs.GetNewDateTime(this.txtEndTime.Text);
var getALL = Funs.DB.ProcessControl_InspectionManagement.Where(x => x.ProjectId == projectId.ToString());
if (datetime1.HasValue)

View File

@ -101,13 +101,8 @@
<f:Tab ID="Tab2" Title="下周计划" BodyPadding="5px" Layout="VBox" IconFont="Bookmark" TitleToolTip="下周计划"
runat="server">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="周进度计划" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="WeekPlanId" AllowCellEditing="true" ForceFit="true" Height="500px"
ClicksToEdit="1" DataIDField="WeekPlanId" AllowSorting="true" SortField="SortIndex"
SortDirection="ASC" EnableColumnLines="true"
PageSize="1000"
AllowFilters="true" EnableTextSelection="True">
<f:Grid ID="Grid1" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false" Height="500px" PageSize="1000"
DataKeyNames="WeekPlanId" DataIDField="WeekPlanId" EnableColumnLines="true" ForceFit="true" AllowCellEditing="true" ClicksToEdit="1">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">