This commit is contained in:
parent
112b305803
commit
d36cec32ea
|
|
@ -534,6 +534,120 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region 新保存Check_CheckSpecial
|
||||
|
||||
/// <summary>
|
||||
/// 新保存Check_CheckSpecial
|
||||
/// </summary>
|
||||
/// <param name="newItem">处罚通知单</param>
|
||||
/// <returns></returns>
|
||||
public static string SaveCheckSpecialNew(Model.CheckSpecialItem newItem)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string message = string.Empty;
|
||||
Model.Check_CheckSpecial newCheckSpecial = new Model.Check_CheckSpecial
|
||||
{
|
||||
CheckSpecialId = newItem.CheckSpecialId,
|
||||
CheckSpecialCode = newItem.CheckSpecialCode,
|
||||
CheckType = newItem.CheckType,
|
||||
ProjectId = newItem.ProjectId,
|
||||
CheckPerson = newItem.CheckPersonId,
|
||||
CheckTime = Funs.GetNewDateTime(newItem.CheckTime),
|
||||
DaySummary = System.Web.HttpUtility.HtmlEncode(newItem.DaySummary),
|
||||
PartInUnits = newItem.PartInUnitIds,
|
||||
PartInPersonIds = newItem.PartInPersonIds,
|
||||
PartInPersons = UserService.getUserNamesUserIds(newItem.PartInPersonIds),
|
||||
PartInPersonNames = newItem.PartInPersonNames2,
|
||||
CompileMan = newItem.CompileManId,
|
||||
States = Const.State_0,
|
||||
};
|
||||
if (newItem.CheckType == "0")
|
||||
{
|
||||
newCheckSpecial.CheckItemSetId = newItem.CheckItemSetId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(newItem.States))
|
||||
{
|
||||
newCheckSpecial.States = newItem.States;
|
||||
}
|
||||
if (newItem.CheckSpecialDetailItems == null || newItem.CheckSpecialDetailItems.Count() == 0)
|
||||
{
|
||||
if (newItem.States == Const.State_1)
|
||||
{
|
||||
newCheckSpecial.States = Const.State_2;
|
||||
}
|
||||
}
|
||||
var updateCheckSpecial =
|
||||
db.Check_CheckSpecial.FirstOrDefault(x => x.CheckSpecialId == newItem.CheckSpecialId);
|
||||
if (updateCheckSpecial == null)
|
||||
{
|
||||
newCheckSpecial.CheckSpecialId = SQLHelper.GetNewID();
|
||||
newCheckSpecial.CheckSpecialCode =
|
||||
CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectCheckSpecialMenuId,
|
||||
newCheckSpecial.ProjectId, string.Empty);
|
||||
db.Check_CheckSpecial.InsertOnSubmit(newCheckSpecial);
|
||||
db.SubmitChanges();
|
||||
////增加一条编码记录
|
||||
BLL.CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(BLL.Const.ProjectCheckSpecialMenuId,
|
||||
newCheckSpecial.ProjectId, null, newCheckSpecial.CheckSpecialId, newCheckSpecial.CheckTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
|
||||
}
|
||||
|
||||
////保存附件
|
||||
if (!string.IsNullOrEmpty(newItem.AttachUrl1))
|
||||
{
|
||||
UploadFileService.SaveAttachUrl(
|
||||
UploadFileService.GetSourceByAttachUrl(newItem.AttachUrl1, 10, null), newItem.AttachUrl1,
|
||||
Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonService.DeleteAttachFileById(Const.ProjectCheckSpecialMenuId, newCheckSpecial.CheckSpecialId);
|
||||
}
|
||||
|
||||
///// 新增检查项
|
||||
if (newItem.CheckSpecialDetailItems != null && newItem.CheckSpecialDetailItems.Count() > 0)
|
||||
{
|
||||
foreach (var item in newItem.CheckSpecialDetailItems)
|
||||
{
|
||||
item.CheckSpecialId = newCheckSpecial.CheckSpecialId;
|
||||
SaveCheckSpecialDetail(item);
|
||||
}
|
||||
|
||||
//// 单据完成后 系统自动按照单位 整改要求生成隐患整改单
|
||||
if (newItem.States == Const.State_1)
|
||||
{
|
||||
var getC = newItem.CheckSpecialDetailItems.FirstOrDefault(x => x.CompleteStatus == false);
|
||||
if (getC == null)
|
||||
{
|
||||
newCheckSpecial.States = Const.State_2;
|
||||
Check_CheckSpecialService.UpdateCheckSpecial(newCheckSpecial);
|
||||
}
|
||||
else
|
||||
{
|
||||
var detailLists = db.Check_CheckSpecialDetail.Where(x =>
|
||||
x.CheckSpecialId == newCheckSpecial.CheckSpecialId && x.CompleteStatus == false);
|
||||
if (detailLists.Count() > 0)
|
||||
{
|
||||
message = Check_CheckSpecialService.IssueRectification(detailLists.ToList(),
|
||||
newCheckSpecial);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@
|
|||
<f:DropDownList ID="drpQuestionType" runat="server" Label="问题类别" Width="210px" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
<f:Button ID="btnPull" runat="server" OnClick="btnPull_Click" ToolTip="获取" Text="获取">
|
||||
</f:Button>
|
||||
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||
Hidden="true">
|
||||
|
|
@ -107,7 +107,15 @@
|
|||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="结束日期" ID="txtEndTime"
|
||||
LabelAlign="right">
|
||||
</f:DatePicker>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelWidth="80px" LabelAlign="Right" Label="来源" ID="drpDataSource" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="-请选择-" Value="null" />
|
||||
<f:ListItem Text="本单位" Value="0" />
|
||||
<f:ListItem Text="总包" Value="1" />
|
||||
</f:DropDownList>
|
||||
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置" Icon="ArrowUndo" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:RadioButtonList ID="rbOutType" Label="导出" runat="server" LabelWidth="50px" Width="180px">
|
||||
<f:RadioItem Text="无图" Value="0" Selected="true" />
|
||||
<f:RadioItem Text="有图" Value="1" />
|
||||
|
|
@ -159,13 +167,13 @@
|
|||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertImgUrlByImage(Eval("CheckControlCode")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="120px" ColumnID="QuestionDef" DataField="QuestionDef"
|
||||
<f:RenderField Width="120px" ColumnID="QuestionDef" DataField="QuestionDef"
|
||||
FieldType="String" HeaderText="问题描述" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ReasonAnalysis" DataField="ReasonAnalysis"
|
||||
<f:RenderField Width="120px" ColumnID="ReasonAnalysis" DataField="ReasonAnalysis"
|
||||
FieldType="String" HeaderText="原因分析" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="RectifyOpinion" DataField="RectifyOpinion"
|
||||
<f:RenderField Width="120px" ColumnID="RectifyOpinion" DataField="RectifyOpinion"
|
||||
FieldType="String" HeaderText="采取的措施" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<%-- <f:RenderField Width="70px" ColumnID="CheckSite" DataField="CheckSite" SortField="CheckSite" --%>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,17 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
public string code
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["code"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["code"] = value;
|
||||
}
|
||||
}
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
|
|
@ -48,27 +59,52 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
// this.ProjectId = Request.Params["projectId"];
|
||||
//}
|
||||
//权限按钮方法
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
|
||||
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
|
||||
Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
//UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
//UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
//CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
|
||||
//QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
|
||||
//Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
//if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, CurrUser.UnitId))
|
||||
//{
|
||||
// drpSponsorUnit.SelectedValue = CurrUser.UnitId;
|
||||
// drpSponsorUnit.Readonly = true;
|
||||
//}
|
||||
btnNew.OnClientClick = Window1.GetShowReference("ChecklistEdit.aspx") + "return false;";
|
||||
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, CurrUser.UnitId))
|
||||
{
|
||||
drpSponsorUnit.SelectedValue = CurrUser.UnitId;
|
||||
drpSponsorUnit.Readonly = true;
|
||||
}
|
||||
GetList();
|
||||
APICheckControlSyncService.getCheckControlLists(this.ProjectId);
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void GetList()
|
||||
{
|
||||
//UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
//UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
//CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
|
||||
//QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
|
||||
//Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
code = ProjectService.GetProjectByProjectId(this.ProjectId).ProjectCode + "-QC-TCC-XJ-";
|
||||
}
|
||||
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSponsorUnit, this.ProjectId, "", true);
|
||||
UnitWorkService.InitUnitWorkDownList(drpUnitWork, this.ProjectId, true);
|
||||
CNProfessionalService.InitCNProfessionalDownList(drpCNProfessional, true);
|
||||
QualityQuestionTypeService.InitQualityQuestionTypeDownList(drpQuestionType, true);
|
||||
Funs.FineUIPleaseSelect(this.dpHandelStatus);
|
||||
if (ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.CurrUser.LoginProjectId, CurrUser.UnitId))
|
||||
{
|
||||
drpSponsorUnit.SelectedValue = CurrUser.UnitId;
|
||||
drpSponsorUnit.Readonly = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
//public System.Web.UI.WebControls.ListItem[] GetHandelStatus()
|
||||
//{
|
||||
|
|
@ -336,6 +372,11 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
|
||||
if (checks != null)
|
||||
{
|
||||
if (checks.DataSource == "1")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckListEdit.aspx?CheckControlCode={0}", codes, "编辑 - ")));
|
||||
return;
|
||||
}
|
||||
if (checks.State.Equals(Const.CheckControl_Complete))
|
||||
{
|
||||
Alert.ShowInTop("当前数据已闭环,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
|
|
@ -1008,5 +1049,18 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
|
||||
return url;
|
||||
}
|
||||
|
||||
#region 拉取总包检查
|
||||
/// <summary>
|
||||
/// 拉取总包检查
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPull_Click(object sender, EventArgs e)
|
||||
{
|
||||
APICheckControlSyncService.getCheckControlLists(this.ProjectId);
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +95,15 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuestionType;
|
||||
|
||||
/// <summary>
|
||||
/// btnPull 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnPull;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
|
|
@ -104,15 +113,6 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnRset 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRset;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
|
@ -158,6 +158,24 @@ namespace FineUIPro.Web.CQMS.Check
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtEndTime;
|
||||
|
||||
/// <summary>
|
||||
/// drpDataSource 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDataSource;
|
||||
|
||||
/// <summary>
|
||||
/// btnRset 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnRset;
|
||||
|
||||
/// <summary>
|
||||
/// rbOutType 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -152,5 +152,61 @@ namespace WebAPI.Controllers
|
|||
}
|
||||
return responeData;
|
||||
}
|
||||
|
||||
|
||||
#region 根据id删除专项检查明细
|
||||
|
||||
/// <summary>
|
||||
/// 根据id删除专项检查明细
|
||||
/// </summary>
|
||||
/// <param name="newItem">专项检查</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Model.ResponeData deleteCheckSpecialDetailById(string checkSpecialDetailId)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
Check_CheckSpecialDetailService.DeleteCheckSpecialDetailById(checkSpecialDetailId);
|
||||
responeData.message = "删除成功!";
|
||||
responeData.code = 1;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 保存专项检查 Check_CheckSpecial
|
||||
|
||||
/// <summary>
|
||||
/// 保存专项检查 Check_CheckSpecial
|
||||
/// </summary>
|
||||
/// <param name="newItem">专项检查</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Model.ResponeData SaveCheckSpecialNew([FromBody] Model.CheckSpecialItem newItem)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.message = APICheckSpecialService.SaveCheckSpecialNew(newItem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,219 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
|
||||
|
||||
namespace WebAPI.Controllers.HSSE
|
||||
{
|
||||
public class MaterialInAndOutRecordController : ApiController
|
||||
{
|
||||
#region 获取物资列表提供选择
|
||||
|
||||
//获取物资列表提供选择
|
||||
public Model.ResponeData GetGoodsCategoryList(string goodsCategoryName, int pageIndex = 0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
List<Model.Base_GoodsCategory> result = GoodsCategoryService.GetGoodsCategoryList();
|
||||
if (!string.IsNullOrEmpty(goodsCategoryName))
|
||||
{
|
||||
result = result.Where(x => x.GoodsCategoryName.Contains(goodsCategoryName)).ToList();
|
||||
}
|
||||
|
||||
int resultCount = result.Count();
|
||||
if (resultCount > 0 && pageIndex > 0)
|
||||
{
|
||||
result = result.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
|
||||
responeData.data = result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取物资单位列表提供选择
|
||||
|
||||
//获取物资列表提供选择
|
||||
public Model.ResponeData GetMaterialUnitList(string materialUnitName, int pageIndex = 0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
List<Model.Base_MaterialUnit> result = MaterialUnitService.GetMaterialUnitList();
|
||||
if (!string.IsNullOrEmpty(materialUnitName))
|
||||
{
|
||||
result = result.Where(x => x.MaterialUnitName.Contains(materialUnitName)).ToList();
|
||||
}
|
||||
|
||||
int resultCount = result.Count();
|
||||
if (resultCount > 0 && pageIndex > 0)
|
||||
{
|
||||
result = result.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
|
||||
responeData.data = result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 保存物资进出记录
|
||||
|
||||
//保存物资进出记录
|
||||
[HttpPost]
|
||||
public Model.ResponeData SaveMaterialInAndOutRecord(Model.MaterialInAndOutRecord materialInAndOutRecord)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(materialInAndOutRecord.Id))
|
||||
{
|
||||
//编辑
|
||||
MaterialInAndOutRecordService.UpdateMaterialInAndOutRecord(materialInAndOutRecord);
|
||||
}
|
||||
else
|
||||
{
|
||||
//新增
|
||||
materialInAndOutRecord.Id = SQLHelper.GetNewID(typeof(Model.MaterialInAndOutRecord));
|
||||
materialInAndOutRecord.CompileDate = DateTime.Now;
|
||||
MaterialInAndOutRecordService.AddMaterialInAndOutRecord(materialInAndOutRecord);
|
||||
}
|
||||
|
||||
responeData.data = "保存成功";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 根据id删除物资进出记录
|
||||
|
||||
//根据id删除物资进出记录
|
||||
[HttpPost]
|
||||
public Model.ResponeData DelMaterialInAndOutRecordById(string id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
MaterialInAndOutRecordService.DeleteMaterialInAndOutRecordById(id);
|
||||
responeData.data = "删除成功";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 根据id获取物资进出记录
|
||||
|
||||
//根据id获取物资进出记录
|
||||
public Model.ResponeData GetMaterialInAndOutRecordById(string id)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var result = (from record in Funs.DB.MaterialInAndOutRecord
|
||||
join materialUnit in Funs.DB.Base_MaterialUnit on record.MaterialUnitId equals materialUnit
|
||||
.MaterialUnitId into MaterialUnitGroup
|
||||
from materialUnit in MaterialUnitGroup.DefaultIfEmpty()
|
||||
join unit in Funs.DB.Base_Unit on record.UnitId equals unit.UnitId into UnitGroup
|
||||
from unit in UnitGroup.DefaultIfEmpty()
|
||||
join users in Funs.DB.Sys_User on record.CompileMan equals users.UserId into UsersGroup
|
||||
from users in UsersGroup.DefaultIfEmpty()
|
||||
where record.Id == id
|
||||
select new
|
||||
{
|
||||
record.Id,
|
||||
record.ProjectId,
|
||||
record.GoodsCategoryId,
|
||||
record.GoodsCategoryName,
|
||||
record.MaterialModel,
|
||||
record.InOutDate,
|
||||
record.InOrOut,
|
||||
record.Number,
|
||||
record.UnitId,
|
||||
record.Remark,
|
||||
record.CompileMan,
|
||||
record.CompileDate,
|
||||
record.MaterialUnitId,
|
||||
MaterialUnitName = materialUnit != null ? materialUnit.MaterialUnitName : null,
|
||||
UnitName = unit != null ? unit.UnitName : null,
|
||||
CompileManName = users != null ? users.UserName : null
|
||||
}).FirstOrDefault();
|
||||
responeData.data = result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取物资进出记录列表
|
||||
|
||||
//获取物资进出记录列表
|
||||
public Model.ResponeData GetMaterialInAndOutRecordList(int pageIndex = 0)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var data = MaterialInAndOutRecordService.GetMaterialInAndOutRecordList();
|
||||
int dataCount = data.Count();
|
||||
if (dataCount > 0 && pageIndex > 0)
|
||||
{
|
||||
data = data.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
|
||||
}
|
||||
|
||||
responeData.data = data;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -92,13 +92,18 @@ namespace WebAPI.Controllers
|
|||
/// <param name="projectId"></param>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="personName"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getPersonByProjectIdUnitId(string projectId, string unitId, int pageIndex)
|
||||
public Model.ResponeData getPersonByProjectIdUnitId(string projectId, string unitId, int pageIndex, string personName = "")
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var getDataList = APIPersonService.getPersonByProjectIdUnitId(projectId, unitId);
|
||||
if (!string.IsNullOrEmpty(personName))
|
||||
{
|
||||
getDataList = getDataList.Where(x => x.PersonName.Contains(personName)).ToList();
|
||||
}
|
||||
int pageCount = getDataList.Count;
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl>
|
||||
<History>True|2026-03-20T11:19:26.8552857Z||;True|2026-03-20T16:59:16.0930705+08:00||;True|2026-03-11T19:40:09.7470523+08:00||;True|2026-03-11T17:57:46.6298303+08:00||;True|2026-03-06T12:42:13.4499176+08:00||;True|2026-03-05T15:19:57.4320764+08:00||;True|2026-03-04T19:14:37.2772043+08:00||;True|2026-03-01T17:32:51.9305697+08:00||;True|2026-03-01T16:45:09.4172340+08:00||;True|2026-03-01T14:50:18.5222913+08:00||;True|2026-02-28T17:34:46.4778856+08:00||;True|2026-02-28T15:29:45.4981175+08:00||;True|2026-02-28T15:22:44.8350431+08:00||;True|2026-02-28T15:16:49.0265188+08:00||;True|2026-02-28T15:01:52.0489798+08:00||;True|2026-02-28T14:40:09.1723344+08:00||;True|2026-02-28T09:47:26.7601751+08:00||;True|2026-01-24T15:12:59.9025754+08:00||;True|2026-01-19T14:30:45.4370000+08:00||;True|2025-12-24T19:02:35.3684081+08:00||;True|2025-12-18T09:29:13.2909255+08:00||;True|2025-11-25T10:18:00.9729814+08:00||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;</History>
|
||||
<History>True|2026-03-23T09:12:03.2477043Z||;True|2026-03-23T17:11:46.0120853+08:00||;True|2026-03-20T19:19:26.8552857+08:00||;True|2026-03-20T16:59:16.0930705+08:00||;True|2026-03-11T19:40:09.7470523+08:00||;True|2026-03-11T17:57:46.6298303+08:00||;True|2026-03-06T12:42:13.4499176+08:00||;True|2026-03-05T15:19:57.4320764+08:00||;True|2026-03-04T19:14:37.2772043+08:00||;True|2026-03-01T17:32:51.9305697+08:00||;True|2026-03-01T16:45:09.4172340+08:00||;True|2026-03-01T14:50:18.5222913+08:00||;True|2026-02-28T17:34:46.4778856+08:00||;True|2026-02-28T15:29:45.4981175+08:00||;True|2026-02-28T15:22:44.8350431+08:00||;True|2026-02-28T15:16:49.0265188+08:00||;True|2026-02-28T15:01:52.0489798+08:00||;True|2026-02-28T14:40:09.1723344+08:00||;True|2026-02-28T09:47:26.7601751+08:00||;True|2026-01-24T15:12:59.9025754+08:00||;True|2026-01-19T14:30:45.4370000+08:00||;True|2025-12-24T19:02:35.3684081+08:00||;True|2025-12-18T09:29:13.2909255+08:00||;True|2025-11-25T10:18:00.9729814+08:00||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
|
@ -86,22 +86,22 @@
|
|||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.compiled">
|
||||
<publishTime>03/20/2026 19:19:25</publishTime>
|
||||
<publishTime>03/23/2026 17:12:02</publishTime>
|
||||
</File>
|
||||
<File Include="bin/App_global.asax.dll">
|
||||
<publishTime>03/20/2026 19:19:25</publishTime>
|
||||
<publishTime>03/23/2026 17:12:02</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Aspose.Words.dll">
|
||||
<publishTime>12/06/2024 20:13:58</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll">
|
||||
<publishTime>03/20/2026 19:19:14</publishTime>
|
||||
<publishTime>03/23/2026 17:11:22</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll.config">
|
||||
<publishTime>12/26/2024 09:46:52</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.pdb">
|
||||
<publishTime>03/20/2026 19:19:14</publishTime>
|
||||
<publishTime>03/23/2026 17:11:22</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||
<publishTime>12/18/2020 05:32:28</publishTime>
|
||||
|
|
@ -389,13 +389,13 @@
|
|||
<publishTime>02/09/2013 00:42:28</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.dll">
|
||||
<publishTime>03/20/2026 19:19:15</publishTime>
|
||||
<publishTime>03/23/2026 17:11:53</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.pdb">
|
||||
<publishTime>03/20/2026 19:19:15</publishTime>
|
||||
<publishTime>03/23/2026 17:11:53</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.xml">
|
||||
<publishTime>03/20/2026 19:19:15</publishTime>
|
||||
<publishTime>03/23/2026 17:11:53</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebGrease.dll">
|
||||
<publishTime>01/23/2014 21:57:34</publishTime>
|
||||
|
|
@ -479,7 +479,7 @@
|
|||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
</File>
|
||||
<File Include="PrecompiledApp.config">
|
||||
<publishTime>03/20/2026 19:19:16</publishTime>
|
||||
<publishTime>03/23/2026 17:11:53</publishTime>
|
||||
</File>
|
||||
<File Include="Scripts/bootstrap.js">
|
||||
<publishTime>10/28/2024 14:02:50</publishTime>
|
||||
|
|
|
|||
|
|
@ -173,6 +173,7 @@
|
|||
<Compile Include="Controllers\HJGL\GetHJDataController.cs" />
|
||||
<Compile Include="Controllers\HSSE\GeneralEquipmentQualityController.cs" />
|
||||
<Compile Include="Controllers\HSSE\HSSELogController.cs" />
|
||||
<Compile Include="Controllers\HSSE\MaterialInAndOutRecordController.cs" />
|
||||
<Compile Include="Controllers\HSSE\TestingController.cs" />
|
||||
<Compile Include="Controllers\HSSE\TowerCraneController.cs" />
|
||||
<Compile Include="Controllers\IDP\IDPController.cs" />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
|
||||
<WebStackScaffolding_LayoutPageFile />
|
||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
|
|
|||
Loading…
Reference in New Issue