2022-12-30 焊接日报重复提交问题

This commit is contained in:
2022-12-30 15:36:30 +08:00
parent bb7bdee235
commit e9196b94ce
17 changed files with 108 additions and 74 deletions
@@ -1,4 +1,5 @@
using BLL;
using FastReport.Design;
using FineUIPro.Web.HJGL.WeldingManage;
using System;
using System.Collections.Generic;
@@ -88,7 +89,7 @@ namespace FineUIPro.Web.HJGL.DataImport
{
foreach (var q in unitWork1)
{
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
@@ -111,7 +112,7 @@ namespace FineUIPro.Web.HJGL.DataImport
{
foreach (var q in unitWork2)
{
int a = (from x in PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
@@ -177,14 +178,15 @@ namespace FineUIPro.Web.HJGL.DataImport
e.Node.Nodes.Clear();
if (e.Node.CommandName == "单位工程")
{
var pipeline = (from x in PipelineService.hJGL_Pipelines
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x ).ToList();
foreach (var item in pipeline)
{
var jotCount = (from x in WeldJointService.hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
var jotCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
TreeNode newNode = new TreeNode();
//if (jotCount > weldJotCount)