张松男 7 months ago
parent
commit
a6cb9632c7
  1. 6
      APP/QMAPP.Web/App_Data/MainPower.xml
  2. 92
      APP/QMAPP.Web/App_Data/Menu.xml
  3. 6
      APP/QMAPP.Web/App_Data/PCPower.xml
  4. 8
      APP/QMAPP.Web/Web.config
  5. 5
      APPMD/QMAPP.MD.Web/Web.config
  6. 739
      APPQ5/QMAPP.FJC.Web/Controllers/PaomoPlanPrintController.cs
  7. 1
      APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
  8. 20
      WebAPI/Controllers/LoginController.cs
  9. 12
      WebAPI/Controllers/MachineClassController.cs
  10. 11
      WebAPI/Controllers/MachineController.cs

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

@ -514,9 +514,5 @@
<!--<PowerInfo PowerID="CD13112000" PowerDes="视频监控" PowerType="" ActionList="" Visible="true" Seq="4" SuperID="CD13000000"/>--> <!--<PowerInfo PowerID="CD13112000" PowerDes="视频监控" PowerType="" ActionList="" Visible="true" Seq="4" SuperID="CD13000000"/>-->
<PowerInfo PowerID="CD98000000" PowerDes="手持功能" PowerType="group" ActionList="" Visible="true" Seq="1" SuperID=""></PowerInfo>
<PowerInfo PowerID="CD98010000" PowerDes="注塑投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="CD98020000" PowerDes="盘点操作" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="CD98030000" PowerDes="门板上架" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="CD98040000" PowerDes="注塑绑定" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
</PowerList> </PowerList>

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

@ -285,63 +285,59 @@
<Action ContorllerName="FISOrder" ActionName="ExportExcel" PowerID="CD02010002">导出</Action> <Action ContorllerName="FISOrder" ActionName="ExportExcel" PowerID="CD02010002">导出</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<!--<MenuItem MenuID="02020000" SystemID="FJC" MenuDes="注塑计划管理" Action="/OrderPlan/List?ORDER_TYPE=INJECT" Target="url" PowerID="CD02020000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<!--TJDoorPlankPlanPrint DoorPlankPlan-->
<MenuItem MenuID="02020000" SystemID="FJC" MenuDes="TJ门板计划管理" Action="/TJDoorPlankPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02020000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="OrderPlan" ActionName="List" PowerID="CD02020001">查询</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="List" PowerID="CD02020001">查询</Action>
<Action ContorllerName="OrderPlan" ActionName="Add" PowerID="CD02020002">新建</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Add" PowerID="CD02020002">添加</Action>
<Action ContorllerName="OrderPlan" ActionName="Edit" PowerID="CD02020003">修改</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="AddWholeDoor" PowerID="CD02020003">整车添加</Action>
<Action ContorllerName="OrderPlan" ActionName="Delete" PowerID="CD02020004">删除</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Edit" PowerID="CD02020004">修改</Action>
<Action ContorllerName="OrderPlan" ActionName="PutOut" PowerID="CD02020007">发布</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="EditDoorPlankPlanSeq" PowerID="CD02030011">修改计划顺序号</Action>
<Action ContorllerName="OrderPlan" ActionName="ImportExcel" PowerID="CD02020005">导入</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Insert" PowerID="CD02020005">插单</Action>
<Action ContorllerName="OrderPlan" ActionName="ExportExcel" PowerID="CD02020006">导出</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Delete" PowerID="CD02020006">删除</Action>
<Action ContorllerName="OrderPlan" ActionName="TemplateExcel" PowerID="CD02020008">下载模板</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="PutOut" PowerID="CD02020007">发布</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ImportExcel" PowerID="CD02020008">导入</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ExportExcel" PowerID="CD02020009">导出</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="TemplateExcel" PowerID="CD02020010">下载模板</Action>
</Actions> </Actions>
</MenuItem>--> </MenuItem>
<!--TJDoorPlankPlanPrint DoorPlankPlan--> <!--TJDoorPlankPlanPrint DoorPlankPlan-->
<MenuItem MenuID="02030000" SystemID="FJC" MenuDes="TJ门板计划管理" Action="/TJDoorPlankPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1"> <MenuItem MenuID="02030000" SystemID="FJC" MenuDes="泡沫计划管理" Action="/PaomoPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="List" PowerID="CD02030001">查询</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="List" PowerID="CD02030001">查询</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Add" PowerID="CD02030002">添加</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="Add" PowerID="CD02030002">添加</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="AddWholeDoor" PowerID="CD02030003">整车添加</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="AddWholeDoor" PowerID="CD02030003">整车添加</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Edit" PowerID="CD02030004">修改</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="Edit" PowerID="CD02030004">修改</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="EditDoorPlankPlanSeq" PowerID="CD02030011">修改计划顺序号</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="EditDoorPlankPlanSeq" PowerID="CD02030011">修改计划顺序号</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Insert" PowerID="CD02030005">插单</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="Insert" PowerID="CD02030005">插单</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Delete" PowerID="CD02030006">删除</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="Delete" PowerID="CD02030006">删除</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="PutOut" PowerID="CD02030007">发布</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="PutOut" PowerID="CD02030007">发布</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ImportExcel" PowerID="CD02030008">导入</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="ImportExcel" PowerID="CD02030008">导入</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ExportExcel" PowerID="CD02030009">导出</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="ExportExcel" PowerID="CD02030009">导出</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="TemplateExcel" PowerID="CD02030010">下载模板</Action> <Action ContorllerName="PaomoPlanPrint" ActionName="TemplateExcel" PowerID="CD02030010">下载模板</Action>
</Actions>
</MenuItem>
<!--<MenuItem MenuID="02030000" SystemID="FJC" MenuDes="门板计划管理" Action="/DoorPlankPlan/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions>
<Action ContorllerName="DoorPlankPlan" ActionName="List" PowerID="CD02030001">查询</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="Add" PowerID="CD02030002">添加</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="AddWholeDoor" PowerID="CD02030003">整车添加</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="Edit" PowerID="CD02030004">修改</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="EditDoorPlankPlanSeq" PowerID="CD02030011">修改计划顺序号</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="Insert" PowerID="CD02030005">插单</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="Delete" PowerID="CD02030006">删除</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="PutOut" PowerID="CD02030007">发布</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="ImportExcel" PowerID="CD02030008">导入</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="ExportExcel" PowerID="CD02030009">导出</Action>
<Action ContorllerName="DoorPlankPlan" ActionName="TemplateExcel" PowerID="CD02030010">下载模板</Action>
</Actions> </Actions>
</MenuItem>--> </MenuItem>
<MenuItem MenuID="02040000" SystemID="FJC" MenuDes="仪表板计划管理" Action="/DashBoardPlan/List?ORDER_TYPE=DASHBOARD" Target="url" PowerID="CD02040000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1"> <!--TJDoorPlankPlanPrint DoorPlankPlan-->
<MenuItem MenuID="02040000" SystemID="FJC" MenuDes="注塑计划管理" Action="/TJDoorPlankPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02040000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="DashBoardPlan" ActionName="List" PowerID="CD02040001">查询</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="List" PowerID="CD02040001">查询</Action>
<Action ContorllerName="DashBoardPlan" ActionName="Add" PowerID="CD02040002">新建</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Add" PowerID="CD02040002">添加</Action>
<Action ContorllerName="DashBoardPlan" ActionName="Edit" PowerID="CD02040003">修改</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="AddWholeDoor" PowerID="CD02040003">整车添加</Action>
<Action ContorllerName="DashBoardPlan" ActionName="EditDashBoardPlanSeq" PowerID="CD02040009">修改计划顺序号</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Edit" PowerID="CD02040004">修改</Action>
<Action ContorllerName="DashBoardPlan" ActionName="Delete" PowerID="CD02040004">删除</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="EditDoorPlankPlanSeq" PowerID="CD02040011">修改计划顺序号</Action>
<Action ContorllerName="DashBoardPlan" ActionName="PutOut" PowerID="CD02040007">发布</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Insert" PowerID="CD02040005">插单</Action>
<Action ContorllerName="DashBoardPlan" ActionName="ImportExcel" PowerID="CD02040005">导入</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Delete" PowerID="CD02040006">删除</Action>
<Action ContorllerName="DashBoardPlan" ActionName="ExportExcel" PowerID="CD02040006">导出</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="PutOut" PowerID="CD02040007">发布</Action>
<Action ContorllerName="DashBoardPlan" ActionName="TemplateExcel" PowerID="CD02040008">下载模板</Action> <Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ImportExcel" PowerID="CD02040008">导入</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ExportExcel" PowerID="CD02040009">导出</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="TemplateExcel" PowerID="CD02040010">下载模板</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="02050000" SystemID="FJC" MenuDes="计划操作记录查询" Action="/OrderPlanTrace/List" Target="url" PowerID="CD02050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1"> <MenuItem MenuID="02050000" SystemID="FJC" MenuDes="计划操作记录查询" Action="/OrderPlanTrace/List" Target="url" PowerID="CD02050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="OrderPlanTrace" ActionName="List" PowerID="CD02050001">查询</Action> <Action ContorllerName="OrderPlanTrace" ActionName="List" PowerID="CD02050001">查询</Action>

6
APP/QMAPP.Web/App_Data/PCPower.xml

@ -98,4 +98,10 @@
<PowerInfo PowerID="CD92010300" PowerDes="编辑" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD92010000"></PowerInfo> <PowerInfo PowerID="CD92010300" PowerDes="编辑" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD92010000"></PowerInfo>
<PowerInfo PowerID="CD92010400" PowerDes="删除" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD92010000"></PowerInfo> <PowerInfo PowerID="CD92010400" PowerDes="删除" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD92010000"></PowerInfo>
<PowerInfo PowerID="CD98000000" PowerDes="手持功能" PowerType="group" ActionList="" Visible="true" Seq="1" SuperID=""></PowerInfo>
<PowerInfo PowerID="PDA0000001" PowerDes="泡沫点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000002" PowerDes="泡沫投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000003" PowerDes="注塑点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000004" PowerDes="注塑投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
</PowerList> </PowerList>

8
APP/QMAPP.Web/Web.config

@ -59,13 +59,13 @@
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" 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"/>
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;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=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>

5
APPMD/QMAPP.MD.Web/Web.config

@ -45,10 +45,13 @@
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" 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"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" 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=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />

739
APPQ5/QMAPP.FJC.Web/Controllers/PaomoPlanPrintController.cs

@ -0,0 +1,739 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QMAPP.Common.Web.Controllers;
using QMFrameWork.WebUI.Attribute;
using QMAPP.FJC.Web.Models.FIS;
using QMFrameWork.Data;
using QMAPP.ServicesAgent;
using QMAPP.FJC.Entity.FIS;
using QMAPP.Entity;
using QMFrameWork.WebUI.DataSource;
using QMFrameWork.Common.Serialization;
using System.Data;
using QMAPP.Common.Web.Models;
using QMAPP.FJC.Entity.Basic;
using QMAPP.MD.Entity;
using QMAPP.FJC.BLL.FIS;
namespace QMAPP.FJC.Web.Controllers
{
/// <summary>
/// 门板计划查询
/// 作 者:郭兆福
/// 时 间:2017年09月15日
/// </summary>
public class PaomoPlanPrintController : QController
{
#region 获取信息
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callback)
{
string order_type = Request["ORDER_TYPE"];
DoorPlankPlanModel seachModel = new DoorPlankPlanModel();
seachModel.ORDER_TYPE = order_type;
seachModel.PLANTIMESTART = DateTime.Now.Date.AddDays(-10).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.PLANTIMEEND = DateTime.Now.Date.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.PLAN_STATE = "0";
seachModel.ImmediateSearch = false;
if (callback == true)
TryGetSelectBuffer<DoorPlankPlanModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/DoorPlankPlan/GetList";
return View("DoorPlankPlanList", seachModel);
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
DoorPlankPlanModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
OrderPlan condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<DoorPlankPlanModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<DoorPlankPlanModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<DoorPlankPlanModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<OrderPlan, DoorPlankPlanModel>(seachModel);
//
//condition.WWWWWW = ((int)QMAPP.FJC.Entity.EnumGeter.ProductType.biaopi).ToString();//默认查询XXXX
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("DoorPlankPlanBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<OrderPlan> result = new DateGridResult<OrderPlan>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<OrderPlan>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
DoorPlankPlanModel model = new DoorPlankPlanModel();
string ID = Request.Params["PID"];
string TYPE = Request.Params["ORDER_TYPE"];
OrderPlan Entity = new OrderPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<OrderPlan> result = new DataResult<OrderPlan>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<OrderPlan>>("DoorPlankPlanBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("DoorPlankPlanEdit", model);
}
model = CopyToModel<DoorPlankPlanModel, OrderPlan>(result.Result);
if (model.PLANSOURCE == FJC.Entity.EnumGeter.WORKORDERTYPE.FIS.GetHashCode().ToString())
{
//SetMessage("!");
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", "无法对FIS计划进行修改编辑!"));
}
}
model.ORDER_TYPE = TYPE;
return View("DoorPlankPlanEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(DoorPlankPlanModel saveModel)
{
OrderPlan Entity = null;
string TYPE = Request.Form["ORDER_TYPE"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<OrderPlan, DoorPlankPlanModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
Entity.ORDER_TYPE = TYPE;
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_TJInsert", Entity);
if (result.IsSuccess == false)
{
SetMessage("计划单号已存在!");
return View("DoorPlankPlanEdit", saveModel);
}
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_Update", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("DoorPlankPlanEdit", saveModel);
}
}
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 插单
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Insert()
{
DoorPlankPlanModel model = new DoorPlankPlanModel();
string ID = Request.Params["PID"];
string TYPE = Request.Params["ORDER_TYPE"];
OrderPlan Entity = new OrderPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<OrderPlan> result = new DataResult<OrderPlan>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<OrderPlan>>("DoorPlankPlanBLL_GetFISInsertPos", Entity);
if (result.IsSuccess == false)
{
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", result.Msg));
}
model = CopyToModel<DoorPlankPlanModel, OrderPlan>(result.Result);
}
model.PID = "";
model.MATERIAL_CODE = "";
model.MATERIAL_NAME = "";
model.ORDER_TYPE = TYPE;
return View("DoorPlankPlanInsert", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存插单
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult SaveInsert(DoorPlankPlanModel saveModel)
{
Material condition = new Material();
OrderPlan Entity = new OrderPlan();
string TYPE = Request.Form["ORDER_TYPE"];
string source = Request.Form["PLANSOURCE"];
DataResult<int> result = new DataResult<int>();
ServiceAgent wcfAgent = this.GetServiceAgent();
string materialcode = "('" + saveModel.MaterialCodes.Replace(";", "','") + "')";
condition.MaterialCodes = materialcode;
List<Material> materiallist = wcfAgent.InvokeServiceFunction<List<Material>>("MaterialBLL_GetMaterialInfoList", condition);
Entity.ORDER_TYPE = TYPE;
Entity.QTY = Convert.ToInt32(saveModel.QTY);
Entity.SHIFT_CODE = saveModel.SHIFT_CODE;
Entity.PLAN_DATE = saveModel.PLAN_DATE;
Entity.PLAN_SEQ = saveModel.PLAN_SEQ;
Entity.PLANSOURCE = source;
var publishrightnow = string.Equals(saveModel.PLAN_STATE, "on");
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_SaveFISInsert", Entity, materiallist,publishrightnow);
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
#endregion
#region 删除
/// <summary>
/// 删除
/// </summary>
/// <returns>结果</returns>
[HttpPost]
[HandleException]
public ActionResult Delete(OrderPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_Delete", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.DeleteMessage);
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 发布
/// <summary>
/// 发布
/// </summary>
/// <returns></returns>
[HttpPost]
[HandleException]
public ActionResult PutOut(OrderPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_TJPutOut", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.PutOutMessage);
return List(true);
}
#endregion
#region 导出excel
/// <summary>
/// 导出excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ExportExcel()
{
DoorPlankPlanModel seachModel = null;
OrderPlan condition = null;
DataTable exportDt = new DataTable();
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
//获取查询对象
seachModel = GetModel<DoorPlankPlanModel>();
condition = CopyToModel<OrderPlan, DoorPlankPlanModel>(seachModel);
condition.PIDList = Request.Form["selectKey"];
//获取数据
DoorPlankPlanBLL dp = new DoorPlankPlanBLL();
exportDt = dp.GetExportData(condition);
//exportDt = wcfAgent.InvokeServiceFunction<DataTable>("DoorPlankPlanBLL_GetExportData", condition);
//导出
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool();
return efTool.GetExcelFileResult("DoorPlankPlanExp", "门板计划信息.xlsx", exportDt);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 导入excel
/// <summary>
/// 导入excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ImportExcel()
{
DataTable dt = null;
List<OrderPlan> list = new List<OrderPlan>();
DataResult<ImportMessage> serviceResult = null;
string fileName = Request.Form["fileName"];
string orderby = Request.Form["ORDER_TYPE"];
ServiceAgent wcfAgent = this.GetServiceAgent();
Materiel materialmodel = new Materiel();
ProduceShift produceshiftmodel = new ProduceShift();
MachineInfo machine = new MachineInfo();
//初始工作中心编号条件
QMAPP.MD.Entity.WorkCell workcell = new QMAPP.MD.Entity.WorkCell();
workcell.WORKCELL_CODE = orderby;
try
{
dt = this.GetTableByExcel("DoorPlankPlanImp", fileName, dt);
//格式转换
list = QMFrameWork.Common.Util.BindHelper.ConvertToList<OrderPlan>(dt).OrderBy(w => w.PLAN_NO).ToList();
serviceResult = wcfAgent.InvokeServiceFunction<DataResult<ImportMessage>>("DoorPlankPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell);
if (serviceResult.Ex != null)
{
throw serviceResult.Ex;
}
if (serviceResult.Result.failureNum != 0)
{
foreach (RowError error in serviceResult.Result.Errors)
{
dt.Rows[error.Key - 1]["InfoError"] = error.Value;
}
ImportMessageModel model = new ImportMessageModel();
model.InfoName = "DoorPlankPlanImp";
model.ReturnUrl = "/DoorPlankPlan/List?callBack=true";
model.Message = serviceResult.Result;
model.ErrorDt = dt;
return new MessageOutputController().OutputImportMessage(model);
}
else
{
SetMessage(serviceResult.Msg + ",如下:<br/>"
+ "插入" + serviceResult.Result.insertNum + "条,"
+ "更新" + serviceResult.Result.updateNum + "条"
);
return List(true);
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
System.IO.File.Delete(MvcApplication.TempPath + fileName);
}
}
#endregion
#region 下载模板
/// <summary>
/// 下载导入模板
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult GetTemplate()
{
try
{
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/";
string fileName = "DoorPlankPlanImp.xlsx";
return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板信息导入模板.xlsx"));
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 整车添加
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult AddWholeDoor()
{
DoorPlankPlanModel model = new DoorPlankPlanModel();
string ID = Request.Params["PID"];
string TYPE = Request.Params["ORDER_TYPE"];
OrderPlan Entity = new OrderPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<OrderPlan> result = new DataResult<OrderPlan>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<OrderPlan>>("DoorPlankPlanBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("DoorPlankPlanEdit", model);
}
model = CopyToModel<DoorPlankPlanModel, OrderPlan>(result.Result);
}
model.ORDER_TYPE = TYPE;
return View("AddWholeDoorEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存整车添加
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult DoorPlanSave(DoorPlankPlanModel saveModel)
{
Material condition = new Material();
OrderPlan Entity = new OrderPlan();
string TYPE = Request.Form["ORDER_TYPE"];
string SetCode = Request.Form["AsmSetCode"];
string source = Request.Form["PLANSOURCE"];
DataResult<int> result = new DataResult<int>();
ServiceAgent wcfAgent = this.GetServiceAgent();
string materialcode = "('" + saveModel.MaterialCodes.Replace(";", "','") + "')";
condition.MaterialCodes = materialcode;
List<Material> materiallist = wcfAgent.InvokeServiceFunction<List<Material>>("MaterialBLL_GetMaterialInfoList", condition);
Entity.ORDER_TYPE = TYPE;
Entity.QTY = Convert.ToInt32(saveModel.QTY);
Entity.SHIFT_CODE = saveModel.SHIFT_CODE;
Entity.PLAN_DATE = saveModel.PLAN_DATE;
Entity.PLANSOURCE = source;
Entity.AsmSetCode = SetCode;
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_InsertWholeDoor", Entity, materiallist);
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
#endregion
//#region 整车添加物料信息
///// <summary>
///// 编辑载入
///// </summary>
///// <returns>处理结果</returns>
//[HandleException]
//public ActionResult AddMaterial()
//{
// DoorPlankPlanModel model = new DoorPlankPlanModel();
// string ID = Request.Params["PID"];
// string TYPE = Request.Params["ORDER_TYPE"];
// OrderPlan Entity = new OrderPlan();
// ServiceAgent wcfAgent = this.GetServiceAgent();
// DataResult<OrderPlan> result = new DataResult<OrderPlan>();
// try
// {
// model.ORDER_TYPE = TYPE;
// return View("AddMaterialEdit", model);
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
///// <summary>
///// 保存
///// </summary>
///// <param name="model"></param>
///// <returns>处理结果</returns>
//[HttpPost]
//[HandleException]
//[ValidateInput(false)]
//public ActionResult SaveMaterial(DoorPlankPlanModel saveModel)
//{
// Material condition = new Material();
// ServiceAgent wcfAgent = this.GetServiceAgent();
// condition.MATERIAL_CODE = saveModel.MATERIAL_CODE;
// Material material = wcfAgent.InvokeServiceFunction<Material>("MaterialBLL_GetMaterialInfo", condition);
// if (!string.IsNullOrEmpty(material.PID))
// {
// saveModel.MATERIAL_NAME = material.MATERIAL_NAME;
// saveModel.COLOR = material.COLOR;
// saveModel.HBTYPE = material.HBTYPE;
// return View("AddWholeDoorEdit", saveModel);
// }
// return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
//}
//#endregion
#region 整车添加物料信息
[HandleException]
public ActionResult AddSendDetail(bool? callBack)
{
//实例化服务
ServiceAgent wcfAgent = this.GetServiceAgent();
QMAPP.MD.Web.Models.MaterialModel seachModel = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
DataPage page = new DataPage();
string Fisid = Request["MATERIAL_CODE"].ToString();
FISAssembly MaterialAssInfo = wcfAgent.InvokeServiceFunction<FISAssembly>("DoorPlankPlanBLL_GetFISMaterialInfoCD", Fisid);
string materials = "('" + MaterialAssInfo.MESModulFL + "','" + MaterialAssInfo.MESModulFR + "','" + MaterialAssInfo.MESModulRL + "','" + MaterialAssInfo.MESModulRR + "')";
//物料发货明细实体
Material detail = new Material()
{
MaterialCodes = materials,
};
try
{
//获取查询对象
seachModel = GetModel<QMAPP.MD.Web.Models.MaterialModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("MaterialBLL_GetList", detail, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<Material> result = new DateGridResult<Material>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<Material>>(pageResult.Result.Result.ToString());
for (var i = 0; i < result.Total; i++)
{
result.Rows[i].AsmSetCode = MaterialAssInfo.AsmSetCode;
}
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 门板顺序号编辑
/// <summary>
/// 门板顺序号编辑
/// </summary>
/// <returns></returns>
public ActionResult DoorPlankEditSeq()
{
DoorPlankPlanModel model = new DoorPlankPlanModel();
OrderPlan Entity = new OrderPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<OrderPlan> result = new DataResult<OrderPlan>();
try
{
model = GetModel<DoorPlankPlanModel>();
return View("DoorPlankEditSeq", model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取编辑系列号列表
/// <summary>
/// 获取编辑系列号列表
/// </summary>
/// <param name="callBack"></param>
/// <returns></returns>
[HandleException]
public ActionResult GetDoorPlankPlanList(bool? callBack)
{
DoorPlankPlanModel seachModel = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
DataPage page = new DataPage();
ServiceAgent wcfAgent = this.GetServiceAgent();
OrderPlan condition = new OrderPlan();
try
{
//获取查询对象
seachModel = GetModel<DoorPlankPlanModel>();
condition.PIDList =seachModel.PIDList;
condition.ORDER_TYPE = seachModel.ORDER_TYPE;
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<DoorPlankPlanModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<DoorPlankPlanModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<OrderPlan, DoorPlankPlanModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("DoorPlankPlanBLL_GetDoorPlankPlanList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<OrderPlan> result = new DateGridResult<OrderPlan>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<OrderPlan>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存顺序号修改
/// <summary>
///
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult DoorPlankPlanSeqSave(DoorPlankPlanModel saveModel)
{
OrderPlan entity = new OrderPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
entity.PLAN_SEQ = saveModel.PLAN_SEQ;
entity.PIDList = saveModel.PIDList;
entity = CopyToModel<OrderPlan, DoorPlankPlanModel>(saveModel);
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_UpdateDoorPlankPlanSeq", entity);
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
#endregion
}
}

1
APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj

@ -166,6 +166,7 @@
<Compile Include="Controllers\BarCodeReplacementController.cs" /> <Compile Include="Controllers\BarCodeReplacementController.cs" />
<Compile Include="Controllers\APPConfigController.cs" /> <Compile Include="Controllers\APPConfigController.cs" />
<Compile Include="Controllers\SignInfoController.cs" /> <Compile Include="Controllers\SignInfoController.cs" />
<Compile Include="Controllers\PaomoPlanPrintController.cs" />
<Compile Include="Controllers\TJDoorPlankPlanPrintController.cs" /> <Compile Include="Controllers\TJDoorPlankPlanPrintController.cs" />
<Compile Include="Controllers\StorageLogController.cs" /> <Compile Include="Controllers\StorageLogController.cs" />
<Compile Include="Controllers\StorageController.cs" /> <Compile Include="Controllers\StorageController.cs" />

20
WebAPI/Controllers/LoginController.cs

@ -36,7 +36,9 @@ namespace WebAPI.Controllers
if (dataSet.Tables[0].Rows.Count > 0) if (dataSet.Tables[0].Rows.Count > 0)
{ {
login.UserName = dataSet.Tables[0].Rows[0]["USERNAME"].ToString(); login.UserName = dataSet.Tables[0].Rows[0]["USERNAME"].ToString();
login.Powers = Power(dataSet.Tables[0].Rows[0]["USERID"].ToString());
result.Result = login; result.Result = login;
} }
else else
@ -48,6 +50,24 @@ namespace WebAPI.Controllers
return result; return result;
} }
public List<string> Power(string USERID)
{
var list = new List<string>();
var sql = $"SELECT T1.AUTHORITYID FROM T_QM_ORGAIZATIONAUTHORITY T1,T_QM_USERORGAIZATION T2 WHERE T1.ORGAID = T2.ORGAID AND" +
$" T2.USERID = '{USERID}' UNION SELECT T1.AUTHORITYID FROM T_QM_ROLEAUTHORITY T1,T_QM_USERROLE T2 WHERE T1.ROLEID = T2.ROLEID AND" +
$" T2.USERID = '{USERID}' UNION SELECT AUTHORITYID FROM T_QM_USERAUTHORITY WHERE" +
$" USERID = '{USERID}'";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sql);
if (dataSet.Tables[0].Rows.Count > 0)
{
foreach (DataRow row in dataSet.Tables[0].Rows)
{
list.Add(row["AUTHORITYID"].ToString());
}
}
return list;
}
} }
} }

12
WebAPI/Controllers/MachineClassController.cs

@ -155,10 +155,18 @@ namespace WebAPI.Controllers
t.UserName = resObj.id; t.UserName = resObj.id;
if (resObj.dataList[i].Type == "3") if (resObj.dataList[i].Type == "3")
{
if (resObj.dataList[i].SelectValue == "4")
{
t.MValue = "停机状态";
t.PValue = "停机状态";
}
else
{ {
t.MValue = resObj.dataList[i].putMachine[0].SelectName; t.MValue = resObj.dataList[i].putMachine[0].SelectName;
t.PValue = resObj.dataList[i].putMachine[1].SelectName; t.PValue = resObj.dataList[i].putMachine[1].SelectName;
} }
}
else else
{ {
if (resObj.dataList[i].Type == "1") if (resObj.dataList[i].Type == "1")
@ -181,6 +189,9 @@ namespace WebAPI.Controllers
} }
else else
{ {
if (resObj.dataList[i].SelectValue == "4")
t.MValue = "停机状态";
else
t.MValue = resObj.dataList[i].SelectValue; t.MValue = resObj.dataList[i].SelectValue;
} }
} }
@ -193,6 +204,7 @@ namespace WebAPI.Controllers
return Ok(Response); return Ok(Response);
} }
/// <summary> /// <summary>
/// 获取注塑点检项 /// 获取注塑点检项
/// </summary> /// </summary>

11
WebAPI/Controllers/MachineController.cs

@ -54,10 +54,18 @@ namespace WebAPI.Controllers
t.UserName = resObj.id; t.UserName = resObj.id;
if (resObj.dataList[i].Type == "3") if (resObj.dataList[i].Type == "3")
{
if (resObj.dataList[i].SelectValue == "4")
{
t.MValue = "停机状态";
t.PValue = "停机状态";
}
else
{ {
t.MValue = resObj.dataList[i].putMachine[0].SelectName; t.MValue = resObj.dataList[i].putMachine[0].SelectName;
t.PValue = resObj.dataList[i].putMachine[1].SelectName; t.PValue = resObj.dataList[i].putMachine[1].SelectName;
} }
}
else else
{ {
if (resObj.dataList[i].Type == "1") if (resObj.dataList[i].Type == "1")
@ -80,6 +88,9 @@ namespace WebAPI.Controllers
} }
else else
{ {
if (resObj.dataList[i].SelectValue == "4")
t.MValue = "停机状态";
else
t.MValue = resObj.dataList[i].SelectValue; t.MValue = resObj.dataList[i].SelectValue;
} }
} }

Loading…
Cancel
Save