Browse Source

撤销删除产品信息

master
songnan.zhang 3 years ago
parent
commit
6bc7f049d4
  1. 21
      APP/QMAPP.Web/App_Data/MainPower.xml
  2. 21
      APP/QMAPP.Web/App_Data/Menu.xml
  3. 18
      APPQ5/QMAPP.FJC.BLL/Operation/ProductBLL.cs
  4. 11
      APPQ5/QMAPP.FJC.DAL/Operation/ProductDAL.cs
  5. 21
      APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml
  6. 28
      APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs
  7. 5
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

21
APP/QMAPP.Web/App_Data/MainPower.xml

@ -292,27 +292,24 @@
<PowerInfo PowerID="CD14050000" PowerDes="料筒信息" PowerType="" ActionList="" Visible="true" Seq="1" SuperID="CD14000000"/>
<PowerInfo PowerID="CD14050001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14050004" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14050002" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14050003" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14050002" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14050003" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14050004" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14050000"/>
<PowerInfo PowerID="CD14090000" PowerDes="料筒绑定" PowerType="" ActionList="" Visible="true" Seq="1" SuperID="CD14000000"/>
<PowerInfo PowerID="CD14090001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14090004" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14090002" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14090003" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14090002" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14090003" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14090004" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14090000"/>
<PowerInfo PowerID="CD14080000" PowerDes="零件号绑定" PowerType="" ActionList="" Visible="true" Seq="1" SuperID="CD14000000"/>
<PowerInfo PowerID="CD14080001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14080004" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14080002" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14080003" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14080002" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14080003" PowerDes="修改" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14080004" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14080000"/>
<PowerInfo PowerID="CD14060000" PowerDes="注塑投料查询" PowerType="" ActionList="" Visible="true" Seq="1" SuperID="CD14000000"/>
<PowerInfo PowerID="CD14060001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD14060000"/>
<PowerInfo PowerID="CD14060004" PowerDes="添加" PowerType="button" ActionList="" Visible="true" Seq="2" SuperID="CD14060000"/>
<PowerInfo PowerID="CD14060002" PowerDes="修改批次号" PowerType="button" ActionList="" Visible="true" Seq="3" SuperID="CD14060000"/>
<PowerInfo PowerID="CD14060003" PowerDes="删除" PowerType="button" ActionList="" Visible="true" Seq="4" SuperID="CD14060000"/>
<PowerInfo PowerID="CD14070000" PowerDes="注塑打印记录" PowerType="" ActionList="" Visible="true" Seq="1" SuperID="CD14000000"/>
<PowerInfo PowerID="CD14070001" PowerDes="查询" PowerType="button" ActionList="" Visible="true" Seq="1" SuperID="CD14070000"/>

21
APP/QMAPP.Web/App_Data/Menu.xml

@ -489,34 +489,31 @@
<MenuItem MenuID="14050000" SystemID="FJC" MenuDes="料筒信息" Action="/BucketInfo/List" Target="url" PowerID="CD14050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketInfo" ActionName="List" PowerID="CD14050001">查询</Action>
<Action ContorllerName="BucketInfo" ActionName="Add" PowerID="CD14050004">添加</Action>
<Action ContorllerName="BucketInfo" ActionName="Update" PowerID="CD14050002">修改</Action>
<Action ContorllerName="BucketInfo" ActionName="Delete" PowerID="CD14050003">删除</Action>
<Action ContorllerName="BucketInfo" ActionName="Add" PowerID="CD14050002">添加</Action>
<Action ContorllerName="BucketInfo" ActionName="Edit" PowerID="CD14050003">修改</Action>
<Action ContorllerName="BucketInfo" ActionName="Delete" PowerID="CD14050004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14090000" SystemID="FJC" MenuDes="料筒绑定" Action="/BucketMaterial/List" Target="url" PowerID="CD14090000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketMaterial" ActionName="List" PowerID="CD14090001">查询</Action>
<Action ContorllerName="BucketMaterial" ActionName="Add" PowerID="CD14090004">添加</Action>
<Action ContorllerName="BucketMaterial" ActionName="Update" PowerID="CD14090002">修改</Action>
<Action ContorllerName="BucketMaterial" ActionName="Delete" PowerID="CD14090003">删除</Action>
<Action ContorllerName="BucketMaterial" ActionName="Add" PowerID="CD14090002">添加</Action>
<Action ContorllerName="BucketMaterial" ActionName="Edit" PowerID="CD14090003">修改</Action>
<Action ContorllerName="BucketMaterial" ActionName="Delete" PowerID="CD14090004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14080000" SystemID="FJC" MenuDes="零件号绑定" Action="/BucketMaterialClass/List" Target="url" PowerID="CD14080000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketMaterialClass" ActionName="List" PowerID="CD14080001">查询</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Add" PowerID="CD14080004">添加</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Update" PowerID="CD14080002">修改</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Delete" PowerID="CD14080003">删除</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Add" PowerID="CD14080002">添加</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Edit" PowerID="CD14080003">修改</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Delete" PowerID="CD14080004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14060000" SystemID="FJC" MenuDes="注塑投料查询" Action="/RawMaterial/List" Target="url" PowerID="CD14060000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="RawMaterial" ActionName="List" PowerID="CD14060001">查询</Action>
<Action ContorllerName="RawMaterial" ActionName="Add" PowerID="CD14060004">添加</Action>
<Action ContorllerName="RawMaterial" ActionName="Update" PowerID="CD14060002">修改批次号</Action>
<Action ContorllerName="RawMaterial" ActionName="Delete" PowerID="CD14060003">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14070000" SystemID="FJC" MenuDes="注塑打印记录" Action="/RawMaterialRecord/List" Target="url" PowerID="CD14070000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">

18
APPQ5/QMAPP.FJC.BLL/Operation/ProductBLL.cs

@ -1758,6 +1758,24 @@ namespace QMAPP.FJC.BLL.Operation
throw ex;
}
}
public int DeleteProduct(string ProductCode, string machineCode)
{
try
{
return new ProductDAL().DeleteProduct(ProductCode, machineCode);
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "零件条码--获取零件信息"
});
throw ex;
}
}
#endregion
#region 导出数据

11
APPQ5/QMAPP.FJC.DAL/Operation/ProductDAL.cs

@ -1318,6 +1318,17 @@ namespace QMAPP.FJC.DAL.Operation
}
}
public int DeleteProduct(string ProductCode, string machineCode)
{
var count = 0;
var sqlBuilder = $"delete T_AW_Product Where PRODUCTCODE = '{ProductCode}' and MACHINECODDE = '{machineCode}'";
List<DataParameter> parameters = new List<DataParameter>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray()));
}
return count;
}
#endregion
#region 导入

21
APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml

