Browse Source

成都增加仪表板计划发布到P1工位

master
张松男 2 years ago
parent
commit
d42d6d3d31
  1. 6
      APP/QMAPP.Web/Web.config
  2. 6
      APPMD/QMAPP.MD.Web/Web.config
  3. 117
      APPQ5/QMAPP.FJC.BLL/FIS/DashBoardPlanBLL.cs
  4. 1
      APPQ5/QMAPP.FJC.Web/Content/Xml/Dictionary.xml
  5. 22
      APPQ5/QMAPP.FJC.Web/Controllers/DashBoardPlanController.cs
  6. 15
      APPQ5/QMAPP.FJC.Web/Views/DashBoardPlan/DashBoardPlanList.aspx
  7. 9
      APPQ5/QMAPP.FJC.Web/Web.config
  8. 8
      APPQ5/QMAPP.WinForm/App.config
  9. 12
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

6
APP/QMAPP.Web/Web.config

@ -61,10 +61,10 @@
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->

6
APPMD/QMAPP.MD.Web/Web.config

@ -34,11 +34,11 @@
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_VW276PA_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<!-- <add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
@ -47,9 +47,9 @@
<add name="maindb" connectionString="Data Source=10.122.213.104;Initial Catalog=ADIENT_VW276_MES;User Id=MES;Password=Password1;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
-->
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
</connectionStrings>

117
APPQ5/QMAPP.FJC.BLL/FIS/DashBoardPlanBLL.cs

@ -663,6 +663,75 @@ namespace QMAPP.FJC.BLL.FIS
}
}
/// <summary>
/// 发布信息--直接发布到帽檐
/// </summary>
/// <param name=""></param>
/// <returns>发布个数</returns>
public DataResult<int> PublishEndWorkloc(string strs)
{
string[] list = strs.Split(":".ToCharArray());
DataResult<int> result = new DataResult<int>();
try
{
OrderPlanDAL orderPlandal = new OrderPlanDAL();
List<OrderPlan> validorderPlanList = new List<OrderPlan>();
List<OrderPlan> putOutPlanList = new List<OrderPlan>();
foreach (string str in list)
{
OrderPlan op = orderPlandal.Get(new OrderPlan { PID = str });
if (op.PLAN_STATE != EnumGeter.PLANSTATE.INIT.GetHashCode().ToString())
{
validorderPlanList.Add(op);
}
putOutPlanList.Add(op);
}
if (validorderPlanList.Count > 0)
{
result.IsSuccess = false;
result.Msg = "只有初始状态下的订单能够进行发布!";
return result;
}
DataTable totalDt = GetWorkOrderTable();
foreach (var op in putOutPlanList)
{
op.PLAN_STATE = EnumGeter.PLANSTATE.COMMIT.GetHashCode().ToString();
op.UPDATEUSER = this.LoginUser.UserID;
totalDt = this.PutOutOrderPlanEndWorkP1(op, totalDt);
}
using (IDataSession session = AppDataFactory.CreateMainSession())
{
IDbConnection dbConn = DbManager.MainConnectionInfo.Connection;
IDbTransaction ids = dbConn.BeginTransaction();
orderPlandal.BaseSession = session;
foreach (var op in putOutPlanList)
{
orderPlandal.Update(op);
}
session.DbHelper.BulkCopyData(totalDt, "T_PP_WORKORDER", dbConn, ids);
ids.Commit();
}
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 发布信息--直接发布到最后一个工位
/// </summary>
@ -695,7 +764,7 @@ namespace QMAPP.FJC.BLL.FIS
workOrder["COMPLETE_QTY"] = 0;
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
workOrder["WORKCENTER_CODE"] = "BC316_ASSLINE";
workOrder["WORKCELL_CODE"] = seq.WORKCELL_CODE;
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
@ -712,6 +781,52 @@ namespace QMAPP.FJC.BLL.FIS
return workOrderDt;
}
/// <summary>
/// 发布信息--直接发布到帽檐工位
/// </summary>
/// <param name="">信息</param>
/// <returns>发布个数</returns>
public DataTable PutOutOrderPlanEndWorkP1(OrderPlan info, DataTable workOrderDt)
{
WorkCellDAL workCelldal = new WorkCellDAL();
string pbomcode = info.PBOM_CODE;
//List<QMAPP.MD.Entity.ProcessRouteWorkCellSeq> list = workCelldal.GetEndWorkCell(pbomcode);
//var dicPRI = new DictManageBLL(Dict.DictKind.ORDERPRI);
//注入派工单信息
for (int i = 0; i < info.QTY; i++)
{
DataRow workOrder = workOrderDt.NewRow();
workOrder["PID"] = Guid.NewGuid().ToString();
workOrder["ORDERPLANID"] = info.PID;
workOrder["ORDERPLAN_NO"] = (info.PLAN_NO.ToString() + (i + 1).ToString().PadLeft(4, '0'));
workOrder["ORDER_TYPE"] = info.PLANSOURCE;
workOrder["SEQ"] = (i + 1).ToString().PadLeft(6, '0');
workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE;
workOrder["PBOM_CODE"] = info.PBOM_CODE;
workOrder["QTY"] = 1;
workOrder["COMPLETE_QTY"] = 0;
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = "BC316_ASSLINE";
workOrder["WORKCELL_CODE"] = "BRIM_WELDING_BC316";
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
workOrder["EQPT_NAME"] = "";
workOrder["EQPT_CODE"] = "";
workOrder["STATE"] = EnumGeter.WORKPLANSTATE.INIT.GetHashCode().ToString();
workOrder["PRI"] = "2";
workOrderDt.Rows.Add(workOrder);
}
return workOrderDt;
}
public List<WorkOrder> PutOutOrderPlan(OrderPlan info,int number,int lastIndex)
{
List<WorkOrder> wolist = new List<WorkOrder>();

1
APPQ5/QMAPP.FJC.Web/Content/Xml/Dictionary.xml

@ -569,5 +569,6 @@
<Button key="Disable" value="禁用"/>
<Button key="Statistics" value="统计"/>
<Button key="PublishEndWorkCell" value="发布到总成工位" />
<Button key="PublishEndWorkloc" value="发布到P1工位" />
</Buttons>
</Config>

22
APPQ5/QMAPP.FJC.Web/Controllers/DashBoardPlanController.cs

@ -266,6 +266,28 @@ namespace QMAPP.FJC.Web.Controllers
SetMessage(AppResource.PutOutMessage);
return List(true);
}
/// <summary>
/// 发布
/// </summary>
/// <returns></returns>
[HttpPost]
[HandleException]
public ActionResult PublishEndWorkloc(OrderPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DashBoardPlanBLL_PublishEndWorkloc", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.PutOutMessage);
return List(true);
}
#endregion
#region 导出excel

15
APPQ5/QMAPP.FJC.Web/Views/DashBoardPlan/DashBoardPlanList.aspx

@ -156,6 +156,20 @@
}
}
//发布
function PublishEndWorkloc() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要发布选中的记录吗?", function () {
submitByButton("PublishEndWorkloc");
})
}
}
//修改计划顺序
function EditDashBoardPlanSeq() {
var ids = getSelectKey();
@ -192,6 +206,7 @@
<%=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("PublishEndWorkloc", "PutOut", "detail", "PublishEndWorkloc()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>

9
APPQ5/QMAPP.FJC.Web/Web.config

@ -31,7 +31,7 @@
<!--<add name="maindb" connectionString="Data Source=119.3.213.202.13315;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=ChangkeTec@2020;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.122.213.104;Initial Catalog=ADIENT_VW276_MES;User Id=MES;Password=Password1;" providerName="System.Data.SqlClient"/>
@ -46,9 +46,14 @@
<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
-->
<!--<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>-->

8
APPQ5/QMAPP.WinForm/App.config

@ -7,8 +7,8 @@
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
@ -29,8 +29,8 @@
<!--<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />-->
<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>-->
</connectionStrings>

12
ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

@ -64,9 +64,9 @@
<!--主数据库连接-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<!--
<add name="maindbYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBNCSNF;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBDY;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>-->
@ -93,14 +93,18 @@
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindbYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBNCSNF;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBDY;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<!--<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<!--缓存设置-->

Loading…
Cancel
Save