扫码填报日报修改
This commit is contained in:
@@ -327,6 +327,23 @@
|
|||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static void SaveSysHttpLog(string userName, string httpUrl, string logTxt, string method)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
Model.Sys_HttpLog newLog = new Model.Sys_HttpLog()
|
||||||
|
{
|
||||||
|
HttpLogId = SQLHelper.GetNewID(),
|
||||||
|
LogTime = DateTime.Now,
|
||||||
|
UserName = userName,
|
||||||
|
HttpUrl = httpUrl,
|
||||||
|
LogTxt = logTxt,
|
||||||
|
MeThod = method
|
||||||
|
};
|
||||||
|
db.Sys_HttpLog.InsertOnSubmit(newLog);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -261,7 +261,8 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
string res = "";
|
string res = "";
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
var peson=db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid);
|
var peson=db.Person_Persons.FirstOrDefault(x => x.PersonId == Personid);
|
||||||
if (peson == null)
|
if (peson == null)
|
||||||
{
|
{
|
||||||
@@ -275,6 +276,7 @@ namespace BLL
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date);
|
var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date);
|
||||||
|
var weldTask=db.HJGL_WeldTask.FirstOrDefault(x=>x.WeldJointId==joint.WeldJointId);
|
||||||
if (weldingDaily == null)
|
if (weldingDaily == null)
|
||||||
{
|
{
|
||||||
string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-";
|
string perfix = string.Format("{0:yyyyMMdd}", System.DateTime.Now) + "-" + peson.PersonName + "-";
|
||||||
@@ -284,7 +286,7 @@ namespace BLL
|
|||||||
weldingDaily.WeldingDate = Convert.ToDateTime(time).Date;
|
weldingDaily.WeldingDate = Convert.ToDateTime(time).Date;
|
||||||
weldingDaily.ProjectId = joint.ProjectId;
|
weldingDaily.ProjectId = joint.ProjectId;
|
||||||
weldingDaily.UnitWorkId = joint.UnitWorkId;
|
weldingDaily.UnitWorkId = joint.UnitWorkId;
|
||||||
weldingDaily.UnitId = joint.UnitId;
|
weldingDaily.UnitId = weldTask?.UnitId;
|
||||||
weldingDaily.Tabler = Personid;
|
weldingDaily.Tabler = Personid;
|
||||||
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
|
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
|
||||||
db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily);
|
db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily);
|
||||||
@@ -297,7 +299,11 @@ namespace BLL
|
|||||||
InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId);
|
InsertWeldingDailyItem(WeldJointId, Personid, Personid, joint.JointAttribute, weldingDaily.WeldingDate, batchCondition, true, weldingDaily.WeldingDailyId, joint.ProjectId);
|
||||||
}
|
}
|
||||||
BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd);
|
BLL.WeldJointService.UpdateWeldJointAddG(WeldJointId, joint.JointAttribute, Const.BtnAdd);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
APICommonService.SaveSysAPILog("erro", ex.ToString(),"-1");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="10/12/2024 15:13:53" ReportInfo.CreatorVersion="2017.1.16.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="12/02/2024 17:09:49" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
<ScriptText>using System;
|
<ScriptText>using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -99,7 +99,7 @@ namespace FastReport
|
|||||||
}
|
}
|
||||||
</ScriptText>
|
</ScriptText>
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRF3hHwWOeKvKBRVSwNsZpqq"/>
|
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFVF5RbniBokWNIOmJGhniK"/>
|
||||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
<Column Name="pipelineCode" DataType="System.String" PropName="PipelineComponentId"/>
|
<Column Name="pipelineCode" DataType="System.String" PropName="PipelineComponentId"/>
|
||||||
<Column Name="Mat" DataType="System.String" PropName="PipelineComponentCode"/>
|
<Column Name="Mat" DataType="System.String" PropName="PipelineComponentCode"/>
|
||||||
|
|||||||
@@ -549,9 +549,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{ if (Grid2.SelectedRowIDArray.Count() > 0)
|
{ if (Grid2.SelectedRowIDArray.Count() > 0)
|
||||||
{
|
{
|
||||||
SaveTask();
|
SaveTask();
|
||||||
Response.Redirect(Request.Url.ToString());
|
|
||||||
ShowNotify("生成任务单成功!", MessageBoxIcon.Warning);
|
ShowNotify("生成任务单成功!", MessageBoxIcon.Warning);
|
||||||
|
// Alert.Show("生成任务单成功!", MessageBoxIcon.Warning);
|
||||||
|
Grid1.DataSource = null;
|
||||||
|
Grid1.DataBind();
|
||||||
|
Grid2.DataSource = null;
|
||||||
|
Grid2.DataBind();
|
||||||
|
Grid3.DataSource = null;
|
||||||
|
Grid3.DataBind();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -563,14 +568,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x;
|
var weldingRods = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "2" select x;
|
||||||
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x;
|
var weldingWires = from x in Funs.DB.Base_Consumables where x.ConsumablesType == "1" select x;
|
||||||
var toDoMatterList = (from x in Funs.DB.View_HJGL_NoWeldJointFind
|
|
||||||
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null && x.WeldTaskId == null
|
|
||||||
select x).ToList();
|
|
||||||
var selectRowId = (from x in Funs.DB.View_HJGL_NoWeldJointFind
|
var selectRowId = (from x in Funs.DB.View_HJGL_NoWeldJointFind
|
||||||
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null && x.WeldTaskId == null && !string.IsNullOrEmpty(x.WeldingMethodCode)
|
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null &&
|
||||||
|
x.WeldTaskId == null && x.WeldingMethodCode != null
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
foreach (var weldjoint in selectRowId)
|
foreach (var weldjoint in selectRowId)
|
||||||
{
|
{
|
||||||
string canWeldingRodName = string.Empty;
|
string canWeldingRodName = string.Empty;
|
||||||
string canWeldingWireName = string.Empty;
|
string canWeldingWireName = string.Empty;
|
||||||
Model.HJGL_WeldTask NewTask = new Model.HJGL_WeldTask();
|
Model.HJGL_WeldTask NewTask = new Model.HJGL_WeldTask();
|
||||||
@@ -657,7 +660,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
BLL.WeldTaskService.AddWeldTask(NewTask);
|
BLL.WeldTaskService.AddWeldTask(NewTask);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private bool IsCoverClass(string wpsClass, string matClass)
|
private bool IsCoverClass(string wpsClass, string matClass)
|
||||||
{
|
{
|
||||||
bool isCover = false;
|
bool isCover = false;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using System.Web.Http;
|
|||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using System.Web.Optimization;
|
using System.Web.Optimization;
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
using WebAPI.Log;
|
||||||
|
|
||||||
namespace WebAPI
|
namespace WebAPI
|
||||||
{
|
{
|
||||||
@@ -32,6 +33,7 @@ namespace WebAPI
|
|||||||
|
|
||||||
// 使api返回为json
|
// 使api返回为json
|
||||||
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
|
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
|
||||||
|
GlobalConfiguration.Configuration.MessageHandlers.Add(new CustomMessageHandler());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -246,6 +246,7 @@
|
|||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Log\CustomMessageHandler.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user