diff --git a/APP/QMAPP.Web/Views/Home/Login.aspx b/APP/QMAPP.Web/Views/Home/Login.aspx
index 4276fcb..8ee0548 100644
--- a/APP/QMAPP.Web/Views/Home/Login.aspx
+++ b/APP/QMAPP.Web/Views/Home/Login.aspx
@@ -159,7 +159,7 @@
富维安道拓数字化工厂
- Adient CHENGDU Digital factory
+ Adient Digital factory
您未安装客户端打印控件,请进行-->
-
-
-
+
+
+
+
+
+
diff --git a/APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs b/APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs
index 4760d1d..7aa4e0d 100644
--- a/APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs
+++ b/APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs
@@ -540,7 +540,7 @@ namespace QMAPP.FJC.BLL.TianJin
}
#endregion
- #region 导入数据
+ #region 导入数据 --Web-导入计划
///
/// 导入Excel表数据
///
@@ -549,156 +549,79 @@ namespace QMAPP.FJC.BLL.TianJin
/// 工厂信息
/// 零件类别信息
/// 结果
- //public DataResult GetImportData(List list, Material materialmodel, QMAPP.FJC.Entity.Basic.MachineInfo machine, FJC.Entity.Basic.ProduceShift produceshiftmodel, QMAPP.MD.Entity.WorkCell workcellmodel)
- //{
- // DataResult result = new DataResult();
- // TJDoorPlankPlanDAL cmDal = new TJDoorPlankPlanDAL();
- // List List = new List();
- // int index = 0;
- // int num = 0;
- // try
- // {
- // result.Result = new ImportMessage();
- // result.Result.Errors = new List();
- // List materialinfo = null;
- // List produceshiftinfo = null;
- // List machineList = null;
- // using (IDataSession session = AppDataFactory.CreateMainSession())
- // {
- // ///获取物料信息
- // materialinfo = new QMAPP.MD.BLL.MaterialBLL().GetNewMaterialList(materialmodel,workcellmodel);
- // //获取班次信息
- // produceshiftinfo = new QMAPP.FJC.BLL.Basic.ProduceShiftBLL().GetWorkcenterShifts(workcellmodel.WORKCENTER_CODE);
- // //获取设备信息
- // machineList = new QMAPP.FJC.BLL.Basic.MachineInfoBLL().GetMachineForOrderList(machine, workcellmodel);
- // //状态判断
- // foreach (TJOrderPlan ma in list)
- // {
- // index++;
- // num++;
- // //物料
- // Material areaMes = materialinfo.Find(a => a.MATERIAL_CODE == ma.MATERIAL_CODE);
- // if (areaMes != null)
- // {
- // ma.MATERIAL_CODE = areaMes.MATERIAL_CODE;
- // }
- // else
- // {
- // ma.MATERIAL_CODE = null;
- // result.Result.Errors.Add(new RowError(index, "物料信息不存在"));
- // result.Result.failureNum += 1;
- // continue;
- // }
- // //班次
- // FJC.Entity.Basic.ProduceShift plantMes = produceshiftinfo.Find(p => p.PRODUCESHIFTTCODE == ma.SHIFT_CODE);
- // if (plantMes != null)
- // {
- // ma.SHIFT_CODE = plantMes.PRODUCESHIFTTCODE;
- // }
- // else
- // {
- // ma.SHIFT_CODE = null;
- // result.Result.Errors.Add(new RowError(index, "班次信息不存在"));
- // result.Result.failureNum += 1;
- // continue;
- // }
- // //转变生产要求PRODUCEREQUIRE
- // if (ma.PRODUCEREQUIRE != null)
- // {
- // if (ma.PRODUCEREQUIRE.Equals("以数量为准"))
- // {
- // ma.PRODUCEREQUIRE = "0";
- // }
- // else if (ma.PRODUCEREQUIRE.Equals("以时间为准"))
- // {
- // ma.PRODUCEREQUIRE = "1";
- // }
- // else
- // {
- // ma.PRODUCEREQUIRE = null;
- // result.Result.Errors.Add(new RowError(index, "生产要求信息错误"));
- // result.Result.failureNum += 1;
- // continue;
- // }
- // }
- // if (string.IsNullOrEmpty(ma.InfoError) == false)
- // {
- // ma.PID = null;
- // result.Result.failureNum += 1;
- // continue;
- // }
- // //修改改时根据主键等信息获取详细内容信息
- // TJOrderPlan oldInfo = cmDal.Get(ma);
- // if (oldInfo != null)
- // {
- // //更新
- // ma.PID = oldInfo.PID;
- // ma.PLAN_SEQ = oldInfo.PLAN_SEQ;
- // ma.FACTORY_CODE = oldInfo.FACTORY_CODE;
- // ma.WORKCENTER_CODE = oldInfo.WORKCENTER_CODE;
- // ma.PBOM_CODE = oldInfo.PBOM_CODE;
- // ma.ROUTE_CODE = oldInfo.ROUTE_CODE;
- // ma.PLAN_STATE = oldInfo.PLAN_STATE;
- // ma.PLANSOURCE = oldInfo.PLANSOURCE;
- // ma.CREATEUSER = oldInfo.CREATEUSER;
- // ma.CREATEDATE = oldInfo.CREATEDATE;
- // ma.UPDATEUSER = this.LoginUser.UserID;
- // ma.UPDATEDATE = oldInfo.UPDATEDATE;
- // ma.IsNewInfo = false;
- // result.Result.updateNum += 1;
- // }
- // else
- // {
- // //新增
- // oldInfo = new TJOrderPlan();
- // ma.PID = Guid.NewGuid().ToString();
- // ma.PLAN_NO = ma.PLAN_NO;
- // //int no = new TJDoorPlankPlanDAL().GetNum(ma) + (num - 1);
- // //ma.PLAN_SEQ = ma.PLAN_DATE.ToString("yyyyMMdd") + no;
- // ma.PLAN_STATE = EnumGeter.PLANSTATE.INIT.GetHashCode().ToString();
- // ma.MATERIAL_CODE = ma.MATERIAL_CODE;
- // ma.MACHINECODDE = ma.MACHINECODDE;
- // ma.QTY = ma.QTY;
- // //Pbom
- // Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = ma.MATERIAL_CODE });
- // ma.PBOM_CODE = pbomcode.PBOM_CODE;
- // //工艺路线
- // QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(ma.MATERIAL_CODE);
- // ma.ROUTE_CODE = routecode.ROUTE_CODE;
- // ma.PLAN_DATE = ma.PLAN_DATE;
- // ma.SHIFT_CODE = ma.SHIFT_CODE;
- // ma.PLANSOURCE = "1";
- // ma.PRODUCEREQUIRE = ma.PRODUCEREQUIRE;
- // ma.CREATEUSER = this.LoginUser.UserID;
- // ma.CREATEDATE = DateTime.Now;
- // ma.UPDATEUSER = ma.CREATEUSER;
- // ma.UPDATEDATE = ma.CREATEDATE;
- // //工作中心
- // string workcentercode = new WorkCellDAL().GetWorkcenter(workcellmodel.WORKCELL_CODE);
- // ma.WORKCENTER_CODE = workcentercode;
- // //工厂
- // string factory = new QMAPP.MD.DAL.FactoryDAL().GetFactoryWithWorkcenter(workcentercode);
- // ma.FACTORY_CODE = factory;
- // ma.IsNewInfo = true;
- // result.Result.insertNum += 1;
- // }
- // List.Add(ma);
- // }
- // }
- // //导入
- // cmDal.GetImportData(List);
- // result.Msg = "导入成功";
- // result.IsSuccess = true;
- // return result;
- // }
- // catch (Exception ex)
- // {
- // result.IsSuccess = false;
- // result.Ex = ex;
- // return result;
- // }
- //}
-
+ public DataResult GetImportData(List list, Material materialmodel, QMAPP.FJC.Entity.Basic.MachineInfo machine, FJC.Entity.Basic.ProduceShift produceshiftmodel, QMAPP.MD.Entity.WorkCell workcellmodel)
+ {
+ DataResult result = new DataResult();
+ TJDoorPlankPlanDAL cmDal = new TJDoorPlankPlanDAL();
+ List List = new List();
+ int index = 0;
+ int num = 0;
+ try
+ {
+ result.Result = new ImportMessage();
+ result.Result.Errors = new List();
+ using (IDataSession session = AppDataFactory.CreateMainSession())
+ {
+ //获取流水号 导入数据的顺序号 导入文件自己定义
+ //var SEQSTR = this.GetOrderPlanSeq(model);
+
+ foreach (TJOrderPlan ma in list)
+ {
+ index++;
+ num++;
+
+ //计划单号
+ ma.PLAN_NO = "DP" + ma.PLAN_DATE.ToString("yyyyMMdd") + ma.PLAN_SEQ.PadLeft(3,'0');
+
+ TJDoorPlankPlanDAL cmdDAL = new TJDoorPlankPlanDAL();
+ ma.MATERIAL_NAME = cmdDAL.GetMATERIALNAME(ma.MATERIAL_CODE);
+
+ //修改改时根据主键等信息获取详细内容信息
+ TJOrderPlan oldInfo = cmDal.Get(ma);
+ if (oldInfo != null)
+ {
+ //更新
+ ma.PID = oldInfo.PID;
+ ma.PLAN_SEQ = oldInfo.PLAN_SEQ;
+ ma.MATERIAL_CODE = oldInfo.MATERIAL_CODE;
+ ma.MATERIAL_NAME = oldInfo.MATERIAL_NAME;
+ ma.PLAN_STATE = oldInfo.PLAN_STATE;
+ ma.LINENO = oldInfo.LINENO;
+ ma.CREATEUSER = oldInfo.CREATEUSER;
+ ma.CREATEDATE = oldInfo.CREATEDATE;
+ ma.UPDATEUSER = this.LoginUser.UserID;
+ ma.UPDATEDATE = oldInfo.UPDATEDATE;
+ ma.IsNewInfo = false;
+ result.Result.updateNum += 1;
+ }
+ else
+ {
+ //新增
+ oldInfo = new TJOrderPlan();
+ ma.PID = Guid.NewGuid().ToString();
+ ma.PLAN_STATE = EnumGeter.PLANSTATE.INIT.GetHashCode().ToString();
+ ma.CREATEUSER = this.LoginUser.UserID;
+ ma.CREATEDATE = DateTime.Now;
+ ma.IsNewInfo = true;
+ result.Result.insertNum += 1;
+ }
+ List.Add(ma);
+ }
+ }
+ //导入
+ cmDal.GetImportData(List);
+ result.Msg = "导入成功";
+ result.IsSuccess = true;
+ return result;
+ }
+ catch (Exception ex)
+ {
+ result.IsSuccess = false;
+ result.Ex = ex;
+ return result;
+ }
+ }
+
#endregion
#region 获取产品表
diff --git a/APPQ5/QMAPP.FJC.BLL/TianJin/TJFrmPlaceBLL.cs b/APPQ5/QMAPP.FJC.BLL/TianJin/TJFrmPlaceBLL.cs
index 2073f52..c74c419 100644
--- a/APPQ5/QMAPP.FJC.BLL/TianJin/TJFrmPlaceBLL.cs
+++ b/APPQ5/QMAPP.FJC.BLL/TianJin/TJFrmPlaceBLL.cs
@@ -171,7 +171,7 @@ namespace QMAPP.FJC.BLL.TianJin
///
- /// 添加贴车单
+ /// 添加贴车单 -- 计划外发运
///
///
///
diff --git a/APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs b/APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs
index 998d661..53ae4cd 100644
--- a/APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs
+++ b/APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs
@@ -718,29 +718,6 @@ namespace QMAPP.FJC.DAL.TianJin
#region
try
{
- #region 判断是否出现底盘号情况
-
- if (ppastecard.DetailsCardlist.Count == 1)
- {
- ppastecard.VINLACK = "0";
- }
- else
- {
- int firstVin = Convert.ToInt32(ppastecard.DetailsCardlist[0].VIN.Substring(10, 7));
- int lastVin = Convert.ToInt32(ppastecard.DetailsCardlist[ppastecard.DetailsCardlist.Count - 1].VIN.Substring(10, 7));
- if ((lastVin - firstVin) == ppastecard.DetailsCardlist.Count - 1)
- {
- ppastecard.VINLACK = "0";
- }
- else
- {
- ppastecard.VINLACK = "1";
- }
- }
-
- #endregion
-
-
DataTable tbl = GetPastecardDeatis();
int strindex = 0;
int reindex = 0;
diff --git a/APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xlsx b/APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xlsx
new file mode 100644
index 0000000..c6e265c
Binary files /dev/null and b/APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xlsx differ
diff --git a/APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xml b/APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xml
new file mode 100644
index 0000000..5443331
--- /dev/null
+++ b/APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanController.cs b/APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanController.cs
index f12daeb..345012c 100644
--- a/APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanController.cs
+++ b/APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanController.cs
@@ -295,10 +295,10 @@ namespace QMAPP.FJC.Web.Controllers
try
{
- dt = this.GetTableByExcel("DoorPlankPlanImp", fileName, dt);
+ dt = this.GetTableByExcel("TJDoorPlankPlanImp", fileName, dt);
//格式转换
list = QMFrameWork.Common.Util.BindHelper.ConvertToList(dt).ToList();
- serviceResult = wcfAgent.InvokeServiceFunction>("DoorPlankPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell);
+ serviceResult = wcfAgent.InvokeServiceFunction>("TJDoorPlankPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell);
if (serviceResult.Ex != null)
{
throw serviceResult.Ex;
@@ -310,7 +310,7 @@ namespace QMAPP.FJC.Web.Controllers
dt.Rows[error.Key - 1]["InfoError"] = error.Value;
}
ImportMessageModel model = new ImportMessageModel();
- model.InfoName = "DoorPlankPlanImp";
+ model.InfoName = "TJDoorPlankPlanImp";
model.ReturnUrl = "/TJDoorPlankPlan/List?callBack=true";
model.Message = serviceResult.Result;
model.ErrorDt = dt;
@@ -347,8 +347,8 @@ namespace QMAPP.FJC.Web.Controllers
try
{
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/";
- string fileName = "DoorPlankPlanImp.xlsx";
- return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板信息导入模板.xlsx"));
+ string fileName = "TJDoorPlankPlanImp.xlsx";
+ return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板发运导入模板.xlsx"));
}
catch (Exception ex)
{
diff --git a/APPQ5/QMAPP.FJC.Web/Models/TianJin/TJDoorPlankPlanModel.cs b/APPQ5/QMAPP.FJC.Web/Models/TianJin/TJDoorPlankPlanModel.cs
index 4b47c8c..c150b2b 100644
--- a/APPQ5/QMAPP.FJC.Web/Models/TianJin/TJDoorPlankPlanModel.cs
+++ b/APPQ5/QMAPP.FJC.Web/Models/TianJin/TJDoorPlankPlanModel.cs
@@ -112,6 +112,7 @@ namespace QMAPP.FJC.Web.Models.TianJin
/// 创建用户
///
[Description("创建用户")]
+ [DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center, Hidden = true)]
public string CREATEUSER { get; set; }
@@ -119,7 +120,7 @@ namespace QMAPP.FJC.Web.Models.TianJin
/// 创建用户
///
[Description("创建用户")]
- [DGColumn(Sortable = true, Width = 100, DataAlign = DataAlign.left)]
+ [DGColumn(Sortable = true, Width = 100, DataAlign = DataAlign.left,Hidden = true)]
public string CREATEUSERNAME { get; set; }
diff --git a/APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj b/APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
index d8dcb07..544f2f9 100644
--- a/APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
+++ b/APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
@@ -428,6 +428,9 @@
Always
+
+ Always
+
Always
@@ -1302,6 +1305,9 @@
Always
+
+ Always
+
Always
diff --git a/APPQ5/QMAPP.FJC.Web/Temp/5fcea1f9-ea55-4d23-8b98-78541fafab73.xlsx b/APPQ5/QMAPP.FJC.Web/Temp/5fcea1f9-ea55-4d23-8b98-78541fafab73.xlsx
new file mode 100644
index 0000000..b61d00d
Binary files /dev/null and b/APPQ5/QMAPP.FJC.Web/Temp/5fcea1f9-ea55-4d23-8b98-78541fafab73.xlsx differ
diff --git a/APPQ5/QMAPP.FJC.Web/Temp/af9d4740-7223-4f5c-ad0c-8ffb489a1603.xlsx b/APPQ5/QMAPP.FJC.Web/Temp/af9d4740-7223-4f5c-ad0c-8ffb489a1603.xlsx
new file mode 100644
index 0000000..0189548
Binary files /dev/null and b/APPQ5/QMAPP.FJC.Web/Temp/af9d4740-7223-4f5c-ad0c-8ffb489a1603.xlsx differ
diff --git a/APPQ5/QMAPP.FJC.Web/Temp/f3271430-e5e1-4ca8-b78b-2351c788f148.xlsx b/APPQ5/QMAPP.FJC.Web/Temp/f3271430-e5e1-4ca8-b78b-2351c788f148.xlsx
new file mode 100644
index 0000000..9325c47
Binary files /dev/null and b/APPQ5/QMAPP.FJC.Web/Temp/f3271430-e5e1-4ca8-b78b-2351c788f148.xlsx differ
diff --git a/APPQ5/QMAPP.FJC.Web/Views/TJDoorPlankPlan/DoorPlankPlanList.aspx b/APPQ5/QMAPP.FJC.Web/Views/TJDoorPlankPlan/DoorPlankPlanList.aspx
index 448c090..1bd3ac7 100644
--- a/APPQ5/QMAPP.FJC.Web/Views/TJDoorPlankPlan/DoorPlankPlanList.aspx
+++ b/APPQ5/QMAPP.FJC.Web/Views/TJDoorPlankPlan/DoorPlankPlanList.aspx
@@ -181,9 +181,9 @@
<%=Html.QTButton("insertorder","Insert",QMFrameWork.WebUI.IconCls.add,"Insert()", QMAPP.Common.Web.SystemLimit.isLimt)%> --%>
<%=Html.QTButtonDelete("DoorPlankPlan", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("publish", "PutOut", "detail", "Publish()", QMAPP.Common.Web.SystemLimit.isLimt)%>
- <%-- <%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%>
- <%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>
- <%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%> --%>
+ <%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%>
+ <%-- <%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
+ <%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%>
diff --git a/APPQ5/QMAPP.FJC.Web/Web.config b/APPQ5/QMAPP.FJC.Web/Web.config
index 4818090..1038834 100644
--- a/APPQ5/QMAPP.FJC.Web/Web.config
+++ b/APPQ5/QMAPP.FJC.Web/Web.config
@@ -36,7 +36,10 @@
-
+
+
+
+
diff --git a/APPQ5/QMAPP.WinForm/App.config b/APPQ5/QMAPP.WinForm/App.config
index 84a3205..c6bfd5c 100644
--- a/APPQ5/QMAPP.WinForm/App.config
+++ b/APPQ5/QMAPP.WinForm/App.config
@@ -8,8 +8,11 @@
-
-
+
+
+
+
@@ -123,6 +126,7 @@
+
diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/RerportModel.ttx b/APPQ5/QMAPP.WinForm/Forms/TianJin/RerportModel.ttx
index 4c3e338..18752d5 100644
--- a/APPQ5/QMAPP.WinForm/Forms/TianJin/RerportModel.ttx
+++ b/APPQ5/QMAPP.WinForm/Forms/TianJin/RerportModel.ttx
@@ -8,3 +8,4 @@ CARSETDESCCN String 100
CP5A String 100
PASTECARDNO String 100
SCANDATE String 100
+PRODUCTCODE String 100
diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
index ee270df..7684142 100644
--- a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
+++ b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
@@ -45,6 +45,9 @@ namespace QMAPP.WinForm.Forms.TianJin
QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent();
List _barcodeRules = null;
public delegate void myMethodDelegate();
+
+ private string PlaceFirstPositionType = string.Empty;
+
#endregion
#region 变量
@@ -67,6 +70,9 @@ namespace QMAPP.WinForm.Forms.TianJin
public TJFrmPlace()
{
InitializeComponent();
+
+ PlaceFirstPositionType = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionType"].ToString();
+
_barcodeRules = _agent.InvokeServiceFunction>("BarcodeRulesBLL_GetListForSend");
}
#endregion
@@ -754,11 +760,11 @@ namespace QMAPP.WinForm.Forms.TianJin
//#region "隐藏了rb_hx 和rb_dx,全部根据pFisType判断,生产线的设置使用按钮进行设置"
if (pFisType == "01")
{
- strprodtype = "( 混 )";
+ strprodtype = "( 左 )";
}
else if (pFisType == "02")
{
- strprodtype = "( 单 )";
+ strprodtype = "( 右 )";
}
//提交数据处理
foreach (DataRow dr in tbl.Rows)
@@ -805,7 +811,7 @@ namespace QMAPP.WinForm.Forms.TianJin
nfpastecard.OPERATOR = ClientContext.LoginInfo.UserName.ToString();
// nfpastecard.
}
- int rowindex = agent.InvokeServiceFunction(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
+ int rowindex = agent.InvokeServiceFunction(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
// 打印处理
TJFrmCarCardPrintShow frm = new TJFrmCarCardPrintShow(nfpastecard, strprodtype, "手动");
frm.Owner = this;
@@ -813,23 +819,6 @@ namespace QMAPP.WinForm.Forms.TianJin
frm.ShowDialog();
isprint = frm.isprint;
}
- //if (isprint)
- //{
- // nfpastecard.DetailsCardlist = nflist;
- // nfindex = 0;
- // // BllFisOrder bllFisOrder = new BllFisOrder();
- // //int strindex = bllFisOrder.AddPasteCard(nfpastecard);
- // //QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
- // int strindex = agent.InvokeServiceFunction(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
- // TJPrintPasteCard prin = new TJPrintPasteCard();
- // prin.Print(strindex, nfpastecard, strprodtype);
- // GetInitData();
- // DGVRemoveRow(nflist, ref ncslist);
- // nflist = new List();
- // dgvNF.DataMember = null;
- // dgvNF.DataSource = nflist;
- // //computenfncs();
- //}
}
else
{
@@ -980,7 +969,7 @@ namespace QMAPP.WinForm.Forms.TianJin
nfpastecard.FailLog = log;
nfindex = 0;
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
- int rowindex = agent.InvokeServiceFunction(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddPasteCard.ToString(), nfpastecard);
+ int rowindex = agent.InvokeServiceFunction(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
//BllFisOrder bllFisOrder = new BllFisOrder();
//int rowindex = bllFisOrder.AddPasteCard(nfpastecard);
TJPrintPasteCard prin = new TJPrintPasteCard();
@@ -1040,7 +1029,7 @@ namespace QMAPP.WinForm.Forms.TianJin
if (openConfirmDialog
&& string.Equals(QMAPP.WinForm.Common.LocalSetting.Settings["AlertConfirmEnable", "0"], "1"))
{
- Common.frmAlertConfirm alertconfirm = new Common.frmAlertConfirm(message, "CD85010800");
+ Common.frmAlertConfirm alertconfirm = new Common.frmAlertConfirm(message, "85010800");
alertconfirm.StartPosition = FormStartPosition.CenterScreen;
alertconfirm.ShowDialog();
}
@@ -1126,21 +1115,20 @@ namespace QMAPP.WinForm.Forms.TianJin
dgvMATChange.Rows[temprowindex].Cells["STATE"].Value = "1";
-
- break;
+ temprowindex = dgvMATChange.Rows.Count;
}
else
{
SetContainerItem(nfindex, false);
Alert("条码错误:条码的零件号与FIS队列零件号不符合。");
- break;
+ return;
}
}
else
{
SetContainerItem(nfindex, false);
Alert("条码错误:条码已扫描或车型不符合。");
- break;
+ return;
}
}
@@ -1148,9 +1136,11 @@ namespace QMAPP.WinForm.Forms.TianJin
else
{
Alert("扫描条码重复,请重新扫描。");
+ return;
}
- SetContainerItem(nfindex, true);
+
CreateNFPaste(Code); //创建NF的贴车单以及明细
+ SetContainerItem(nfindex, true);
if (dgvMATChange.RowCount > 0)
{
dgvMATChange.FirstDisplayedScrollingRowIndex = nfindex - nfindex % 4;
@@ -1177,74 +1167,7 @@ namespace QMAPP.WinForm.Forms.TianJin
}
inputstring = txtCode.Text.ToUpper();
this.lberror.Text = null;
- #region 使用登录码快速切换用户
- //使用登录码快速切换用户
- //if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$"))
- //{
- // var ret = ClientContext.CodeLogin(txtCode.Text);
- // if (string.Equals(ret, "登录成功!"))
- // {
- // ClientContext.SetUserAuth(this);
- // }
- // lberror.Text = ret;
- // ArragetxtCode();
- // return;
- //}
-
-
- //if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text.ToUpper(), "^>CMD:\\w+$"))//扫描输入为指令码
- //{
- // ExcuteCMDCode();
- // txtCode.Text = "";
- // txtCode.Focus();
- // return;
- //}
-
- _CMDConfirm = "";
- #endregion
-
- //#region 原校验
- //string PastNOConfirmEnable = QMAPP.WinForm.Common.LocalSetting.Settings["PastNOConfirmEnable", "0"];
- //if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text.ToUpper(), "^" + WORKCENTER_CODE + "\\w+$"))//扫描输入为贴车单号
- //{
- // if (string.Equals("1", PastNOConfirmEnable)) //贴车单确认功能开启
- // {
- // GetLastPastCard();
- // if (string.Equals(txtCode.Text.ToUpper(), lblLastPastNO.Text.ToUpper()))
- // {
- // lberror.Text = "前车贴车单号确认完成!";
- // SetPastNOConfirm(1);
- // ArragetxtCode();
- // return;
- // }
- // else
- // {
- // lberror.Text = "前车贴车单号确认失败!";
- // SetPastNOConfirm(2);
- // ArragetxtCode();
- // return;
- // }
- // }
- // else
- // {
- // lberror.Text = "贴车单号确认功能未开启,无需扫描贴车单号!";
- // SetPastNOConfirm(0);
- // ArragetxtCode();
- // return;
- // }
- //}
-
- //if (string.Equals("1", PastNOConfirmEnable)) //贴车单确认功能开启
- //{
- // if (!pbPastNoConfirmed.Enabled)
- // {
- // Alert("请先扫描前车贴车单号进行贴车单确认!");
- // ArragetxtCode();
- // return;
- // }
- //}
- //#endregion
-
+
#region fis区是否有记录
if (dgvMATChange.Rows.Count == 0)
{
@@ -1260,10 +1183,8 @@ namespace QMAPP.WinForm.Forms.TianJin
if (this.dgvNF.Rows.Count == 0) //第一个码必须先扫描1号位
{
string placeCode = txtCode.Text.Trim();
- var sss = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString();
if (placeCode.Equals(System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString()))
- {
-
+ {
this.placeFirstPosition = placeCode;
this.placeFirstPositionTime = DateTime.Now;
this.txtCode.Text = "";
@@ -1274,39 +1195,7 @@ namespace QMAPP.WinForm.Forms.TianJin
}
#endregion
-
- #region 一号位时间校验
-
- //if (this.dgvNF.Rows.Count == 0 && !string.IsNullOrEmpty(this.placeFirstPosition))//超时判断
- //{
- // double timeOutSecond = 0;
- // //获取超时时间设定值
- // //DataTable dtTimeOut = new BllTimeOutSet().GetList();
- // DataTable dtTimeOut = agent.InvokeServiceFunction(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_GetTimeOutSet.ToString());
- // if (dtTimeOut.Rows.Count > 0)
- // {
- // timeOutSecond = Convert.ToDouble(dtTimeOut.Rows[0]["TIMEOUT_VALUE"].ToString());
- // }
-
- // //获取超时时间设定值
- // if (timeOutSecond > 0)
- // {
- // TimeSpan ts = DateTime.Now - this.placeFirstPositionTime;
- // if (ts.TotalSeconds > timeOutSecond)
- // {
- // this.placeFirstPosition = "";
- // this.txtCode.Text = "";
- // this.placeFirstPositionTime = DateTime.MinValue;
- // lberror.Text = "扫描本体件超时,请重新扫描1号位!";
- // //处理条码扫描文本框
- // ArragetxtCode();
- // return;
- // }
- // }
- //}
-
- #endregion
-
+
#region 请先扫描1号位
if (string.IsNullOrEmpty(this.placeFirstPosition))
{
@@ -1315,31 +1204,87 @@ namespace QMAPP.WinForm.Forms.TianJin
lberror.Text = "请先扫描1号位!";
return;
}
- #endregion
+ #endregion
- #region FIS区域数据全部扫描完成,请获取数据后再扫描
- if (dgvNF.Rows.Count >= dgvMATChange.Rows.Count)
+ #region 计划外发运
+
+ if (inputstring.Equals("FIRSTPOSITIONTYPE"))
{
- Alert("当前计划数据全部扫描完成,请下达计划后再扫描!");
+ if (PlaceFirstPositionType == "False")
+ {
+ PlaceFirstPositionType = "True";
+ lberror.Text = "关闭验证!";
+ }
+ else
+ {
+ PlaceFirstPositionType = "False";
+ lberror.Text = "打开验证!";
+ }
+ this.txtCode.Text = "";
+ //处理条码扫描文本框
ArragetxtCode();
return;
}
- #endregion
- #region 长度校验
- //string pp = System.Configuration.ConfigurationManager.AppSettings["UpperBarcodeLen"].ToString();
- //Int32 ul = int.Parse(System.Configuration.ConfigurationManager.AppSettings["UpperBarcodeLen"].ToString());
- //Int32 ll = int.Parse(System.Configuration.ConfigurationManager.AppSettings["LowerBarcodeLen"].ToString());
+ if (PlaceFirstPositionType == "True")
+ {
+ #region 校验是否有重复的扫过的条码
+ if (dgvNF.Rows.Count > 0)
+ {
+ for (var i = 0; i < dgvNF.Rows.Count; i++)
+ {
+ if (dgvNF.Rows[i].Cells[CODE_NF.Name].Value.ToString().ToUpper() == inputstring)
+ {
+ SetContainerItem(nfindex, false);
+ Alert("该条码已扫描!");
+ txtCode.Text = "";
+ txtCode.Focus();
+ return;
+ }
+ }
+ }
+ CheckDataBase(inputstring); //检查T_PP_TJFY_WORKORDER 是否存在条码记录
+
+ foreach (var rule in _barcodeRules)
+ {
+ if (System.Text.RegularExpressions.Regex.IsMatch(inputstring, rule.REGEX))
+ {
+ strprodno = rule.MATERIAL_CODE;
+ strmouldcode = rule.REMARK;
+ strcarsetdesc_cn = rule.MATERIAL_TYPE;
+ }
+ }
+
+ //主键
+ strFiskey = Guid.NewGuid().ToString();
+
+ CreateNFPaste(inputstring); //创建NF的贴车单以及明细
+
+ //CreateNFPaste__();
+
+ SetContainerItem(nfindex, true); //变更右下角位置颜色
+
+ txtCode.Text = "";
+ txtCode.Focus();
+ return;
+
+ #endregion
+
+
+ }
- //if (txtCode.Text.Length <= ll || txtCode.Text.Length >= ul)
- //{
- // Alert("条码错误:条码长度不符合要求(" + ll.ToString() + "-" + ul.ToString() + ")。");
- // ArragetxtCode();
- // return;
- //}
#endregion
+ #region FIS区域数据全部扫描完成,请获取数据后再扫描
+ if (dgvNF.Rows.Count >= dgvMATChange.Rows.Count)
+ {
+ Alert("当前计划数据全部扫描完成,请下达计划后再扫描!");
+ ArragetxtCode();
+ return;
+ }
+ #endregion
+
#region 校验位计算
if (txtCode.Text.StartsWith("052"))
@@ -1374,11 +1319,43 @@ namespace QMAPP.WinForm.Forms.TianJin
}
}
}
+
+ #region 底盘号间隔校验
+
+ //2016-10-31 闫永刚
+ int scanSum = dgvNF.Rows.Count;
+ int lastvinNumber = 0;
+ int vinNumber = 0;
+ if (scanSum > 0)
+ {
+ lastvinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum - 1].Cells["REQUESTID"].Value.ToString());
+ vinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum].Cells["REQUESTID"].Value.ToString());
+ }
+
+ if ((vinNumber - lastvinNumber) > 1)
+ {
+ var dresult = MessageBox.Show("出现顺序号间隔,是否继续发货?", "提示", MessageBoxButtons.YesNo);
+ if (dresult == DialogResult.No)
+ {
+ ArragetxtCode();
+ return;
+ }
+ }
+
+ #endregion
+
+ #region 判断当前扫描过的数据集合中是否有相同条码
+
+ //判断当前扫描过的数据集合中是否有相同条码
+ CheckDataBase(Code);
+
+ #endregion
+
#endregion
//规则
bool signal = false;
- string outSourceProduct = "";
+
string MOULD_CODE = "";
foreach (var rule in _barcodeRules)
{
@@ -1386,7 +1363,7 @@ namespace QMAPP.WinForm.Forms.TianJin
{
signal = true;
ProMaterial = rule.MATERIAL_CODE;
- outSourceProduct = rule.DATA_TYPE;
+
MOULD_CODE = rule.REMARK;
}
}
@@ -1415,56 +1392,8 @@ namespace QMAPP.WinForm.Forms.TianJin
//-------------------------End-----------
#endregion
- #region 2.判断成品 下线时间校验
- //if (product.STATUS != "0")
- //{
- // SetContainerItem(nfindex, false);
- // Alert("扫描的不是合格成品,不能进行发运!");
- // txtCode.Text = "";
- // txtCode.Focus();
- // return;
- //}
- //if (product.OUTFLAG != "0")
- //{
- // SetContainerItem(nfindex, false);
- // Alert("扫描产品已出库,不能进行发运操作!");
- // txtCode.Text = "";
- // txtCode.Focus();
- // return;
- //}
- //var StorageTimeLimit=0d;
- //double.TryParse(QMAPP.WinForm.Common.LocalSetting.Settings["StorageTimeLimit", "24"],out StorageTimeLimit);
- //if ((DateTime.Now - product.CREATEDATE).TotalHours < StorageTimeLimit)
- //{
- // SetContainerItem(nfindex, false);
- // Alert("扫描产品下线时间不足"+StorageTimeLimit+"小时!,不能进行发运操作!");
- // txtCode.Text = "";
- // txtCode.Focus();
- // return;
- //}
- //var mcresult = agent.InvokeServiceFunction>("MaterialClassBLL_Get", new MaterialClass { MATERIAL_TYPE_CODE = product.MATERIAL_TYPE });
- //var mc = mcresult.IsSuccess ? mcresult.Result : new MaterialClass { };
- //if (!string.Equals(mc.MATERIAL_ATTRIBUTE, "2"))
- //{
- // SetContainerItem(nfindex, false);
- // Alert("扫描产品不是总成件!,不能进行发运操作!");
- // txtCode.Text = "";
- // txtCode.Focus();
- // return;
- //}
- //FJC.Entity.ProductIn.ProductIn inrecord = agent.InvokeServiceFunction("ProductInBLL_GetInRecord", Code);
- //if (inrecord != null)
- //{
- // SetContainerItem(nfindex, false);
- // Alert("此产品为退返件,请更换总成标签后再发运!");
- // txtCode.Text = "";
- // txtCode.Focus();
- // return;
- //}
- #endregion
-
#region 4.与FIS数据匹配
- //4.与FIS数据匹配
+ //4.与FIS数据匹配 匹配到计划后 开始生成贴车单
FISDataCompare(Code, ProMaterial, MOULD_CODE);
#endregion
@@ -1480,38 +1409,6 @@ namespace QMAPP.WinForm.Forms.TianJin
#endregion
- #region 底盘号间隔校验
-
- //2016-10-31 闫永刚
- int scanSum = dgvNF.Rows.Count;
- int lastvinNumber = 0;
- int vinNumber = 0;
- if (scanSum > 0)
- {
- lastvinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum - 1].Cells["REQUESTID"].Value.ToString());
- vinNumber = Convert.ToInt32(dgvMATChange.Rows[scanSum].Cells["REQUESTID"].Value.ToString());
- }
-
- if ((vinNumber - lastvinNumber) > 1)
- {
- var dresult = MessageBox.Show("出现顺序号间隔,是否继续发货?", "提示", MessageBoxButtons.YesNo);
- if (dresult == DialogResult.No)
- {
- ArragetxtCode();
- return;
- }
- }
-
- #endregion
-
- #region 判断当前扫描过的数据集合中是否有相同条码
- //判断当前扫描过的数据集合中是否有相同条码
- if (outSourceProduct == "OP")
- {
- CheckDataBase(Code);
- }
- #endregion
-
#region 处理条码扫描文本框
ArragetxtCode();
#endregion
@@ -1665,7 +1562,6 @@ namespace QMAPP.WinForm.Forms.TianJin
if (tblbarcode.Rows.Count > 0)
{
-
Alert("扫描条码重复,请重新扫描。");
}
}
@@ -1853,7 +1749,7 @@ namespace QMAPP.WinForm.Forms.TianJin
dgvNF.DataSource = nflist;
strprodno = "";
nfindex++;
-
+
//int setdefaultSum = Convert.ToInt32(QM.Config.CustomConfig.GetItem("ShowDataCount"));
int setdefaultSum = Convert.ToInt32(QMAPP.WinForm.Common.LocalSetting.Settings["ShowDataCount",""]);
if (nfindex == setdefaultSum)
@@ -2156,15 +2052,8 @@ namespace QMAPP.WinForm.Forms.TianJin
}
for (int i = 0; i < tpContainer.ColumnCount; i++)
{
- //tpContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, tpContainer.ColumnCount > 8 ? 60 : 90));
tpContainer.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50));
-
- //Label lblno = new Label();
- //lblno.Text = (i + 1).ToString();
- //lblno.Font = new Font("微软雅黑", 20, FontStyle.Bold);
- //lblno.Dock = DockStyle.Fill;
- //lblno.TextAlign = ContentAlignment.MiddleCenter;
- //tpContainer.Controls.Add(lblno, i, 0);
+
for (int j = 0; j < tpContainer.RowCount; j++)
{
Label lblItem = new Label();
@@ -2175,7 +2064,7 @@ namespace QMAPP.WinForm.Forms.TianJin
tpContainer.Controls.Add(lblItem, i, j);
}
}
- //tpContainer.Height = tpContainer.RowCount * (3 + (tpContainer.ColumnCount > 8 ? 60 : 90));
+
for (int i = 0; i < nfindex; i++)
{
SetContainerItem(i, true);
@@ -2190,13 +2079,23 @@ namespace QMAPP.WinForm.Forms.TianJin
///
public void SetContainerItem(int itemindex, bool result)
{
- var columnindex = itemindex / (tpContainer.RowCount);
- var rowindex = itemindex % (tpContainer.RowCount) ;
- var label = tpContainer.GetControlFromPosition(columnindex, rowindex) as Label;
- if (label != null)
+ if (itemindex == 1)
{
+ var label = tpContainer.GetControlFromPosition(0, 0) as Label;
label.BackColor = result ? Color.Lime : Color.Red;
}
+ else
+ {
+ itemindex = itemindex - 1;
+ var columnindex = itemindex / (tpContainer.RowCount);
+ var rowindex = itemindex % (tpContainer.RowCount);
+ var label = tpContainer.GetControlFromPosition(columnindex, rowindex) as Label;
+ if (label != null)
+ {
+ label.BackColor = result ? Color.Lime : Color.Red;
+ }
+ }
+
}
///
diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt
index f5bbbb4..9ec0d1c 100644
Binary files a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt and b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt differ
diff --git a/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs b/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
index cae55f2..e619dad 100644
--- a/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
+++ b/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
@@ -2017,6 +2017,11 @@ namespace QMAPP.ServicesAgent
///
[Description("贴车单记录明细查询")]
TJFrmPlaceBLL_GetPasteDetails,
+ ///
+ /// 添加贴车单
+ ///
+ [Description(" 添加贴车单")]
+ TJFrmPlaceBLL_AddPasteCard,
#endregion
diff --git a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
index d10b552..d651a04 100644
--- a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
+++ b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
@@ -64,7 +64,10 @@
-
+
+
+
+