11
This commit is contained in:
+2
-1
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BLL</RootNamespace>
|
||||
<AssemblyName>BLL</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
@@ -119,6 +119,7 @@
|
||||
<Compile Include="Common\Const.cs" />
|
||||
<Compile Include="NPOIHelper.cs" />
|
||||
<Compile Include="PublicInfo\BaseInfo\Base_PIPClassService.cs" />
|
||||
<Compile Include="PublicInfo\BaseInfo\MaterialCoodeService.cs" />
|
||||
<Compile Include="WelderManage\WelderQualifiedService.cs" />
|
||||
<Compile Include="WelderManage\WelderService.cs" />
|
||||
<Compile Include="DropListService.cs" />
|
||||
|
||||
@@ -243,6 +243,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 委托单导入模板
|
||||
/// </summary>
|
||||
public const string HJGL_TrustInTemplateUrl = "File\\Excel\\HJGL_DataIn\\TrustIn.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 检测单导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
@@ -506,6 +511,10 @@ namespace BLL
|
||||
|
||||
#region 焊接管理
|
||||
/// <summary>
|
||||
/// 物料码信息
|
||||
/// </summary>
|
||||
public const string MaterialCoodeMenuId = "482AFB2F-12AC-4B78-859E-25088AD767FB";
|
||||
/// <summary>
|
||||
/// 管线管理
|
||||
/// </summary>
|
||||
public const string HJGL_PipelineManageMenuId = "8IDKGJE2-09B1-6UIO-3EFM-5TGED48F0001";
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
public static ListItem[] HJGL_JointAttributeItem()
|
||||
{
|
||||
ListItem[] list = new ListItem[2];
|
||||
list[0] = new ListItem("活动S", "活动S");
|
||||
list[1] = new ListItem("固定G", "固定G");
|
||||
list[0] = new ListItem("S", "S");
|
||||
list[1] = new ListItem("G", "G");
|
||||
return list;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace BLL
|
||||
|
||||
public static ListItem[] GetDNCompareList()
|
||||
{
|
||||
ListItem[] list = new ListItem[18];
|
||||
ListItem[] list = new ListItem[19];
|
||||
list[0] = new ListItem("5", "5");
|
||||
list[1] = new ListItem("5S", "5S");
|
||||
list[2] = new ListItem("10", "10");
|
||||
@@ -127,7 +127,7 @@ namespace BLL
|
||||
list[15] = new ListItem("140", "140");
|
||||
list[16] = new ListItem("160", "160");
|
||||
list[17] = new ListItem("XXS", "XXS");
|
||||
|
||||
list[18] = new ListItem("FB", "FB");
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class MaterialCoodeService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///获取物料码信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_MaterialCoode GetMaterialCoode(string materialCoodeId, string projectId)
|
||||
{
|
||||
return Funs.DB.Base_MaterialCoode.FirstOrDefault(e => e.MaterialCoodeId == materialCoodeId && e.ProjectId == projectId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加物料码信息
|
||||
/// </summary>
|
||||
/// <param name="newCoode"></param>
|
||||
public static void AddMaterialCoode(Model.Base_MaterialCoode coode)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Base_MaterialCoode newCoode = new Base_MaterialCoode
|
||||
{
|
||||
MaterialCoodeId = coode.MaterialCoodeId,
|
||||
ProjectId = coode.ProjectId,
|
||||
Coode = coode.Coode,
|
||||
HeartNo = coode.HeartNo,
|
||||
Amount = coode.Amount
|
||||
};
|
||||
db.Base_MaterialCoode.InsertOnSubmit(newCoode);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改物料码信息
|
||||
/// </summary>
|
||||
/// <param name="medium"></param>
|
||||
public static void UpdateMaterialCoode(Model.Base_MaterialCoode coode)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Base_MaterialCoode NewCoode = db.Base_MaterialCoode.FirstOrDefault(e => e.MaterialCoodeId == coode.MaterialCoodeId);
|
||||
if (NewCoode != null)
|
||||
{
|
||||
NewCoode.ProjectId = coode.ProjectId;
|
||||
NewCoode.Coode = coode.Coode;
|
||||
NewCoode.HeartNo = coode.HeartNo;
|
||||
NewCoode.Amount = coode.Amount;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据物料码Id删除一个物料码信息
|
||||
/// </summary>
|
||||
/// <param name="materialCoodeId"></param>
|
||||
public static void DeleteMaterialCoode(string materialCoodeId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Base_MaterialCoode delCoode = db.Base_MaterialCoode.FirstOrDefault(e => e.MaterialCoodeId == materialCoodeId);
|
||||
if (delCoode != null)
|
||||
{
|
||||
db.Base_MaterialCoode.DeleteOnSubmit(delCoode);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断物料码是否已存在
|
||||
/// </summary>
|
||||
/// <param name="isoNo"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExistMaterialCoode(string projectId, string heartNo, string Coode, string materialCoodeId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
var q = Funs.DB.Base_MaterialCoode.FirstOrDefault(x => x.ProjectId == projectId && x.HeartNo == heartNo && x.Coode == Coode && (x.MaterialCoodeId != materialCoodeId || (materialCoodeId == null && x.MaterialCoodeId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#region 物料码下拉项
|
||||
/// <summary>
|
||||
/// 安装组件下拉项
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名称</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
/// <param name="MediumType">耗材类型</param>
|
||||
public static void InitMaterialCoodeDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "MaterialCoode";
|
||||
dropName.DataTextField = "MaterialCoode";
|
||||
var sql = from x in Funs.DB.Base_MaterialCoode
|
||||
where x.ProjectId == projectId
|
||||
orderby x.Coode, x.HeartNo
|
||||
select new { x.MaterialCoodeId, MaterialCoode = x.Coode + ":" + x.HeartNo};
|
||||
dropName.DataSource = sql.ToList();
|
||||
dropName.DataBind();
|
||||
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitCoodeDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "Coode";
|
||||
dropName.DataTextField = "Coode";
|
||||
var sql = (from x in Funs.DB.Base_MaterialCoode
|
||||
where x.ProjectId == projectId select x.Coode).Distinct();
|
||||
dropName.DataSource = sql;
|
||||
dropName.DataBind();
|
||||
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitHeartNoDropDownList(FineUIPro.DropDownList dropName, string coode, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "HeartNo";
|
||||
dropName.DataTextField = "HeartNo";
|
||||
var sql = (from x in Funs.DB.Base_MaterialCoode
|
||||
where x.Coode == coode
|
||||
select x.HeartNo).ToList();
|
||||
dropName.DataSource = sql;
|
||||
dropName.DataBind();
|
||||
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -971,7 +971,7 @@ namespace BLL
|
||||
return maxId;
|
||||
}
|
||||
|
||||
public static int getIntValue(string sql)
|
||||
public static int getIntValue(string sql, SqlParameter[] param = null)
|
||||
{
|
||||
int i = 0;
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
@@ -981,18 +981,21 @@ namespace BLL
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection);
|
||||
command.CommandType = CommandType.Text;
|
||||
|
||||
if (param != null)
|
||||
{
|
||||
AddParameterToCommand(command, param);
|
||||
}
|
||||
i = Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
finally
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace BLL
|
||||
public static List<Model.Batch_PointBatchItem> GetExportItem(string repairRecordId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
var exp =from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId select x;
|
||||
var exp = from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId && x.PointState == "2" select x;
|
||||
if (exp.Count() > 0)
|
||||
{
|
||||
return exp.ToList();
|
||||
|
||||
@@ -169,6 +169,9 @@ namespace BLL
|
||||
newPipelineList.PTP_ID = IsoList.PTP_ID;
|
||||
newPipelineList.PipelineId = IsoList.PipelineId;
|
||||
newPipelineList.PT_DataType = IsoList.PT_DataType;
|
||||
newPipelineList.IsAll = IsoList.IsAll;
|
||||
newPipelineList.WorkAreaId= IsoList.WorkAreaId;
|
||||
newPipelineList.WeldJonintCode = IsoList.WeldJonintCode;
|
||||
db.PTP_PipelineList.InsertOnSubmit(newPipelineList);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ namespace BLL
|
||||
{
|
||||
newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(weldJoint.WeldMatId))
|
||||
{
|
||||
newWeldJoint.WeldMatId = weldJoint.WeldMatId;
|
||||
|
||||
@@ -61,13 +61,16 @@ namespace BLL
|
||||
newWeldReportItem.JointArea = item.JointArea;
|
||||
newWeldReportItem.WeldingLocationId = item.WeldingLocationId;
|
||||
newWeldReportItem.WeldingLocationCode = item.WeldingLocationCode;
|
||||
|
||||
newWeldReportItem.JointAttribute = item.JointAttribute;
|
||||
newWeldReportItem.DoneDin = item.DoneDin;
|
||||
newWeldReportItem.Dia = item.Dia;
|
||||
newWeldReportItem.Thickness = item.Thickness;
|
||||
newWeldReportItem.WeldingMethodCode = item.WeldingMethodCode;
|
||||
newWeldReportItem.HeartNo1 = item.HeartNo1;
|
||||
newWeldReportItem.HeartNo2 = item.HeartNo2;
|
||||
newWeldReportItem.CoodeHeartNo1 = item.Coode1 + ":" + item.HeartNo1;
|
||||
newWeldReportItem.CoodeHeartNo2 = item.Coode2 + ":" + item.HeartNo2;
|
||||
//newWeldReportItem.HeartNo1 = item.HeartNo1;
|
||||
//newWeldReportItem.HeartNo2 = item.HeartNo2;
|
||||
newWeldReportItem.Components1Code = item.ComponentsCode1;
|
||||
newWeldReportItem.Components2Code = item.ComponentsCode2;
|
||||
newWeldReportItem.Material1Code = item.Material1Code;
|
||||
@@ -141,9 +144,10 @@ namespace BLL
|
||||
newWeldReportItem.WeldingLocationId = weldline.WeldingLocationId;
|
||||
newWeldReportItem.WeldingLocationCode = weldline.WeldingLocationCode;
|
||||
newWeldReportItem.JointAttribute = weldline.JointAttribute;
|
||||
|
||||
newWeldReportItem.HeartNo1 = weldline.HeartNo1;
|
||||
newWeldReportItem.HeartNo2 = weldline.HeartNo2;
|
||||
newWeldReportItem.CoodeHeartNo1 = weldline.Coode1 + ":" + weldline.HeartNo1;
|
||||
newWeldReportItem.CoodeHeartNo2 = weldline.Coode2 + ":" + weldline.HeartNo2;
|
||||
//newWeldReportItem.HeartNo1 = weldline.HeartNo1;
|
||||
//newWeldReportItem.HeartNo2 = weldline.HeartNo2;
|
||||
newWeldReportItem.Components1Code = weldline.ComponentsCode1;
|
||||
newWeldReportItem.Components2Code = weldline.ComponentsCode2;
|
||||
newWeldReportItem.Material1Code = weldline.Material1Code;
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
|
||||
Reference in New Issue
Block a user