物资管理API
This commit is contained in:
parent
3c8d570fc1
commit
c8497c1dbf
|
@ -27,7 +27,7 @@ REM --------------
|
|||
@echo.
|
||||
@call "%VS2022%"
|
||||
|
||||
SqlMetal /views /server:47.104.102.122,14333 /user:sa /password:p@ssw0rd /database:SGGLDB_HBAZ /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
SqlMetal /views /server:DESKTOP-B3C9LJ1 /user:sa /password:303303 /database:SGGLDB_HBAZ /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
||||
|
|
|
@ -13,13 +13,13 @@ namespace Resources {
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 Visual Studio 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Lan {
|
||||
|
@ -33,7 +33,7 @@ namespace Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
|
@ -47,8 +47,8 @@ namespace Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 覆盖当前线程的 CurrentUICulture 属性
|
||||
/// 使用此强类型的资源类的资源查找。
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.AttachFile
|
||||
{
|
||||
|
|
|
@ -7346,3 +7346,29 @@ IP地址:::1
|
|||
|
||||
出错时间:05/09/2025 15:05:47
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:NullReferenceException
|
||||
错误信息:未将对象引用设置到对象的实例。
|
||||
错误堆栈:
|
||||
在 ASP.attachfile_onlineediting_aspx.__Render__control3(HtmlTextWriter __w, Control parameterContainer) 位置 e:\公司项目\河北安装\SGGL_HBAZ\SGGL\FineUIPro.Web\AttachFile\OnlineEditing.aspx:行号 105
|
||||
在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
|
||||
在 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer)
|
||||
在 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
|
||||
在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
|
||||
在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
|
||||
在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
|
||||
在 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
|
||||
在 System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
|
||||
在 System.Web.UI.Page.Render(HtmlTextWriter writer)
|
||||
在 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
|
||||
在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
|
||||
在 System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/14/2025 17:37:21
|
||||
出错文件:http://localhost:4528/AttachFile/OnlineEditing.aspx
|
||||
IP地址:::1
|
||||
|
||||
出错时间:05/14/2025 17:37:21
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FineUIPro.Web</RootNamespace>
|
||||
<AssemblyName>FineUIPro.Web</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
|
@ -19738,7 +19738,7 @@
|
|||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<link href="../res/indexv2/assets/css/swiper.min.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="../res/css/base.css">
|
||||
<link rel="stylesheet" href="../res/css/projectIndex.css?v3">
|
||||
<link rel="stylesheet" href="../res/css/projectIndex.css?v5">
|
||||
<script src="../res/lib/flex.js"></script>
|
||||
<style type="text/css">
|
||||
.sd-body2 .sd-section .sd-section7-inner .sd-labor-echart .sd-labor-echart-box {
|
||||
|
@ -716,6 +716,11 @@
|
|||
grid: {
|
||||
top: 30,
|
||||
},
|
||||
tooltip: {
|
||||
textStyle: {
|
||||
fontSize: 20
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: tit,
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<link href="~/res/indexv2/assets/css/video-7.15.0.min.css" rel="stylesheet" />
|
||||
<link href="~/res/indexv2/assets/css/index8.css" rel="stylesheet" />
|
||||
<link href="~/res/css/mainindex.css?v2" rel="stylesheet" />
|
||||
>
|
||||
<style type="text/css">
|
||||
html {
|
||||
min-height: auto;
|
||||
|
@ -185,7 +184,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="t-head-log flex-row flex-center" onclick="onHomeClick()" style="cursor: pointer;">
|
||||
<div class="t-head-log flex-row flex-center" onclick="onHomeClick()" style="cursor: pointer;font-size: .5rem;">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,SystemName%>" /></div>
|
||||
<div class="t-head-navs flex-row flex-item-end flex-end">
|
||||
<div class="t-head-nav">
|
||||
|
@ -219,23 +218,23 @@
|
|||
</div>
|
||||
<div class="t-head-sets flex-row flex-center">
|
||||
<div class="t-head-set news" hidden="hidden">
|
||||
<f:Button runat="server" Text="<%$ Resources:Lan,SwitchHomePage %>" Hidden="true" CssStyle="color: #ffffff;" OnClick="btnChangeHomePage_Click" OnClientClick="parent.removeActiveTab();"
|
||||
<f:Button runat="server" Text="<%$ Resources:Lan,SwitchHomePage %>" Hidden="true" CssStyle="color: #ffffff;font-size:.25rem;" OnClick="btnChangeHomePage_Click" OnClientClick="parent.removeActiveTab();"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnToDoItem">
|
||||
</f:Button>
|
||||
</div>
|
||||
<div class="t-head-set user">
|
||||
<f:Button runat="server" Text="<%$ Resources:Lan,user %>" CssStyle="color: #ffffff;" OnClick="btnPersonal_Click" OnClientClick="parent.removeActiveTab();"
|
||||
<f:Button runat="server" Text="<%$ Resources:Lan,user %>" CssStyle="color: #ffffff;font-size:.25rem;" OnClick="btnPersonal_Click" OnClientClick="parent.removeActiveTab();"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPersonal">
|
||||
</f:Button>
|
||||
</div>
|
||||
<div class="t-head-set set">
|
||||
<f:Button runat="server" Text="<%$ Resources:Lan,Settings %>" CssStyle="color: #ffffff;" OnClientClick="parent.removeActiveTab();" OnClick="btnSysSet_Click"
|
||||
<f:Button runat="server" Text="<%$ Resources:Lan,Settings %>" CssStyle="color: #ffffff;font-size:.25rem;" OnClientClick="parent.removeActiveTab();" OnClick="btnSysSet_Click"
|
||||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="Button7">
|
||||
</f:Button>
|
||||
</div>
|
||||
<div class="t-head-set exit"><a href="javascript:void(0);" onclick="onToolSignOutClick()" style="color: #ffffff;">
|
||||
<div class="t-head-set exit"><a href="javascript:void(0);" onclick="onToolSignOutClick()" style="color: #ffffff;font-size:.25rem;">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,quit%>" /></a></div>
|
||||
<div class="t-head-set full">
|
||||
<div class="t-head-set full" style="font-size:.25rem;">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,FullScreen%>" /></div>
|
||||
<div class="top-li-item">
|
||||
<f:Button runat="server" CssClass="bgbtntop" Text="刷新" ToolTip="刷新菜单" IconFont="Retweet" OnClick="btnRetweet_Click"
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
background-color: transparent !important;
|
||||
padding: 0 !important;
|
||||
line-height: 1;
|
||||
font-size: .3rem;
|
||||
}
|
||||
|
||||
.activeClick {
|
||||
|
@ -132,7 +133,9 @@
|
|||
left: 0;
|
||||
top: 0;
|
||||
}*/
|
||||
|
||||
#index-project .bgbtn2{
|
||||
font-size: .25rem;
|
||||
}
|
||||
.f-tabstrip-align-left .f-tab-header.f-first {
|
||||
background-color: #dfe4f1;
|
||||
/* color: #fff;*/
|
||||
|
@ -305,7 +308,7 @@
|
|||
</div>
|
||||
<div class="logo flex-row flex-center">
|
||||
<h1>
|
||||
<f:Button runat="server" CssClass="bgbtn2" EnablePostBack="true" CssStyle="color: #ffffff;" Text="<%$ Resources:Lan,SystemName %>" OnClick="btnHome_Click"
|
||||
<f:Button runat="server" EnablePostBack="true" CssStyle="color: #ffffff;font-size: .5rem;" Text="<%$ Resources:Lan,SystemName %>" OnClick="btnHome_Click"
|
||||
EnableDefaultState="true" EnableDefaultCorner="false" ID="btnHome">
|
||||
</f:Button>
|
||||
</h1>
|
||||
|
@ -348,7 +351,7 @@
|
|||
</div>
|
||||
<div class="nav-bars flex-row flex-center">
|
||||
<div class="project-select flex-row flex-start">
|
||||
<f:DropDownList runat="server" MarginBottom="0" ID="drpProject" OnSelectedIndexChanged="drpProject_SelectedIndexChanged"
|
||||
<f:DropDownList runat="server" MarginBottom="0" CssClass="bgbtn2" ID="drpProject" OnSelectedIndexChanged="drpProject_SelectedIndexChanged"
|
||||
AutoPostBack="true" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
</div>
|
||||
|
@ -372,10 +375,10 @@
|
|||
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnSysSet" OnClientClick="parent.removeActiveTab();">
|
||||
</f:Button>
|
||||
</div>
|
||||
<div class="nav-bar exit"><a href="javascript:void(0);" style="color: #ffffff;" onclick="onToolSignOutClick()">
|
||||
<div class="nav-bar exit"><a href="javascript:void(0);" style="color: #ffffff;font-size:.25rem;" onclick="onToolSignOutClick()">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,quit%>" /></a></div>
|
||||
<div class="nav-bar full">
|
||||
<div class="t-btn1 icon-quanping_o ab" style="cursor: pointer"><span style="color: #fff">
|
||||
<div class="t-btn1 icon-quanping_o ab" style="cursor: pointer"><span style="color: #fff; font-size:.25rem;">
|
||||
<asp:Literal runat="server" Text="<%$ Resources:Lan,FullScreen%>" /></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -66,9 +66,12 @@
|
|||
|
||||
.anq-inner>.anq-inner-b>.anq-inner-b-val{
|
||||
margin-top: .125rem;
|
||||
font-size: .25rem;
|
||||
font-size: .4rem;
|
||||
}
|
||||
.anq-inner>.anq-inner-b>.anq-inner-b-val>span:nth-child(2){
|
||||
.anq-inner > .anq-inner-b > .anq-inner-b-text {
|
||||
font-size: .3rem;
|
||||
}
|
||||
.anq-inner>.anq-inner-b>.anq-inner-b-val>span:nth-child(2){
|
||||
margin-left: .05rem;
|
||||
font-size: .175rem;
|
||||
}
|
||||
|
@ -91,8 +94,8 @@
|
|||
padding: .05rem;
|
||||
}
|
||||
.lw-tit > .lw-item > .lw-item-lab {
|
||||
font-size: .175rem;
|
||||
height: .25rem;
|
||||
font-size: .3rem;
|
||||
height: .4rem;
|
||||
color: #A9DDEE;
|
||||
border-bottom: 1px solid #00BEFF;
|
||||
width: 100%;
|
||||
|
@ -106,7 +109,7 @@
|
|||
|
||||
|
||||
.lw-tit > .lw-item > .lw-item-val {
|
||||
height: calc(100% - .25rem);
|
||||
height: calc(100% - .4rem);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
|
|
@ -101203,6 +101203,8 @@ namespace Model
|
|||
|
||||
private System.Nullable<decimal> _RQuantity;
|
||||
|
||||
private string _Ghfs;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
@ -101251,6 +101253,8 @@ namespace Model
|
|||
partial void OnReturnSheetSIDChanged();
|
||||
partial void OnRQuantityChanging(System.Nullable<decimal> value);
|
||||
partial void OnRQuantityChanged();
|
||||
partial void OnGhfsChanging(string value);
|
||||
partial void OnGhfsChanged();
|
||||
#endregion
|
||||
|
||||
public Cl_w_comp()
|
||||
|
@ -101698,6 +101702,26 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="ghfs", Storage="_Ghfs", DbType="NVarChar(10)")]
|
||||
public string Ghfs
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Ghfs;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Ghfs != value))
|
||||
{
|
||||
this.OnGhfsChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Ghfs = value;
|
||||
this.SendPropertyChanged("Ghfs");
|
||||
this.OnGhfsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
@ -104864,6 +104888,8 @@ namespace Model
|
|||
|
||||
private string _InstallationId;
|
||||
|
||||
private string _Ghfs;
|
||||
|
||||
private EntitySet<Cl_W_MaterialReturnS> _Cl_W_MaterialReturnS;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
|
@ -104908,6 +104934,8 @@ namespace Model
|
|||
partial void OnUAidChanged();
|
||||
partial void OnInstallationIdChanging(string value);
|
||||
partial void OnInstallationIdChanged();
|
||||
partial void OnGhfsChanging(string value);
|
||||
partial void OnGhfsChanged();
|
||||
#endregion
|
||||
|
||||
public Cl_W_MaterialReturnM()
|
||||
|
@ -105296,6 +105324,26 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="ghfs", Storage="_Ghfs", DbType="NVarChar(10)", UpdateCheck=UpdateCheck.Never)]
|
||||
public string Ghfs
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Ghfs;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Ghfs != value))
|
||||
{
|
||||
this.OnGhfsChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Ghfs = value;
|
||||
this.SendPropertyChanged("Ghfs");
|
||||
this.OnGhfsChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CL_W_MAT_REFERENCE_CL_W_MAT", Storage="_Cl_W_MaterialReturnS", ThisKey="ReturnSheetMid", OtherKey="ReturnSheetMid", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Cl_W_MaterialReturnS> Cl_W_MaterialReturnS
|
||||
{
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
using Aspose.Words;
|
||||
using BLL;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using Model;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/*
|
||||
* 物资管理的一些基础信息
|
||||
* **/
|
||||
public class MaterialsBasicsController : ApiController
|
||||
{
|
||||
#region 获取单位列表
|
||||
public Model.ResponeData GetUnitList(string projectId, string keyWord = "" )
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyWord))
|
||||
{
|
||||
keyWord = ""; // 明确使用默认值
|
||||
}
|
||||
var list = Funs.DB.Cl_b_unitapp.Where(x => x.ProjectId == projectId && x.UAName.Contains(keyWord)).ToList();
|
||||
responeData.data = list;
|
||||
|
||||
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取专业
|
||||
public Model.ResponeData getInstallationList(string projectId, string keyWord = "")
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyWord))
|
||||
{
|
||||
keyWord = ""; // 明确使用默认值
|
||||
}
|
||||
responeData.data = Funs.DB.Cl_b_Installation.Where(x => x.ProjectId == projectId&&x.InstallationName.Contains(keyWord))
|
||||
.Select(x => new {
|
||||
x.InstallationId,
|
||||
x.InstallationCode,
|
||||
x.InstallationName,
|
||||
}).ToList();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 物资工区
|
||||
public Model.ResponeData getSpecialityList(string projectId, string keyWord = "")
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(keyWord))
|
||||
{
|
||||
keyWord = ""; // 明确使用默认值
|
||||
}
|
||||
responeData.data = Funs.DB.CL_B_Speciality.Where(x => x.ProjectId == projectId && x.SpecialityName.Contains(keyWord))
|
||||
.Select(x => new {
|
||||
x.Specialityid,
|
||||
x.SpecialityCode,
|
||||
x.SpecialityName
|
||||
}).ToList();
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取材料明细
|
||||
public Model.ResponeData GetMaterialsBySystemCode(string ProjectId, string code)
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
responeData.data = (
|
||||
from cl in Funs.DB.Cl_w_comp
|
||||
join bm in Funs.DB.CL_B_Material on cl.MaterialID equals bm.MaterialID
|
||||
join bi in Funs.DB.Cl_b_Installation on cl.InstallationId equals bi.InstallationId
|
||||
where cl.ProjectId == ProjectId
|
||||
select new
|
||||
{
|
||||
ProjectId = cl.ProjectId, // 项目ID
|
||||
InstallationId = cl.InstallationId, // 专业ID
|
||||
Installationname = bi.InstallationName, // 专业名称
|
||||
ghfs = cl.Ghfs, // 采购方类别
|
||||
MaterialID = bm.MaterialID, // 物资ID
|
||||
MaterialName = bm.MaterialName, // 物资名称
|
||||
Specificationtype = bm.Specificationtype, // 规格
|
||||
TechnicalConditions = bm.TechnicalConditions,
|
||||
StandardSpecification = bm.StandardSpecification,
|
||||
MaterialQuality = bm.MaterialQuality,
|
||||
Unit = bm.Unit, // 单位
|
||||
SystemCode = bm.SystemCode, // 编号
|
||||
AreaCode = cl.TAreaMaterialMID, // 工区
|
||||
jh_quantity = cl.Pquantity, // 计划量
|
||||
ck_quantity = cl.Pquantity - cl.OQuantity, // 最大允许出库量
|
||||
kc_quantity = cl.SQuantity - cl.OQuantity + cl.RQuantity - cl.HQuantity // 库存量
|
||||
}
|
||||
).FirstOrDefault(x=>x.SystemCode == code);
|
||||
}
|
||||
catch ( System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取材料列表
|
||||
public Model.ResponeData GetMaterialsList(string ProjectId, string InstallationId, string ghfs, string area)
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
var list = (
|
||||
from cl in Funs.DB.Cl_w_comp
|
||||
join bm in Funs.DB.CL_B_Material on cl.MaterialID equals bm.MaterialID
|
||||
join bi in Funs.DB.Cl_b_Installation on cl.InstallationId equals bi.InstallationId
|
||||
where cl.ProjectId == ProjectId && cl.InstallationId == InstallationId && cl.Ghfs == ghfs && cl.TAreaMaterialMID == area
|
||||
select new
|
||||
{
|
||||
ProjectId = cl.ProjectId, // 项目ID
|
||||
InstallationId = cl.InstallationId, // 专业ID
|
||||
Installationname = bi.InstallationName, // 专业名称
|
||||
ghfs = cl.Ghfs, // 采购方类别
|
||||
MaterialID = bm.MaterialID, // 物资ID
|
||||
MaterialName = bm.MaterialName, // 物资名称
|
||||
Specificationtype = bm.Specificationtype, // 规格
|
||||
TechnicalConditions = bm.TechnicalConditions,
|
||||
StandardSpecification = bm.StandardSpecification,
|
||||
MaterialQuality = bm.MaterialQuality,
|
||||
Unit = bm.Unit, // 单位
|
||||
SystemCode = bm.SystemCode, // 编号
|
||||
AreaCode = cl.TAreaMaterialMID, // 工区
|
||||
jh_quantity = cl.Pquantity, // 计划量
|
||||
ck_quantity = cl.Pquantity - cl.OQuantity, // 最大允许出库量
|
||||
kc_quantity = cl.SQuantity - cl.OQuantity + cl.RQuantity - cl.HQuantity // 库存量
|
||||
}
|
||||
).ToList();
|
||||
responeData.data = list;
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
/**
|
||||
* 物资出库
|
||||
*/
|
||||
public class MaterialsOutController : ApiController
|
||||
{
|
||||
|
||||
|
||||
#region 添加物资出库主表
|
||||
[HttpPost]
|
||||
public Model.ResponeData AddMaterialOutM(Model.Cl_W_MaterialOutM MaterialOutM)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int count = db.Cl_W_MaterialOutM.Where(x => x.UserTime == DateTime.Now).ToList().Count();
|
||||
Model.Cl_W_MaterialOutM outm = new Model.Cl_W_MaterialOutM();
|
||||
|
||||
outm.OutSheetMID = MaterialOutM.OutSheetMID;
|
||||
outm.ProjectId = MaterialOutM.ProjectId;
|
||||
outm.OutSheetCode = string.Format("CKD--{0}{1}", DateTime.Now.ToString("yyyyMMdd"),count.ToString("000"));
|
||||
outm.UserTime = DateTime.Now;
|
||||
outm.UnitId = MaterialOutM.UnitId;
|
||||
outm.UAid = MaterialOutM.UAid;
|
||||
outm.InstallationId = MaterialOutM.InstallationId;
|
||||
outm.PlanSheetMID = MaterialOutM.PlanSheetMID; // 工区ID
|
||||
outm.YYPID = MaterialOutM.YYPID;
|
||||
outm.RecordMan = MaterialOutM.RecordMan;
|
||||
db.Cl_W_MaterialOutM.InsertOnSubmit(outm);
|
||||
db.SubmitChanges();
|
||||
responeData.data = MaterialOutM.OutSheetMID;
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 添加物资子表
|
||||
[HttpPost]
|
||||
public Model.ResponeData AddMaterialOutS(Model.Cl_W_MaterialOutS MaterialOutS)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int count = db.Cl_W_MaterialOutM.Where(x => x.UserTime == DateTime.Now).ToList().Count();
|
||||
Model.Cl_W_MaterialOutS outs = new Model.Cl_W_MaterialOutS();
|
||||
|
||||
outs.ProjectId = MaterialOutS.ProjectId;
|
||||
outs.OutSheetMID = MaterialOutS.OutSheetMID;
|
||||
outs.OutSheetSID = Guid.NewGuid().ToString();
|
||||
outs.MaterialID = MaterialOutS.MaterialID;
|
||||
//outs.Soft = MaterialOutS.Soft ?? DBNull.Value;
|
||||
outs.PlannedQuantity = MaterialOutS.PlannedQuantity;
|
||||
outs.StoreQuantity = MaterialOutS.StoreQuantity;
|
||||
outs.OutQuantity = MaterialOutS.OutQuantity;
|
||||
outs.OutQuantityY = MaterialOutS.OutQuantityY;
|
||||
outs.StorePQuantity = MaterialOutS.StorePQuantity;
|
||||
outs.CertificatesFactoryNo = MaterialOutS.CertificatesFactoryNo;
|
||||
outs.FurnaceBatchNo = MaterialOutS.FurnaceBatchNo;
|
||||
outs.CertificateSelfNo = MaterialOutS.CertificateSelfNo;
|
||||
outs.Weight = MaterialOutS.Weight;
|
||||
outs.Price = MaterialOutS.Price;
|
||||
outs.OutQuantityP = MaterialOutS.OutQuantityP;
|
||||
outs.OutQuantityO = MaterialOutS.OutQuantityO;
|
||||
outs.StorehouseName = MaterialOutS.StorehouseName;
|
||||
outs.StorageSheetSID = MaterialOutS.StorageSheetSID;
|
||||
outs.FirstpartyCode = MaterialOutS.FirstpartyCode;
|
||||
outs.ISupload = MaterialOutS.ISupload;
|
||||
outs.InstallationId = MaterialOutS.InstallationId;
|
||||
outs.Shue = MaterialOutS.Shue;
|
||||
outs.Bhsje = MaterialOutS.Bhsje;
|
||||
|
||||
db.Cl_W_MaterialOutS.InsertOnSubmit(outs);
|
||||
db.SubmitChanges();
|
||||
responeData.data = MaterialOutS.OutSheetSID;
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = ex.Message;
|
||||
}
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
|
@ -176,6 +176,8 @@
|
|||
<Compile Include="Controllers\HSSE\SafetyResponsibilitiesController.cs" />
|
||||
<Compile Include="Controllers\HSSE\TrainTestRecordController.cs" />
|
||||
<Compile Include="Controllers\MaterialEntranceAndExitController.cs" />
|
||||
<Compile Include="Controllers\MaterialsBasicsController.cs" />
|
||||
<Compile Include="Controllers\MaterialsOutController.cs" />
|
||||
<Compile Include="Controllers\Person\PersonCheckController.cs" />
|
||||
<Compile Include="Controllers\CQMS\CheckEquipmentController.cs" />
|
||||
<Compile Include="Controllers\CQMS\CheckListController.cs" />
|
||||
|
@ -283,6 +285,8 @@
|
|||
<Folder Include="Models\" />
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
<Folder Include="Views\Login\" />
|
||||
<Folder Include="Views\MaterialsBasics\" />
|
||||
<Folder Include="Views\MaterialsOut\" />
|
||||
<Folder Include="Views\Vehicle\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue