This commit is contained in:
parent
63eb85a30f
commit
74312cd9d3
|
@ -165,7 +165,7 @@ namespace BLL.API
|
|||
if (!string.IsNullOrEmpty(unitStoreId))
|
||||
{
|
||||
q = (from x in db.Weld_WeldInfo
|
||||
where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.UsingAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false)
|
||||
where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == x.WeldId select y.Amount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false)
|
||||
orderby x.WeldCode
|
||||
select x).ToList();
|
||||
}
|
||||
|
|
|
@ -54,7 +54,8 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
|
|||
FROM dbo.Weld_WeldInfo weld
|
||||
LEFT JOIN Weld_WeldType AS weldType ON weldType.WeldTypeId =weld.WeldTypeId
|
||||
WHERE 1 = 1 and (weld.IsLock is null or weld.IsLock=0)
|
||||
and (select (SUM(ISNULL(stockIn.Amount,0))-SUM(ISNULL(stockIn.UsingAmount,0))) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
|
||||
and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
|
||||
//and (select (SUM(ISNULL(stockIn.Amount,0))-SUM(ISNULL(stockIn.UsingAmount,0))) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
listStr.Add(new SqlParameter("@UnitStoreId", Request.Params["unitStoreId"]));
|
||||
|
@ -158,7 +159,17 @@ and (select (SUM(ISNULL(stockIn.Amount,0))-SUM(ISNULL(stockIn.UsingAmount,0))) f
|
|||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
string itemsString = this.Grid1.SelectedRowID;
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
string unitStoreId = Request.Params["unitStoreId"];
|
||||
var q = from x in db.Weld_WeldInfo
|
||||
where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == itemsString select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == itemsString select y.UsingAmount ?? 0).Sum() + (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == itemsString select y.RecycleAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false)
|
||||
orderby x.WeldCode
|
||||
select x;
|
||||
if (q.Count() == 0)
|
||||
{
|
||||
Alert.ShowInTop("所选焊材无库存,请联系仓库保管员!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(itemsString)
|
||||
+ ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
|
|||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = from x in db.Weld_WeldInfo
|
||||
where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.UsingAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false)
|
||||
where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.UsingAmount ?? 0).Sum() + (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == usingPlan.WeldId select y.RecycleAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false)
|
||||
orderby x.WeldCode
|
||||
select x;
|
||||
if (q.Count() == 0)
|
||||
|
|
|
@ -84,6 +84,37 @@ namespace WebAPI.Controllers
|
|||
return respone;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public Model.ResponeData isHaveWeld(string welderId, string unitStoreId)
|
||||
{
|
||||
Model.ResponeData respone = new ResponeData();
|
||||
try
|
||||
{
|
||||
Model.SGGLDB db = BLL.Funs.DB;
|
||||
var q = from x in db.Weld_WeldInfo
|
||||
where (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == welderId select y.Amount ?? 0).Sum() - (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == welderId select y.UsingAmount ?? 0).Sum() + (from y in db.Weld_StockIn where y.UnitStoreId == unitStoreId && y.WeldId == welderId select y.RecycleAmount ?? 0).Sum() > 0 && (x.IsLock == null || x.IsLock == false)
|
||||
orderby x.WeldCode
|
||||
select x;
|
||||
if (q.Count() == 0)
|
||||
{
|
||||
respone.code = 0;
|
||||
respone.message = "所选焊材无库存,请联系仓库保管员!";
|
||||
return respone;
|
||||
}
|
||||
else
|
||||
{
|
||||
respone.code = 1;
|
||||
return respone;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
respone.code = 0;
|
||||
respone.message = e.Message;
|
||||
}
|
||||
return respone;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public Model.ResponeData addUsingPlan([FromBody] UsingPlanItem usingPlan)
|
||||
{
|
||||
|
|
|
@ -79,13 +79,13 @@
|
|||
<publishTime>09/10/2013 16:29:20</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll">
|
||||
<publishTime>07/24/2025 16:36:52</publishTime>
|
||||
<publishTime>07/25/2025 08:51:11</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.dll.config">
|
||||
<publishTime>07/03/2024 11:01:05</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BLL.pdb">
|
||||
<publishTime>07/24/2025 16:36:52</publishTime>
|
||||
<publishTime>07/25/2025 08:51:11</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||
<publishTime>12/17/2020 21:32:28</publishTime>
|
||||
|
@ -115,10 +115,10 @@
|
|||
<publishTime>07/25/2012 11:48:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.dll">
|
||||
<publishTime>07/24/2025 16:36:51</publishTime>
|
||||
<publishTime>07/25/2025 08:51:10</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.pdb">
|
||||
<publishTime>07/24/2025 16:36:51</publishTime>
|
||||
<publishTime>07/25/2025 08:51:10</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Newtonsoft.Json.dll">
|
||||
<publishTime>02/18/2018 09:44:54</publishTime>
|
||||
|
@ -316,10 +316,10 @@
|
|||
<publishTime>02/01/2018 12:20:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.dll">
|
||||
<publishTime>07/24/2025 16:36:53</publishTime>
|
||||
<publishTime>07/25/2025 08:51:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebAPI.pdb">
|
||||
<publishTime>07/24/2025 16:36:53</publishTime>
|
||||
<publishTime>07/25/2025 08:51:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/WebGrease.dll">
|
||||
<publishTime>01/23/2014 13:57:34</publishTime>
|
||||
|
@ -445,7 +445,7 @@
|
|||
<publishTime>07/03/2024 11:01:07</publishTime>
|
||||
</File>
|
||||
<File Include="Web.config">
|
||||
<publishTime>07/24/2025 16:37:05</publishTime>
|
||||
<publishTime>07/25/2025 08:51:20</publishTime>
|
||||
</File>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue