Browse Source

保存

master
songnan.zhang 2 years ago
parent
commit
c8ed5c4c1f
  1. 40
      APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs
  2. 16
      APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs
  3. 13
      APPQ5/QMAPP.FJC.DAL/TianJin/TJDoorPlankPlanDAL.cs
  4. 5
      APPQ5/QMAPP.WinForm/App.config
  5. 51
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
  6. 23
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  7. 4
      APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
  8. 6
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

40
APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs

@ -257,7 +257,19 @@ namespace QMAPP.FJC.BLL.FIS
}
QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
//QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
model.ROUTE_CODE = "DP_ASSEMBLY_770B";
var listMatral = new TJDoorPlankPlanDAL();
var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE);
foreach (var MA in ListMachine)
{
if (MA.MATERIALNAME.Contains("左"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_770B";
else if(MA.MATERIALNAME.Contains("右"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_770B";
}
//model.ROUTE_CODE = "DP_ASSEMBLY_770B";
model.CREATEUSER = this.LoginUser.UserID;
model.CREATEDATE = DateTime.Now;
model.UPDATEUSER = model.CREATEUSER;
@ -907,7 +919,15 @@ namespace QMAPP.FJC.BLL.FIS
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
workOrder["WORKCELL_CODE"] = "PREPARE1";
if (info.ROUTE_CODE.Contains("DP_L"))
{
workOrder["WORKCELL_CODE"] = "DP_L_PREPARE1";
}
else if(info.ROUTE_CODE.Contains("DP_R"))
workOrder["WORKCELL_CODE"] = "DP_R_PREPARE1";
else
workOrder["WORKCELL_CODE"] = "PREPARE1";
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
workOrder["EQPT_NAME"] = "";
@ -1026,14 +1046,24 @@ namespace QMAPP.FJC.BLL.FIS
}
workOrder["QTY"] = 1;
workOrder["COMPLETE_QTY"] = 0;
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
workOrder["WORKCELL_CODE"] = "PREPARE1";
if (WEIZHI.Contains("左"))
{
workOrder["WORKCELL_CODE"] = "DP_L_PREPARE1";
}
else if (WEIZHI.Contains("右"))
{
workOrder["WORKCELL_CODE"] = "DP_R_PREPARE1";
}
else
{
workOrder["WORKCELL_CODE"] = "PREPARE1";
}
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
workOrder["EQPT_NAME"] = "";

16
APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs

@ -19,6 +19,7 @@ using QMFrameWork.Common.Util;
using QMAPP.FJC.Entity.FileCopy.FIS;
using QMAPP.FJC.Entity.TianJin;
using QMAPP.FJC.DAL.TianJin;
using QMAPP.FJC.Entity.Basic;
namespace QMAPP.FJC.BLL.TianJin
{
@ -1011,5 +1012,20 @@ namespace QMAPP.FJC.BLL.TianJin
}
#endregion
public List<Materiel> GetListMachine(string MaterielCode)
{
try
{
var dal = new TJDoorPlankPlanDAL();
return dal.GetAllMachine(MaterielCode);
}
catch
{
return null;
}
}
}
}

13
APPQ5/QMAPP.FJC.DAL/TianJin/TJDoorPlankPlanDAL.cs

@ -1050,6 +1050,19 @@ namespace QMAPP.FJC.DAL.TianJin
}
}
public List<Materiel> GetAllMachine(string MaterielCode)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
sql = $"SELECT MATERIAL_NAME as 'MATERIALNAME',MATERIAL_CODE as 'MATERIALNO' FROM [dbo].[T_MD_MATERIAL] where MATERIAL_CODE = '{MaterielCode}' ";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
var datatable = session.GetList<Materiel>(sql, parameters.ToArray()).ToList();
return datatable;
}
}
#endregion
}
}

5
APPQ5/QMAPP.WinForm/App.config

@ -207,11 +207,10 @@
</bindings>
<client>
<endpoint address="net.tcp://127.0.0.1:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />
<endpoint address="http://localhost:8938/GeneralService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="CenterGeneralService.IGeneralService" name="BasicHttpBinding_IGeneralService" />
<endpoint address="http://localhost:8938/LoginService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="LoginService.ILoginService" name="BasicHttpBinding_ILoginService" />
<endpoint address="net.tcp://127.0.0.1:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />
</client>
</system.serviceModel>

51
APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs

@ -77,7 +77,8 @@ namespace QMAPP.WinForm.Forms.TianJin
PlaceFirstPositionType = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionType"].ToString();
_barcodeRules = _agent.InvokeServiceFunction<List<BarcodeRules>>("BarcodeRulesBLL_GetListForSend");
//_barcodeRules = _agent.InvokeServiceFunction<List<BarcodeRules>>("BarcodeRulesBLL_GetListForSend");
_barcodeRules = _agent.InvokeServiceFunction<List<BarcodeRules>>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString());
_TJFYPrintName = GetAppConfigValue("FYPrintName"); //查找所有 需要自动填充的工位
}
@ -190,10 +191,10 @@ namespace QMAPP.WinForm.Forms.TianJin
DataTable tbl = agent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_GetList.ToString(), pFisType, WORKCENTER_CODE);
tbl.AcceptChanges();
var tblf = tbl.Select("MOULD_CODE = '左前'");
var tblr = tbl.Select("MOULD_CODE = '左后'");
var tbrf = tbl.Select("MOULD_CODE = '右前'");
var tbrr = tbl.Select("MOULD_CODE = '右后'");
//var tblf = tbl.Select("MOULD_CODE = '左前'");
//var tblr = tbl.Select("MOULD_CODE = '左后'");
//var tbrf = tbl.Select("MOULD_CODE = '右前'");
//var tbrr = tbl.Select("MOULD_CODE = '右后'");
//if (tb.Rows.Count > 0)
//{
@ -1287,14 +1288,14 @@ namespace QMAPP.WinForm.Forms.TianJin
}
}
string msgs = "";
CheckDataBase(inputstring,ref msgs); //检查T_PP_TJFY_WORKORDER 是否存在条码记录
if (!string.IsNullOrEmpty(msgs))
{
Alert("该条码已扫描!");
txtCode.Text = "";
txtCode.Focus();
return;
}
//CheckDataBase(inputstring,ref msgs); //检查T_PP_TJFY_WORKORDER 是否存在条码记录
//if (!string.IsNullOrEmpty(msgs))
//{
// Alert("该条码已扫描!");
// txtCode.Text = "";
// txtCode.Focus();
// return;
//}
foreach (var rule in _barcodeRules)
{
if (System.Text.RegularExpressions.Regex.IsMatch(inputstring, rule.REGEX))
@ -1304,6 +1305,12 @@ namespace QMAPP.WinForm.Forms.TianJin
strcarsetdesc_cn = rule.MATERIAL_TYPE;
}
}
List<Materiel> tbl = agent.InvokeServiceFunction<List<Materiel>>(QMAPP.ServicesAgent.FrmPlaceManage.TJDoorPlankPlanBLL_GetListMachine.ToString(), strprodno);
if (tbl.Count == 1)
strcarsetdesc_cn = tbl[0].MATERIALNAME;
strvin = inputstring;
CreateNFPaste(inputstring); //创建NF的贴车单以及明细
@ -1404,14 +1411,14 @@ namespace QMAPP.WinForm.Forms.TianJin
//判断当前扫描过的数据集合中是否有相同条码
string msg = "";
CheckDataBase(Code,ref msg);
if (!string.IsNullOrEmpty(msg))
{
Alert("该条码已扫描!");
txtCode.Text = "";
txtCode.Focus();
return;
}
//CheckDataBase(Code,ref msg);
//if (!string.IsNullOrEmpty(msg))
//{
// Alert("该条码已扫描!");
// txtCode.Text = "";
// txtCode.Focus();
// return;
//}
#endregion
#endregion
@ -1807,7 +1814,7 @@ namespace QMAPP.WinForm.Forms.TianJin
//pastdetail.KIN = strkin;
pastdetail.DGVROWINDEX = dgvrowindex;
pastdetail.LINENO = strcarsetdesc_cn.Substring(0,3);
pastdetail.LINENO = strvin.Substring(0,3);
pastdetail.MOULDCODE = strmouldcode;
nfpastecard.DetailsCardlist.Add(pastdetail);
nflist.Add(pastdetail);

23
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs

@ -506,7 +506,7 @@ namespace QMAPP.WinForm.Forms.TianJin
//变更打印状态 0=>1
_agent.InvokeServiceFunction<int>("WorkOrderBLL_SetOrderPrinted", orders[0].PID);
InsertProduct(labeldata.OrderNo, orders[0].MATERIAL_CODE);
InsertProduct(labeldata.OrderNo, orders[0].MATERIAL_CODE, comboBox1.SelectedValue.ToString());
BindPlanView();
tsbPrint.Enabled = true;
}
@ -534,7 +534,7 @@ namespace QMAPP.WinForm.Forms.TianJin
/// </summary>
/// <param name="ProductCode"></param>
/// <param name="Material_Code"></param>
public void InsertProduct(string ProductCode,string Material_Code)
public void InsertProduct(string ProductCode,string Material_Code,string prepare)
{
#region 组成新增产品实例
Product newProduct = new Product();
@ -560,10 +560,25 @@ namespace QMAPP.WinForm.Forms.TianJin
newProduct.CAPACITY = 1;
newProduct.USINGCOUNT = 0;
if (prepare.Contains("左"))
{
newProduct.WORKCELL_CODE = "DP_L_PREPARE1";
newProduct.WORKCELL_CODE = "PREPARE1";
newProduct.WORKLOC_CODE = "DP_L_PREPARELOC1";
}
else if (prepare.Contains("右"))
{
newProduct.WORKCELL_CODE = "DP_R_PREPARE1";
newProduct.WORKLOC_CODE = "DP_R_PREPARELOC1";
}
else
{
newProduct.WORKCELL_CODE = "PREPARE1";
newProduct.WORKLOC_CODE = "DP_PREPARELOC1";
}
newProduct.WORKLOC_CODE = "DP_PREPARELOC1";
newProduct.WORKCENTER_CODE = "WORK770B";

4
APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2022.06.23.02")]
[assembly: AssemblyFileVersion("2022.06.23.02")]
[assembly: AssemblyVersion("2022.07.15.02")]
[assembly: AssemblyFileVersion("2022.07.15.02")]

6
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -2039,6 +2039,12 @@ namespace QMAPP.ServicesAgent
[Description(" 添加贴车单")]
TJFrmPlaceBLL_AddPasteCard,
/// <summary>
/// 查询物料名称
/// </summary>
[Description(" 查询物料名称")]
TJDoorPlankPlanBLL_GetListMachine,
#endregion
/// <summary>

Loading…
Cancel
Save