@ -489,34 +489,31 @@
<MenuItem MenuID="14050000" SystemID="FJC" MenuDes="料筒信息" Action="/BucketInfo/List" Target="url" PowerID="CD14050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketInfo" ActionName="List" PowerID="CD14050001">查询</Action>
<Action ContorllerName="BucketInfo" ActionName="Add" PowerID="CD14050004">添加</Action>
<Action ContorllerName="BucketInfo" ActionName="Update" PowerID="CD14050002">修改</Action>
<Action ContorllerName="BucketInfo" ActionName="Delete" PowerID="CD14050003">删除</Action>
<Action ContorllerName="BucketInfo" ActionName="Add" PowerID="CD14050002">添加</Action>
<Action ContorllerName="BucketInfo" ActionName="Edit" PowerID="CD14050003">修改</Action>
<Action ContorllerName="BucketInfo" ActionName="Delete" PowerID="CD14050004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14090000" SystemID="FJC" MenuDes="料筒绑定" Action="/BucketMaterial/List" Target="url" PowerID="CD14090000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketMaterial" ActionName="List" PowerID="CD14090001">查询</Action>
<Action ContorllerName="BucketMaterial" ActionName="Add" PowerID="CD14090004">添加</Action>
<Action ContorllerName="BucketMaterial" ActionName="Update" PowerID="CD14090002">修改</Action>
<Action ContorllerName="BucketMaterial" ActionName="Delete" PowerID="CD14090003">删除</Action>
<Action ContorllerName="BucketMaterial" ActionName="Add" PowerID="CD14090002">添加</Action>
<Action ContorllerName="BucketMaterial" ActionName="Edit" PowerID="CD14090003">修改</Action>
<Action ContorllerName="BucketMaterial" ActionName="Delete" PowerID="CD14090004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14080000" SystemID="FJC" MenuDes="零件号绑定" Action="/BucketMaterialClass/List" Target="url" PowerID="CD14080000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketMaterialClass" ActionName="List" PowerID="CD14080001">查询</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Add" PowerID="CD14080004">添加</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Update" PowerID="CD14080002">修改</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Delete" PowerID="CD14080003">删除</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Add" PowerID="CD14080002">添加</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Edit" PowerID="CD14080003">修改</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Delete" PowerID="CD14080004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14060000" SystemID="FJC" MenuDes="注塑投料查询" Action="/RawMaterial/List" Target="url" PowerID="CD14060000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="RawMaterial" ActionName="List" PowerID="CD14060001">查询</Action>
<Action ContorllerName="RawMaterial" ActionName="Add" PowerID="CD14060004">添加</Action>
<Action ContorllerName="RawMaterial" ActionName="Update" PowerID="CD14060002">修改批次号</Action>
<Action ContorllerName="RawMaterial" ActionName="Delete" PowerID="CD14060003">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14070000" SystemID="FJC" MenuDes="注塑打印记录" Action="/RawMaterialRecord/List" Target="url" PowerID="CD14070000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">

28
APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs

@ -106,6 +106,9 @@ namespace QMAPP.WinForm.Forms.Operation
private string _AutoMachineCode = string.Empty; //自动扫码的配置设备编号
private string _DeleteProductLoc = string.Empty; //撤销按钮删除产品信息触发工位
private string _DeleteProductDaiCode = string.Empty; //撤销按钮删除产品信息触发采集点
#endregion
#region 窗体构造函数
@ -131,6 +134,9 @@ namespace QMAPP.WinForm.Forms.Operation
_371BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则371"];
_316BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则316"];
_DeleteProductLoc = GetAppConfigValue("DeleteProductLoc");
_DeleteProductDaiCode = GetAppConfigValue("DeleteProductDaiCode");
this.WindowState = FormWindowState.Maximized;
//this.CheckFile();
okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk;
@ -2413,6 +2419,18 @@ namespace QMAPP.WinForm.Forms.Operation
return;
}
var product_dai = "";
if (!string.IsNullOrEmpty(_DeleteProductDaiCode))
{
foreach (var d in daicache)
{
if (_DeleteProductDaiCode.Contains(d.DACode))
{
product_dai = d.DAValue;
}
}
}
var result = _agent.InvokeServiceFunction<DAResult>(B9IPCService.DAI_Rollback.ToString()
, new DAArgs
{
@ -2437,6 +2455,16 @@ namespace QMAPP.WinForm.Forms.Operation
}
SendRecoveryOrder(result.MouldCode);
DoResultActions(result);
//zhangsn 20220519 撤销删除产品信息
if (!string.IsNullOrEmpty(_DeleteProductLoc) && _DeleteProductLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE))
{
//删除产品信息
//ProductHelper.DeleteProduct(product_dai, _operationServiceParam.machineInfo.MACHINECODDE);
_agent.InvokeServiceFunction<DataResult<int>>(B9IPCService.ProductBLL_DeleteProduct.ToString(), product_dai, _operationServiceParam.machineInfo.MACHINECODDE);
}
DGView.Refresh();
DGViewColorBind();

5
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -4709,6 +4709,11 @@ namespace QMAPP.ServicesAgent
/// </summary>
ProductBLL_Insert,
/// <summary>
/// 删除产品信息
/// </summary>
ProductBLL_DeleteProduct,
#endregion
#region 查验

Loading…
Cancel
Save