dequan.zhang 3 years ago
parent
commit
bb865c4ffc
  1. 2
      APP/QMAPP.Web/Views/Home/Login.aspx
  2. 8
      APP/QMAPP.Web/Web.config
  3. 20
      APPQ5/QMAPP.FJC.BLL/Bucket/TSWeighRecoreBLL.cs
  4. 223
      APPQ5/QMAPP.FJC.BLL/TianJin/TJDoorPlankPlanBLL.cs
  5. 6
      APPQ5/QMAPP.FJC.BLL/TianJin/TJFrmPlaceBLL.cs
  6. 78
      APPQ5/QMAPP.FJC.DAL/Bucket/TSWeighRecoreDAL.cs
  7. 48
      APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs
  8. 5
      APPQ5/QMAPP.FJC.Entity/Bucket/TSWeighRecore.cs
  9. BIN
      APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xlsx
  10. 39
      APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xml
  11. 1
      APPQ5/QMAPP.FJC.Web/Content/Xml/Dictionary.xml
  12. 10
      APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanController.cs
  13. 46
      APPQ5/QMAPP.FJC.Web/Controllers/TSWeighRecoreController.cs
  14. 50
      APPQ5/QMAPP.FJC.Web/Models/Bucket/TSWeighRecoreModel.cs
  15. 3
      APPQ5/QMAPP.FJC.Web/Models/TianJin/TJDoorPlankPlanModel.cs
  16. 7
      APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
  17. BIN
      APPQ5/QMAPP.FJC.Web/Temp/5fcea1f9-ea55-4d23-8b98-78541fafab73.xlsx
  18. BIN
      APPQ5/QMAPP.FJC.Web/Temp/af9d4740-7223-4f5c-ad0c-8ffb489a1603.xlsx
  19. BIN
      APPQ5/QMAPP.FJC.Web/Temp/f3271430-e5e1-4ca8-b78b-2351c788f148.xlsx
  20. 6
      APPQ5/QMAPP.FJC.Web/Views/TJDoorPlankPlan/DoorPlankPlanList.aspx
  21. 43
      APPQ5/QMAPP.FJC.Web/Views/TSWeighRecore/TSWeighRecoreList.aspx
  22. 7
      APPQ5/QMAPP.FJC.Web/Web.config
  23. 10
      APPQ5/QMAPP.WinForm/App.config
  24. 1
      APPQ5/QMAPP.WinForm/Forms/TianJin/RerportModel.ttx
  25. 391
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
  26. BIN
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt
  27. 512
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.Designer.cs
  28. 513
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  29. 234
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx
  30. 10
      APPQ5/QMAPP.WinForm/MainForm.Designer.cs
  31. 29
      APPQ5/QMAPP.WinForm/MainForm.cs
  32. 23
      APPQ5/QMAPP.WinForm/QMAPP.WinForm.csproj
  33. 11
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
  34. 5
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

2
APP/QMAPP.Web/Views/Home/Login.aspx

@ -159,7 +159,7 @@
<h1> <h1>
富维安道拓数字化工厂</h1> 富维安道拓数字化工厂</h1>
<h2> <h2>
Adient CHENGDU Digital factory</h2> Adient Digital factory</h2>
<div id="printDiv" style="display: none;"> <div id="printDiv" style="display: none;">
<span style="font-weight: bold; font-size: 20px; font-family: 宋体; color: #FF0000;">您未安装客户端打印控件,请进行<a <span style="font-weight: bold; font-size: 20px; font-family: 宋体; color: #FF0000;">您未安装客户端打印控件,请进行<a
id="A1" href="../../Scripts/Lodop/install_lodop32.exe"><span style="color: #FF0000; id="A1" href="../../Scripts/Lodop/install_lodop32.exe"><span style="color: #FF0000;

8
APP/QMAPP.Web/Web.config

@ -40,12 +40,16 @@
<!--主数据库连接--> <!--主数据库连接-->
<!--<add name="maindb" connectionString="Data Source=USER-20180104HU;Initial Catalog=CD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=USER-20180104HU;Initial Catalog=CD_MES;User Id=sa;Password=qm;" 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=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=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.111.144.98;Initial Catalog=CD_TEST;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=CDMESADM;Password=CDmes123;max pool size=10240;" 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" />
</connectionStrings> </connectionStrings>
<!--日志组件配置开始--> <!--日志组件配置开始-->
<log4net> <log4net>

20
APPQ5/QMAPP.FJC.BLL/Bucket/TSWeighRecoreBLL.cs

@ -141,5 +141,25 @@ namespace QMAPP.FJC.BLL.Bucket
} }
#endregion #endregion
#region 统计
/// <summary>
/// 统计
/// </summary>
/// <param name="">信息</param>
/// <returns>删除个数</returns>
public TSWeighRecore Statistics(TSWeighRecore Info)
{
int count = 0;
try
{
return new TSWeighRecoreDAL().Statistics(Info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
} }
} }

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

@ -540,7 +540,7 @@ namespace QMAPP.FJC.BLL.TianJin
} }
#endregion #endregion
#region 导入数据 #region 导入数据 --Web-导入计划
/// <summary> /// <summary>
/// 导入Excel表数据 /// 导入Excel表数据
/// </summary> /// </summary>
@ -549,155 +549,78 @@ namespace QMAPP.FJC.BLL.TianJin
/// <param name="plantmodel">工厂信息</param> /// <param name="plantmodel">工厂信息</param>
/// <param name="productbasicmodel">零件类别信息</param> /// <param name="productbasicmodel">零件类别信息</param>
/// <returns>结果</returns> /// <returns>结果</returns>
//public DataResult<ImportMessage> GetImportData(List<TJOrderPlan> list, Material materialmodel, QMAPP.FJC.Entity.Basic.MachineInfo machine, FJC.Entity.Basic.ProduceShift produceshiftmodel, QMAPP.MD.Entity.WorkCell workcellmodel) public DataResult<ImportMessage> GetImportData(List<TJOrderPlan> list, Material materialmodel, QMAPP.FJC.Entity.Basic.MachineInfo machine, FJC.Entity.Basic.ProduceShift produceshiftmodel, QMAPP.MD.Entity.WorkCell workcellmodel)
//{ {
// DataResult<ImportMessage> result = new DataResult<ImportMessage>(); DataResult<ImportMessage> result = new DataResult<ImportMessage>();
// TJDoorPlankPlanDAL cmDal = new TJDoorPlankPlanDAL(); TJDoorPlankPlanDAL cmDal = new TJDoorPlankPlanDAL();
// List<TJOrderPlan> List = new List<TJOrderPlan>(); List<TJOrderPlan> List = new List<TJOrderPlan>();
// int index = 0; int index = 0;
// int num = 0; int num = 0;
// try try
// { {
// result.Result = new ImportMessage(); result.Result = new ImportMessage();
// result.Result.Errors = new List<RowError>(); result.Result.Errors = new List<RowError>();
// List<Material> materialinfo = null; using (IDataSession session = AppDataFactory.CreateMainSession())
// List<FJC.Entity.Basic.ProduceShift> produceshiftinfo = null; {
// List<QMAPP.FJC.Entity.Basic.MachineInfo> machineList = null; //获取流水号 导入数据的顺序号 导入文件自己定义
// using (IDataSession session = AppDataFactory.CreateMainSession()) //var SEQSTR = this.GetOrderPlanSeq(model);
// {
// ///获取物料信息 foreach (TJOrderPlan ma in list)
// materialinfo = new QMAPP.MD.BLL.MaterialBLL().GetNewMaterialList(materialmodel,workcellmodel); {
// //获取班次信息 index++;
// produceshiftinfo = new QMAPP.FJC.BLL.Basic.ProduceShiftBLL().GetWorkcenterShifts(workcellmodel.WORKCENTER_CODE); num++;
// //获取设备信息
// machineList = new QMAPP.FJC.BLL.Basic.MachineInfoBLL().GetMachineForOrderList(machine, workcellmodel); //计划单号
// //状态判断 ma.PLAN_NO = "DP" + ma.PLAN_DATE.ToString("yyyyMMdd") + ma.PLAN_SEQ.PadLeft(3,'0');
// foreach (TJOrderPlan ma in list)
// { TJDoorPlankPlanDAL cmdDAL = new TJDoorPlankPlanDAL();
// index++; ma.MATERIAL_NAME = cmdDAL.GetMATERIALNAME(ma.MATERIAL_CODE);
// num++;
// //物料 //修改改时根据主键等信息获取详细内容信息
// Material areaMes = materialinfo.Find(a => a.MATERIAL_CODE == ma.MATERIAL_CODE); TJOrderPlan oldInfo = cmDal.Get(ma);
// if (areaMes != null) if (oldInfo != null)
// { {
// ma.MATERIAL_CODE = areaMes.MATERIAL_CODE; //更新
// } ma.PID = oldInfo.PID;
// else ma.PLAN_SEQ = oldInfo.PLAN_SEQ;
// { ma.MATERIAL_CODE = oldInfo.MATERIAL_CODE;
// ma.MATERIAL_CODE = null; ma.MATERIAL_NAME = oldInfo.MATERIAL_NAME;
// result.Result.Errors.Add(new RowError(index, "物料信息不存在")); ma.PLAN_STATE = oldInfo.PLAN_STATE;
// result.Result.failureNum += 1; ma.LINENO = oldInfo.LINENO;
// continue; ma.CREATEUSER = oldInfo.CREATEUSER;
// } ma.CREATEDATE = oldInfo.CREATEDATE;
// //班次 ma.UPDATEUSER = this.LoginUser.UserID;
// FJC.Entity.Basic.ProduceShift plantMes = produceshiftinfo.Find(p => p.PRODUCESHIFTTCODE == ma.SHIFT_CODE); ma.UPDATEDATE = oldInfo.UPDATEDATE;
// if (plantMes != null) ma.IsNewInfo = false;
// { result.Result.updateNum += 1;
// ma.SHIFT_CODE = plantMes.PRODUCESHIFTTCODE; }
// } else
// else {
// { //新增
// ma.SHIFT_CODE = null; oldInfo = new TJOrderPlan();
// result.Result.Errors.Add(new RowError(index, "班次信息不存在")); ma.PID = Guid.NewGuid().ToString();
// result.Result.failureNum += 1; ma.PLAN_STATE = EnumGeter.PLANSTATE.INIT.GetHashCode().ToString();
// continue; ma.CREATEUSER = this.LoginUser.UserID;
// } ma.CREATEDATE = DateTime.Now;
// //转变生产要求PRODUCEREQUIRE ma.IsNewInfo = true;
// if (ma.PRODUCEREQUIRE != null) result.Result.insertNum += 1;
// { }
// if (ma.PRODUCEREQUIRE.Equals("以数量为准")) List.Add(ma);
// { }
// ma.PRODUCEREQUIRE = "0"; }
// } //导入
// else if (ma.PRODUCEREQUIRE.Equals("以时间为准")) cmDal.GetImportData(List);
// { result.Msg = "导入成功";
// ma.PRODUCEREQUIRE = "1"; result.IsSuccess = true;
// } return result;
// else }
// { catch (Exception ex)
// ma.PRODUCEREQUIRE = null; {
// result.Result.Errors.Add(new RowError(index, "生产要求信息错误")); result.IsSuccess = false;
// result.Result.failureNum += 1; result.Ex = ex;
// continue; return result;
// } }
// } }
// 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;
// }
//}
#endregion #endregion

6
APPQ5/QMAPP.FJC.BLL/TianJin/TJFrmPlaceBLL.cs

@ -171,11 +171,11 @@ namespace QMAPP.FJC.BLL.TianJin
/// <summary> /// <summary>
/// 添加贴车单 /// 添加贴车单 -- 计划外发运
/// </summary> /// </summary>
/// <param name="ppastecard"></param> /// <param name="ppastecard"></param>
/// <returns></returns> /// <returns></returns>
public int AddPasteCard(EPasteCard ppastecard) public int AddPasteCard(TJEPasteCard ppastecard)
{ {
@ -406,7 +406,7 @@ namespace QMAPP.FJC.BLL.TianJin
/// <param name="ppastecard"></param> /// <param name="ppastecard"></param>
/// <param name="pDetailsCard"></param> /// <param name="pDetailsCard"></param>
/// <returns></returns> /// <returns></returns>
public int AddNewPasteCard(EPasteCard ppastecard,int Count) public int AddNewPasteCard(TJEPasteCard ppastecard,int Count)
{ {
try try
{ {

78
APPQ5/QMAPP.FJC.DAL/Bucket/TSWeighRecoreDAL.cs

@ -154,6 +154,33 @@ namespace QMAPP.FJC.DAL.Bucket
whereBuilder.Append(" AND MATERIAL_CODE = @MATERIAL_CODE"); whereBuilder.Append(" AND MATERIAL_CODE = @MATERIAL_CODE");
parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = condition.MATERIAL_CODE }); parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = condition.MATERIAL_CODE });
} }
if (string.IsNullOrEmpty(condition.PColour) == false)
{
whereBuilder.Append(" AND PColour = @PColour");
parameters.Add(new DataParameter { ParameterName = "PColour", DataType = DbType.String, Value = condition.PColour });
}
if (!string.IsNullOrEmpty(condition.BeginWeigh))
{
whereBuilder.Append(" AND Weigh >= @BeginWeigh");
parameters.Add(new DataParameter { ParameterName = "BeginWeigh", DataType = DbType.String, Value = condition.BeginWeigh });
}
if (!string.IsNullOrEmpty(condition.EndWeigh))
{
whereBuilder.Append(" AND Weigh <= @EndWeigh");
parameters.Add(new DataParameter { ParameterName = "EndWeigh", DataType = DbType.String, Value = condition.EndWeigh });
}
var sss = DateTime.MinValue.ToString();
if (condition.BeginTime != DateTime.MinValue)
{
whereBuilder.Append(" AND CREATEDATE >= @BeginTime");
parameters.Add(new DataParameter { ParameterName = "BeginTime", DataType = DbType.String, Value = condition.BeginTime });
}
if (condition.EndTime != DateTime.MinValue)
{
whereBuilder.Append(" AND CREATEDATE <= @EndTime");
parameters.Add(new DataParameter { ParameterName = "EndTime", DataType = DbType.String, Value = condition.EndTime });
}
//查询条件 //查询条件
if (whereBuilder.Length > 0) if (whereBuilder.Length > 0)
{ {
@ -260,7 +287,58 @@ namespace QMAPP.FJC.DAL.Bucket
#endregion #endregion
#region 统计
/// <summary>
/// 统计
/// </summary>
/// <param name=""></param>
/// <returns>删除个数</returns>
public TSWeighRecore Statistics(TSWeighRecore Info)
{
StringBuilder sqlBuilder = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//删除基本信息
sqlBuilder.Append("select sum([Weigh]) as 'SUM',count(*) as 'Weigh' from T_AW_TSWeighRecore ");
sqlBuilder.Append("WHERE 1 = 1 ");
if (Info.BeginTime != DateTime.MinValue)
sqlBuilder.Append($" and CREATEDATE >= '{Info.BeginTime}' ");
if (Info.EndTime != DateTime.MinValue)
sqlBuilder.Append($" and CREATEDATE <= '{Info.EndTime}' ");
if (string.IsNullOrEmpty(Info.ProductCode) == false)
{
sqlBuilder.Append($" AND ProductCode = '{Info.ProductCode}'");
}
if (string.IsNullOrEmpty(Info.MATERIAL_CODE) == false)
{
sqlBuilder.Append($" AND MATERIAL_CODE = '{Info.MATERIAL_CODE}'");
}
if (string.IsNullOrEmpty(Info.PColour) == false)
{
sqlBuilder.Append($" AND PColour = '{Info.PColour}'");
}
if (!string.IsNullOrEmpty(Info.BeginWeigh))
{
sqlBuilder.Append($" AND Weigh >= '{Info.BeginWeigh}'");
}
if (!string.IsNullOrEmpty(Info.EndWeigh))
{
sqlBuilder.Append($" AND Weigh <= {Info.EndWeigh}");
}
return session.Get<TSWeighRecore>(sqlBuilder.ToString(), parameters.ToArray());
}
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
} }
} }

48
APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs

@ -466,7 +466,7 @@ namespace QMAPP.FJC.DAL.TianJin
/// </summary> /// </summary>
/// <param name="pdecard"></param> /// <param name="pdecard"></param>
/// <returns></returns> /// <returns></returns>
private string Insertdetailcard(int rowindex, EPasteDetailsCard pdecard) private string Insertdetailcard(int rowindex, TJEPasteDetailsCard pdecard)
{ {
#region #region
StringBuilder strSql = new StringBuilder(); StringBuilder strSql = new StringBuilder();
@ -630,11 +630,16 @@ namespace QMAPP.FJC.DAL.TianJin
/// 更新FIS队列表。 /// 更新FIS队列表。
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private string updateFisOrder(string pfiskey,string PRODUCTCODE) private string updateFisOrder(TJEPasteDetailsCard Details)
{ {
#region #region
StringBuilder strSql = new StringBuilder(); StringBuilder strSql = new StringBuilder();
strSql.Append(string.Format($" UPDATE T_PP_TJFY_WORKORDER SET STATE =2,PRODUCTCODE = '{PRODUCTCODE}' WHERE PID= '{pfiskey}' ")); if (!string.IsNullOrEmpty(Details.FIS_KEY))
strSql.Append(string.Format($" UPDATE T_PP_TJFY_WORKORDER SET STATE =2,PRODUCTCODE = '{Details.SANBARCODE}' WHERE PID= '{Details.FIS_KEY}' "));
else
{
strSql.Append($"INSERT INTO[dbo].[T_PP_TJFY_WORKORDER] ([PID], [ORDERPLANID], [ORDERPLAN_NO], [SEQ], [MATERIAL_CODE], [MATERIAL_NAME], [PLAN_DATE], [PRODUCTCODE], [MOULD_CODE], [STATE], [UPDATEDATE], [LINENO]) VALUES('{Guid.NewGuid().ToString()}','','','','{Details.PRODNO}','{Details.CARSETDESC_CN}','{DateTime.Now}','{Details.SANBARCODE}','{Details.MOULDCODE}','2','{DateTime.Now}','{Details.LINENO}')");
}
return strSql.ToString(); return strSql.ToString();
#endregion #endregion
@ -713,34 +718,11 @@ namespace QMAPP.FJC.DAL.TianJin
/// <param name="ppastecard"></param> /// <param name="ppastecard"></param>
/// <param name="pDetailsCard"></param> /// <param name="pDetailsCard"></param>
/// <returns></returns> /// <returns></returns>
public int AddPasteCard(EPasteCard ppastecard) public int AddPasteCard(TJEPasteCard ppastecard)
{ {
#region #region
try 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(); DataTable tbl = GetPastecardDeatis();
int strindex = 0; int strindex = 0;
int reindex = 0; int reindex = 0;
@ -809,11 +791,11 @@ namespace QMAPP.FJC.DAL.TianJin
sqllist.Add(strSqllog.ToString()); sqllist.Add(strSqllog.ToString());
sqllist.Add(strSql.ToString()); sqllist.Add(strSql.ToString());
foreach (EPasteDetailsCard decard in ppastecard.DetailsCardlist) foreach (TJEPasteDetailsCard decard in ppastecard.DetailsCardlist)
{ {
int rowindex = strindex; int rowindex = strindex;
string strinsertsql = Insertdetailcard(rowindex, decard); string strinsertsql = Insertdetailcard(rowindex, decard);
string updatesql = updateFisOrder(decard.FIS_KEY, decard.SANBARCODE); string updatesql = updateFisOrder(decard);
string deleteSql = DeleteSPFisOrder(decard.FIS_KEY); string deleteSql = DeleteSPFisOrder(decard.FIS_KEY);
@ -867,7 +849,7 @@ namespace QMAPP.FJC.DAL.TianJin
/// <param name="ppastecard"></param> /// <param name="ppastecard"></param>
/// <param name="pDetailsCard"></param> /// <param name="pDetailsCard"></param>
/// <returns></returns> /// <returns></returns>
public int AddNewPasteCard(EPasteCard ppastecard,int Count) public int AddNewPasteCard(TJEPasteCard ppastecard,int Count)
{ {
try try
{ {
@ -956,12 +938,12 @@ namespace QMAPP.FJC.DAL.TianJin
sqllist.Add(strSql.ToString()); sqllist.Add(strSql.ToString());
foreach (EPasteDetailsCard decard in ppastecard.DetailsCardlist) foreach (TJEPasteDetailsCard decard in ppastecard.DetailsCardlist)
{ {
int rowindex = strindex; int rowindex = strindex;
string strinsertsql = Insertdetailcard(rowindex, decard); string strinsertsql = Insertdetailcard(rowindex, decard);
//string updatesql = UpdateFISORDERSENDDETAIL(decard.FIS_KEY); //string updatesql = UpdateFISORDERSENDDETAIL(decard.FIS_KEY);
string updatesql2 = updateFisOrder(decard.FIS_KEY, decard.SANBARCODE); string updatesql2 = updateFisOrder(decard);
//string updatesql3 = updateProduct(decard.PRODUCT_PID, decard.VIN, decard.KIN, decard.VWSEQ); //string updatesql3 = updateProduct(decard.PRODUCT_PID, decard.VIN, decard.KIN, decard.VWSEQ);
sqllist.Add(strinsertsql.ToString()); sqllist.Add(strinsertsql.ToString());
//sqllist.Add(updatesql.ToString()); //sqllist.Add(updatesql.ToString());
@ -1286,7 +1268,7 @@ namespace QMAPP.FJC.DAL.TianJin
strValues.Append("'" + ppastecard.PASTECARDNO + "',"); strValues.Append("'" + ppastecard.PASTECARDNO + "',");
strValues.Append("'" + ppastecard.PASTECARDDATE + "',"); strValues.Append("'" + ppastecard.PASTECARDDATE + "',");
strValues.Append("'" + ppastecard.PRODUCTIONNAME + "',"); strValues.Append("'" + ppastecard.PRODUCTIONNAME + "'");
//strValues.Append("'" + ppastecard.PLANTNAME + "'"); //strValues.Append("'" + ppastecard.PLANTNAME + "'");
strSql.Append(" INSERT INTO T_DAS_PASTE_CARDINDEX "); strSql.Append(" INSERT INTO T_DAS_PASTE_CARDINDEX ");

5
APPQ5/QMAPP.FJC.Entity/Bucket/TSWeighRecore.cs

@ -51,6 +51,9 @@ namespace QMAPP.MD.Entity.Bucket
[Description("重量")] [Description("重量")]
[DBColumn(ColumnName = "Weigh", DataType = DbType.String)] [DBColumn(ColumnName = "Weigh", DataType = DbType.String)]
public string Weigh { get; set; } public string Weigh { get; set; }
public string BeginWeigh { get; set; }
public string EndWeigh { get; set; }
public int SUM { get; set; }
/// <summary> /// <summary>
/// 创建用户 /// 创建用户
@ -80,5 +83,7 @@ namespace QMAPP.MD.Entity.Bucket
[DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)]
public string UPDATEDATE { get; set; } public string UPDATEDATE { get; set; }
public DateTime EndTime { get; set; }
public DateTime BeginTime { get; set; }
} }
} }

BIN
APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xlsx

Binary file not shown.

39
APPQ5/QMAPP.FJC.Web/App_Data/Excel/TJDoorPlankPlanImp.xml

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8" ?>
<DataInfoMains>
<DataInfoMain InfoName="TJDoorPlankPlanImp" InfoTitle="门板发运计划信息" TemplateFile="TJDoorPlankPlanImp.xlsx" RecordCount="n">
<DataInfoItems>
<DataInfoItem ColumnName="PLAN_DATE" ColumnTitle="计划日期" XPosition="A" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="PLAN_SEQ" ColumnTitle="计划顺序号" XPosition="B" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="LINENO" ColumnTitle="车型" XPosition="C" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="MATERIAL_CODE" ColumnTitle="物料号" XPosition="D" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
<DataInfoItem ColumnName="QTY" ColumnTitle="计划数量" XPosition="E" YPosition="3" >
<Observers>
<Observer name="Required" ></Observer>
</Observers>
</DataInfoItem>
</DataInfoItems>
</DataInfoMain>
</DataInfoMains>

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

@ -553,5 +553,6 @@
<Button key="Sync" value="同步数据"/> <Button key="Sync" value="同步数据"/>
<Button key="Enable" value="启用"/> <Button key="Enable" value="启用"/>
<Button key="Disable" value="禁用"/> <Button key="Disable" value="禁用"/>
<Button key="Statistics" value="统计"/>
</Buttons> </Buttons>
</Config> </Config>

10
APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanController.cs

@ -295,10 +295,10 @@ namespace QMAPP.FJC.Web.Controllers
try try
{ {
dt = this.GetTableByExcel("DoorPlankPlanImp", fileName, dt); dt = this.GetTableByExcel("TJDoorPlankPlanImp", fileName, dt);
//格式转换 //格式转换
list = QMFrameWork.Common.Util.BindHelper.ConvertToList<TJOrderPlan>(dt).ToList(); list = QMFrameWork.Common.Util.BindHelper.ConvertToList<TJOrderPlan>(dt).ToList();
serviceResult = wcfAgent.InvokeServiceFunction<DataResult<ImportMessage>>("DoorPlankPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell); serviceResult = wcfAgent.InvokeServiceFunction<DataResult<ImportMessage>>("TJDoorPlankPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell);
if (serviceResult.Ex != null) if (serviceResult.Ex != null)
{ {
throw serviceResult.Ex; throw serviceResult.Ex;
@ -310,7 +310,7 @@ namespace QMAPP.FJC.Web.Controllers
dt.Rows[error.Key - 1]["InfoError"] = error.Value; dt.Rows[error.Key - 1]["InfoError"] = error.Value;
} }
ImportMessageModel model = new ImportMessageModel(); ImportMessageModel model = new ImportMessageModel();
model.InfoName = "DoorPlankPlanImp"; model.InfoName = "TJDoorPlankPlanImp";
model.ReturnUrl = "/TJDoorPlankPlan/List?callBack=true"; model.ReturnUrl = "/TJDoorPlankPlan/List?callBack=true";
model.Message = serviceResult.Result; model.Message = serviceResult.Result;
model.ErrorDt = dt; model.ErrorDt = dt;
@ -347,8 +347,8 @@ namespace QMAPP.FJC.Web.Controllers
try try
{ {
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/"; string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/";
string fileName = "DoorPlankPlanImp.xlsx"; string fileName = "TJDoorPlankPlanImp.xlsx";
return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板信息导入模板.xlsx")); return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板发运导入模板.xlsx"));
} }
catch (Exception ex) catch (Exception ex)
{ {

46
APPQ5/QMAPP.FJC.Web/Controllers/TSWeighRecoreController.cs

@ -31,10 +31,13 @@ namespace QMAPP.FJC.Web.Controllers
{ {
TSWeighRecoreModel seachModel = new TSWeighRecoreModel(); TSWeighRecoreModel seachModel = new TSWeighRecoreModel();
if (callback == true) if (callback == true)
TryGetSelectBuffer<TSWeighRecoreModel>(out seachModel); {
seachModel.rownumbers = false;
//seachModel.BeginTime = DateTime.Now.AddDays(-5); //seachModel.BeginTime = DateTime.Now.AddDays(-5);
//seachModel.EndTime = DateTime.Now.AddDays(+1); //seachModel.EndTime = DateTime.Now.AddDays(+1);
TryGetSelectBuffer<TSWeighRecoreModel>(out seachModel);
}
seachModel.rownumbers = false;
seachModel.url = "/TSWeighRecore/GetList"; seachModel.url = "/TSWeighRecore/GetList";
return View("TSWeighRecoreList", seachModel); return View("TSWeighRecoreList", seachModel);
} }
@ -73,6 +76,19 @@ namespace QMAPP.FJC.Web.Controllers
page = this.GetDataPage(seachModel); page = this.GetDataPage(seachModel);
condition = CopyToModel<TSWeighRecore, TSWeighRecoreModel>(seachModel); condition = CopyToModel<TSWeighRecore, TSWeighRecoreModel>(seachModel);
#region wcf服务统一接口 #region wcf服务统一接口
try
{
var intBeginWeigh = 0;
var intEndWeigh = 0;
if (!string.IsNullOrEmpty(seachModel.BeginWeigh))
intBeginWeigh = Convert.ToInt32(seachModel.BeginWeigh);
if (!string.IsNullOrEmpty(seachModel.EndWeigh))
intEndWeigh = Convert.ToInt32(seachModel.EndWeigh);
}
catch
{
SetMessage("重量填写错误,请修改后查询!");
}
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("TSWeighRecoreBLL_GetList", condition, page); pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("TSWeighRecoreBLL_GetList", condition, page);
if (pageResult.IsSuccess == false) if (pageResult.IsSuccess == false)
@ -93,5 +109,31 @@ namespace QMAPP.FJC.Web.Controllers
} }
#endregion #endregion
#region 统计
/// <summary>
/// 统计
/// </summary>
/// <returns>结果</returns>
[HttpPost]
[HandleException]
public ActionResult Statistics(TSWeighRecore model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
var result = wcfAgent.InvokeServiceFunction<TSWeighRecore>(QMAPP.ServicesAgent.DictService.TSWeighRecoreBLL_Statistics.ToString(), model);
var count = Convert.ToInt32(result.Weigh);
var ERcount = result.SUM / count;
SetMessage($"总记录数:{count},平均重量:{ERcount},总重量:{result.SUM}");
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
} }
} }

50
APPQ5/QMAPP.FJC.Web/Models/Bucket/TSWeighRecoreModel.cs

@ -60,6 +60,24 @@ namespace QMAPP.FJC.Web.Models.Bucket
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string Weigh { get; set; } public string Weigh { get; set; }
/// <summary>
/// 开始重量
/// </summary>
[Description("开始重量")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center, Hidden = true)]
public string BeginWeigh { get; set; }
/// <summary>
/// 结束重量
/// </summary>
[Description("结束重量")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center, Hidden = true)]
public string EndWeigh { get; set; }
/// <summary> /// <summary>
/// 创建人 /// 创建人
/// </summary> /// </summary>
@ -90,22 +108,22 @@ namespace QMAPP.FJC.Web.Models.Bucket
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")]
public DateTime UPDATEDATE { get; set; } public DateTime UPDATEDATE { get; set; }
///// <summary> /// <summary>
///// 开始时间 /// 开始时间
///// </summary> /// </summary>
//[Description("开始时间")] [Description("开始时间")]
//[HTMLInput(UpdateRead = true, MaxLength = 20)] [HTMLInput(UpdateRead = true, MaxLength = 20)]
//[InputType(inputType.dateTimeBox)] [InputType(inputType.dateTimeBox)]
//[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss", Hidden = true)] [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss", Hidden = true)]
//public DateTime BeginTime { get; set; } public string BeginTime { get; set; }
///// <summary> /// <summary>
///// 结束时间 /// 结束时间
///// </summary> /// </summary>
//[Description("结束时间")] [Description("结束时间")]
//[HTMLInput(UpdateRead = true, MaxLength = 20)] [HTMLInput(UpdateRead = true, MaxLength = 20)]
//[InputType(inputType.dateTimeBox)] [InputType(inputType.dateTimeBox)]
//[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss",Hidden = true)] [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss", Hidden = true)]
//public DateTime EndTime { get; set; } public string EndTime { get; set; }
} }
} }

3
APPQ5/QMAPP.FJC.Web/Models/TianJin/TJDoorPlankPlanModel.cs

@ -112,6 +112,7 @@ namespace QMAPP.FJC.Web.Models.TianJin
/// 创建用户 /// 创建用户
/// </summary> /// </summary>
[Description("创建用户")] [Description("创建用户")]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center, Hidden = true)]
public string CREATEUSER { get; set; } public string CREATEUSER { get; set; }
@ -119,7 +120,7 @@ namespace QMAPP.FJC.Web.Models.TianJin
/// 创建用户 /// 创建用户
/// </summary> /// </summary>
[Description("创建用户")] [Description("创建用户")]
[DGColumn(Sortable = true, Width = 100, DataAlign = DataAlign.left)] [DGColumn(Sortable = true, Width = 100, DataAlign = DataAlign.left,Hidden = true)]
public string CREATEUSERNAME { get; set; } public string CREATEUSERNAME { get; set; }

7
APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj

@ -428,6 +428,9 @@
<Content Include="App_Data\Excel\DoorPlankPlanExp.xml"> <Content Include="App_Data\Excel\DoorPlankPlanExp.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="App_Data\Excel\TJDoorPlankPlanImp.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="App_Data\Excel\DoorPlankPlanImp.xml"> <Content Include="App_Data\Excel\DoorPlankPlanImp.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
@ -1302,6 +1305,9 @@
<None Include="App_Data\Excel\DoorPlankPlanExp.xlsx"> <None Include="App_Data\Excel\DoorPlankPlanExp.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<Content Include="App_Data\Excel\TJDoorPlankPlanImp.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="App_Data\Excel\DoorPlankPlanImp.xlsx"> <None Include="App_Data\Excel\DoorPlankPlanImp.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
@ -1429,6 +1435,7 @@
<None Include="App_Data\Excel\T_PA_SUPWELD2Exp.xlsx"> <None Include="App_Data\Excel\T_PA_SUPWELD2Exp.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<None Include="Scripts\echarts-2.2.2\src\util\mapData\rawData\geoJson\an_hui_geo.json" /> <None Include="Scripts\echarts-2.2.2\src\util\mapData\rawData\geoJson\an_hui_geo.json" />
<None Include="Scripts\echarts-2.2.2\src\util\mapData\rawData\geoJson\ao_men_geo.json" /> <None Include="Scripts\echarts-2.2.2\src\util\mapData\rawData\geoJson\ao_men_geo.json" />
<None Include="Scripts\echarts-2.2.2\src\util\mapData\rawData\geoJson\bei_jing_geo.json" /> <None Include="Scripts\echarts-2.2.2\src\util\mapData\rawData\geoJson\bei_jing_geo.json" />

BIN
APPQ5/QMAPP.FJC.Web/Temp/5fcea1f9-ea55-4d23-8b98-78541fafab73.xlsx

Binary file not shown.

BIN
APPQ5/QMAPP.FJC.Web/Temp/af9d4740-7223-4f5c-ad0c-8ffb489a1603.xlsx

Binary file not shown.

BIN
APPQ5/QMAPP.FJC.Web/Temp/f3271430-e5e1-4ca8-b78b-2351c788f148.xlsx

Binary file not shown.

6
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.QTButton("insertorder","Insert",QMFrameWork.WebUI.IconCls.add,"Insert()", QMAPP.Common.Web.SystemLimit.isLimt)%> --%>
<%=Html.QTButtonDelete("DoorPlankPlan", "Delete", "Delete()", 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("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("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("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("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td> </td>
</tr> </tr>
</table> </table>

43
APPQ5/QMAPP.FJC.Web/Views/TSWeighRecore/TSWeighRecoreList.aspx

@ -6,7 +6,7 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(80,true) %> <%=Html.QPSeach(100,true) %>
<table id="condiTable"> <table id="condiTable">
<tr> <tr>
@ -22,8 +22,41 @@
<td> <td>
<%=Html.QC(p => p.MATERIAL_CODE)%> <%=Html.QC(p => p.MATERIAL_CODE)%>
</td> </td>
<th align="right">
<%=Html.QV(p => p.PColour)%>
</th>
<td>
<%=Html.QC(p => p.PColour)%>
</td>
</tr> </tr>
<tr>
<th align="right">
<%=Html.QV(p => p.BeginWeigh)%>
</th>
<td>
<%=Html.QC(p => p.BeginWeigh)%>
</td>
<th align="right">
<%=Html.QV(p => p.EndWeigh)%>
</th>
<td>
<%=Html.QC(p => p.EndWeigh)%>
</td>
<th align="right">
<%=Html.QV(p => p.BeginTime)%>
</th>
<td>
<%=Html.QC(p => p.BeginTime)%>
</td>
<th align="right">
<%=Html.QV(p => p.EndTime)%>
</th>
<td>
<%=Html.QC(p => p.EndTime)%>
</td>
</tr>
</table> </table>
<%=Html.QPEnd()%> <%=Html.QPEnd()%>
<%=Html.QPList() %> <%=Html.QPList() %>
@ -63,6 +96,9 @@
}) })
} }
} }
function Statistics() {
submitByButton("Statistics");
}
</script> </script>
</asp:Content> </asp:Content>
@ -71,9 +107,8 @@
<tr> <tr>
<td align="center"> <td align="center">
<%=Html.QTButtonSearch("TSWeighRecore", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> <%=Html.QTButtonSearch("TSWeighRecore", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%--<%=Html.QTButtonAdd("BucketMaterial", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> <%=Html.QTButton("Statistics", "Statistics", QMFrameWork.WebUI.IconCls.redo, "Statistics()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonUpdate("BucketMaterial", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonDelete("BucketMaterial", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
</td> </td>
</tr> </tr>
</table> </table>

7
APPQ5/QMAPP.FJC.Web/Web.config

@ -31,12 +31,15 @@
<!--<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=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=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=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.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=CDmes123;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=CDmes123;" 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" />
</connectionStrings> </connectionStrings>
<!--日志组件配置开始--> <!--日志组件配置开始-->
<log4net> <log4net>

10
APPQ5/QMAPP.WinForm/App.config

@ -5,11 +5,14 @@
<!--<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=119.3.213.202,13315;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=ChangkeTec@2020;" providerName="System.Data.SqlClient" />
<add name="maindbBZD" connectionString="Data Source=119.3.213.202,13315;Initial Catalog=BZD;User Id=sa;Password=ChangkeTec@2020;" providerName="System.Data.SqlClient"/>--> <add name="maindbBZD" connectionString="Data Source=119.3.213.202,13315;Initial Catalog=BZD;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.111.144.99;Initial Catalog=ADIENT_CD_MES9;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES9;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="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=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
@ -123,6 +126,7 @@
<add key="UpperBarcodeLen" value="20" /> <add key="UpperBarcodeLen" value="20" />
<add key="LowerBarcodeLen" value="5" /> <add key="LowerBarcodeLen" value="5" />
<add key="PlaceFirstPositionCode" value="FirstPosition" /> <add key="PlaceFirstPositionCode" value="FirstPosition" />
<add key="PlaceFirstPositionType" value="False" />
<add key="PlantNameConfig" value="" /> <add key="PlantNameConfig" value="" />
<add key="ShowDataCount" value="6" /> <add key="ShowDataCount" value="6" />

1
APPQ5/QMAPP.WinForm/Forms/TianJin/RerportModel.ttx

@ -7,3 +7,4 @@ PRODNO String 100
CARSETDESCCN String 100 CARSETDESCCN String 100
PASTECARDNO String 100 PASTECARDNO String 100
SCANDATE String 100 SCANDATE String 100
PRODUCTCODE String 100

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

@ -45,6 +45,9 @@ namespace QMAPP.WinForm.Forms.TianJin
QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent();
List<BarcodeRules> _barcodeRules = null; List<BarcodeRules> _barcodeRules = null;
public delegate void myMethodDelegate(); public delegate void myMethodDelegate();
private string PlaceFirstPositionType = string.Empty;
#endregion #endregion
#region 变量 #region 变量
@ -67,6 +70,9 @@ namespace QMAPP.WinForm.Forms.TianJin
public TJFrmPlace() public TJFrmPlace()
{ {
InitializeComponent(); InitializeComponent();
PlaceFirstPositionType = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionType"].ToString();
_barcodeRules = _agent.InvokeServiceFunction<List<BarcodeRules>>("BarcodeRulesBLL_GetListForSend"); _barcodeRules = _agent.InvokeServiceFunction<List<BarcodeRules>>("BarcodeRulesBLL_GetListForSend");
} }
#endregion #endregion
@ -754,11 +760,11 @@ namespace QMAPP.WinForm.Forms.TianJin
//#region "隐藏了rb_hx 和rb_dx,全部根据pFisType判断,生产线的设置使用按钮进行设置" //#region "隐藏了rb_hx 和rb_dx,全部根据pFisType判断,生产线的设置使用按钮进行设置"
if (pFisType == "01") if (pFisType == "01")
{ {
strprodtype = "( )"; strprodtype = "( )";
} }
else if (pFisType == "02") else if (pFisType == "02")
{ {
strprodtype = "( )"; strprodtype = "( )";
} }
//提交数据处理 //提交数据处理
foreach (DataRow dr in tbl.Rows) foreach (DataRow dr in tbl.Rows)
@ -805,7 +811,7 @@ namespace QMAPP.WinForm.Forms.TianJin
nfpastecard.OPERATOR = ClientContext.LoginInfo.UserName.ToString(); nfpastecard.OPERATOR = ClientContext.LoginInfo.UserName.ToString();
// nfpastecard. // nfpastecard.
} }
int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard); int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
// 打印处理 // 打印处理
TJFrmCarCardPrintShow frm = new TJFrmCarCardPrintShow(nfpastecard, strprodtype, "手动"); TJFrmCarCardPrintShow frm = new TJFrmCarCardPrintShow(nfpastecard, strprodtype, "手动");
frm.Owner = this; frm.Owner = this;
@ -813,23 +819,6 @@ namespace QMAPP.WinForm.Forms.TianJin
frm.ShowDialog(); frm.ShowDialog();
isprint = frm.isprint; 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<int>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
// TJPrintPasteCard prin = new TJPrintPasteCard();
// prin.Print(strindex, nfpastecard, strprodtype);
// GetInitData();
// DGVRemoveRow(nflist, ref ncslist);
// nflist = new List<EPasteDetailsCard>();
// dgvNF.DataMember = null;
// dgvNF.DataSource = nflist;
// //computenfncs();
//}
} }
else else
{ {
@ -980,7 +969,7 @@ namespace QMAPP.WinForm.Forms.TianJin
nfpastecard.FailLog = log; nfpastecard.FailLog = log;
nfindex = 0; nfindex = 0;
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_AddPasteCard.ToString(), nfpastecard); int rowindex = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_AddNewPasteCard.ToString(), nfpastecard);
//BllFisOrder bllFisOrder = new BllFisOrder(); //BllFisOrder bllFisOrder = new BllFisOrder();
//int rowindex = bllFisOrder.AddPasteCard(nfpastecard); //int rowindex = bllFisOrder.AddPasteCard(nfpastecard);
TJPrintPasteCard prin = new TJPrintPasteCard(); TJPrintPasteCard prin = new TJPrintPasteCard();
@ -1040,7 +1029,7 @@ namespace QMAPP.WinForm.Forms.TianJin
if (openConfirmDialog if (openConfirmDialog
&& string.Equals(QMAPP.WinForm.Common.LocalSetting.Settings["AlertConfirmEnable", "0"], "1")) && 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.StartPosition = FormStartPosition.CenterScreen;
alertconfirm.ShowDialog(); alertconfirm.ShowDialog();
} }
@ -1126,21 +1115,20 @@ namespace QMAPP.WinForm.Forms.TianJin
dgvMATChange.Rows[temprowindex].Cells["STATE"].Value = "1"; dgvMATChange.Rows[temprowindex].Cells["STATE"].Value = "1";
temprowindex = dgvMATChange.Rows.Count;
break;
} }
else else
{ {
SetContainerItem(nfindex, false); SetContainerItem(nfindex, false);
Alert("条码错误:条码的零件号与FIS队列零件号不符合。"); Alert("条码错误:条码的零件号与FIS队列零件号不符合。");
break; return;
} }
} }
else else
{ {
SetContainerItem(nfindex, false); SetContainerItem(nfindex, false);
Alert("条码错误:条码已扫描或车型不符合。"); Alert("条码错误:条码已扫描或车型不符合。");
break; return;
} }
} }
@ -1148,9 +1136,11 @@ namespace QMAPP.WinForm.Forms.TianJin
else else
{ {
Alert("扫描条码重复,请重新扫描。"); Alert("扫描条码重复,请重新扫描。");
return;
} }
SetContainerItem(nfindex, true);
CreateNFPaste(Code); //创建NF的贴车单以及明细 CreateNFPaste(Code); //创建NF的贴车单以及明细
SetContainerItem(nfindex, true);
if (dgvMATChange.RowCount > 0) if (dgvMATChange.RowCount > 0)
{ {
dgvMATChange.FirstDisplayedScrollingRowIndex = nfindex - nfindex % 4; dgvMATChange.FirstDisplayedScrollingRowIndex = nfindex - nfindex % 4;
@ -1177,73 +1167,6 @@ namespace QMAPP.WinForm.Forms.TianJin
} }
inputstring = txtCode.Text.ToUpper(); inputstring = txtCode.Text.ToUpper();
this.lberror.Text = null; 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区是否有记录 #region fis区是否有记录
if (dgvMATChange.Rows.Count == 0) if (dgvMATChange.Rows.Count == 0)
@ -1260,10 +1183,8 @@ namespace QMAPP.WinForm.Forms.TianJin
if (this.dgvNF.Rows.Count == 0) //第一个码必须先扫描1号位 if (this.dgvNF.Rows.Count == 0) //第一个码必须先扫描1号位
{ {
string placeCode = txtCode.Text.Trim(); string placeCode = txtCode.Text.Trim();
var sss = System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString();
if (placeCode.Equals(System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString())) if (placeCode.Equals(System.Configuration.ConfigurationManager.AppSettings["PlaceFirstPositionCode"].ToString()))
{ {
this.placeFirstPosition = placeCode; this.placeFirstPosition = placeCode;
this.placeFirstPositionTime = DateTime.Now; this.placeFirstPositionTime = DateTime.Now;
this.txtCode.Text = ""; this.txtCode.Text = "";
@ -1275,38 +1196,6 @@ namespace QMAPP.WinForm.Forms.TianJin
#endregion #endregion
#region 一号位时间校验
//if (this.dgvNF.Rows.Count == 0 && !string.IsNullOrEmpty(this.placeFirstPosition))//超时判断
//{
// double timeOutSecond = 0;
// //获取超时时间设定值
// //DataTable dtTimeOut = new BllTimeOutSet().GetList();
// DataTable dtTimeOut = agent.InvokeServiceFunction<DataTable>(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号位 #region 请先扫描1号位
if (string.IsNullOrEmpty(this.placeFirstPosition)) if (string.IsNullOrEmpty(this.placeFirstPosition))
{ {
@ -1317,27 +1206,89 @@ namespace QMAPP.WinForm.Forms.TianJin
} }
#endregion #endregion
#region FIS区域数据全部扫描完成,请获取数据后再扫描 #region 计划外发运
if (dgvNF.Rows.Count >= dgvMATChange.Rows.Count)
if (inputstring.Equals("FIRSTPOSITIONTYPE"))
{ {
Alert("当前计划数据全部扫描完成,请下达计划后再扫描!"); if (PlaceFirstPositionType == "False")
{
PlaceFirstPositionType = "True";
lberror.Text = "关闭验证!";
}
else
{
PlaceFirstPositionType = "False";
lberror.Text = "打开验证!";
}
this.txtCode.Text = "";
//处理条码扫描文本框
ArragetxtCode(); ArragetxtCode();
return; return;
} }
inputstring += DateTime.Now.ToString("yyyyMMddHHmmssfff");
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;
}
}
}
string msgs = "";
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))
{
strprodno = rule.MATERIAL_CODE;
strmouldcode = rule.REMARK;
strcarsetdesc_cn = rule.MATERIAL_TYPE;
}
}
CreateNFPaste(inputstring); //创建NF的贴车单以及明细
//CreateNFPaste__();
SetContainerItem(nfindex, true); //变更右下角位置颜色
txtCode.Text = "";
txtCode.Focus();
return;
#endregion #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 (txtCode.Text.Length <= ll || txtCode.Text.Length >= ul) }
//{
// Alert("条码错误:条码长度不符合要求(" + ll.ToString() + "-" + ul.ToString() + ")。");
// ArragetxtCode(); #endregion
// return;
//} #region FIS区域数据全部扫描完成,请获取数据后再扫描
if (dgvNF.Rows.Count >= dgvMATChange.Rows.Count)
{
Alert("当前计划数据全部扫描完成,请下达计划后再扫描!");
ArragetxtCode();
return;
}
#endregion #endregion
#region 校验位计算 #region 校验位计算
@ -1374,11 +1325,50 @@ 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 判断当前扫描过的数据集合中是否有相同条码
//判断当前扫描过的数据集合中是否有相同条码
string msg = "";
CheckDataBase(Code,ref msg);
if (!string.IsNullOrEmpty(msg))
{
Alert("该条码已扫描!");
txtCode.Text = "";
txtCode.Focus();
return;
}
#endregion
#endregion #endregion
//规则 //规则
bool signal = false; bool signal = false;
string outSourceProduct = "";
string MOULD_CODE = ""; string MOULD_CODE = "";
foreach (var rule in _barcodeRules) foreach (var rule in _barcodeRules)
{ {
@ -1386,7 +1376,7 @@ namespace QMAPP.WinForm.Forms.TianJin
{ {
signal = true; signal = true;
ProMaterial = rule.MATERIAL_CODE; ProMaterial = rule.MATERIAL_CODE;
outSourceProduct = rule.DATA_TYPE;
MOULD_CODE = rule.REMARK; MOULD_CODE = rule.REMARK;
} }
} }
@ -1415,56 +1405,8 @@ namespace QMAPP.WinForm.Forms.TianJin
//-------------------------End----------- //-------------------------End-----------
#endregion #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<DataResult<MaterialClass>>("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<FJC.Entity.ProductIn.ProductIn>("ProductInBLL_GetInRecord", Code);
//if (inrecord != null)
//{
// SetContainerItem(nfindex, false);
// Alert("此产品为退返件,请更换总成标签后再发运!");
// txtCode.Text = "";
// txtCode.Focus();
// return;
//}
#endregion
#region 4.与FIS数据匹配 #region 4.与FIS数据匹配
//4.与FIS数据匹配 //4.与FIS数据匹配 匹配到计划后 开始生成贴车单
FISDataCompare(Code, ProMaterial, MOULD_CODE); FISDataCompare(Code, ProMaterial, MOULD_CODE);
#endregion #endregion
@ -1480,38 +1422,6 @@ namespace QMAPP.WinForm.Forms.TianJin
#endregion #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 处理条码扫描文本框 #region 处理条码扫描文本框
ArragetxtCode(); ArragetxtCode();
#endregion #endregion
@ -1655,8 +1565,9 @@ namespace QMAPP.WinForm.Forms.TianJin
/// 判断数据库中是否有相同的条码 /// 判断数据库中是否有相同的条码
/// </summary> /// </summary>
/// <param name="strbarcode">扫描条码</param> /// <param name="strbarcode">扫描条码</param>
private void CheckDataBase(string strbarcode) private void CheckDataBase(string strbarcode,ref string messages)
{ {
var messagess = "";
barcodeidentification = ""; barcodeidentification = "";
//特殊条码,当丢失条码或者条码损坏时,扫描一个特殊条码 //特殊条码,当丢失条码或者条码损坏时,扫描一个特殊条码
@ -1665,9 +1576,10 @@ namespace QMAPP.WinForm.Forms.TianJin
if (tblbarcode.Rows.Count > 0) if (tblbarcode.Rows.Count > 0)
{ {
messagess = "扫描条码重复,请重新扫描。";
Alert("扫描条码重复,请重新扫描。"); Alert("扫描条码重复,请重新扫描。");
} }
messages = messagess;
} }
#endregion #endregion
@ -1821,11 +1733,11 @@ namespace QMAPP.WinForm.Forms.TianJin
nfpastecard.DetailsCardlist = new List<TJEPasteDetailsCard>(); nfpastecard.DetailsCardlist = new List<TJEPasteDetailsCard>();
nfpastecard.PASTE_CARD_KEY = nfpastcardkey; nfpastecard.PASTE_CARD_KEY = nfpastcardkey;
nfpastecard.PASTECARDNO = ""; nfpastecard.PASTECARDNO = "";
nfpastecard.PRODUCTIONNAME = pFisType; nfpastecard.PRODUCTIONNAME = "DPFY" + pFisType;
nfpastecard.PASTECARDDATE = DateTime.Now.ToString(); nfpastecard.PASTECARDDATE = DateTime.Now.ToString();
nfpastecard.OPERATOR = UserBuffer.UserCode; nfpastecard.OPERATOR = UserBuffer.UserCode;
nfpastecard.CREATETIME = DateTime.Now.ToString(); nfpastecard.CREATETIME = DateTime.Now.ToString();
nfpastecard.PLANTNAME = pFisType.ToString(); nfpastecard.PLANTNAME = "DPFY"+pFisType.ToString();
} }
TJEPasteDetailsCard pastdetail = new TJEPasteDetailsCard(); TJEPasteDetailsCard pastdetail = new TJEPasteDetailsCard();
@ -1874,7 +1786,7 @@ namespace QMAPP.WinForm.Forms.TianJin
if (tbl.Rows.Count == 0) if (tbl.Rows.Count == 0)
{ {
nfpastecard.PASTECARDNO = WORKCENTER_CODE + DateTime.Now.ToString("yyyyMMdd") + "0001"; nfpastecard.PASTECARDNO = nfpastecard.PLANTNAME + DateTime.Now.ToString("yyyyMMdd") + "0001";
int delResult = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_InsertDaspssteCarIndexByPlanName.ToString(), nfpastecard); int delResult = agent.InvokeServiceFunction<int>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_InsertDaspssteCarIndexByPlanName.ToString(), nfpastecard);
} }
else else
@ -2156,15 +2068,8 @@ namespace QMAPP.WinForm.Forms.TianJin
} }
for (int i = 0; i < tpContainer.ColumnCount; i++) 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)); 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++) for (int j = 0; j < tpContainer.RowCount; j++)
{ {
Label lblItem = new Label(); Label lblItem = new Label();
@ -2175,7 +2080,7 @@ namespace QMAPP.WinForm.Forms.TianJin
tpContainer.Controls.Add(lblItem, i, j); tpContainer.Controls.Add(lblItem, i, j);
} }
} }
//tpContainer.Height = tpContainer.RowCount * (3 + (tpContainer.ColumnCount > 8 ? 60 : 90));
for (int i = 0; i < nfindex; i++) for (int i = 0; i < nfindex; i++)
{ {
SetContainerItem(i, true); SetContainerItem(i, true);
@ -2190,6 +2095,16 @@ namespace QMAPP.WinForm.Forms.TianJin
/// <param name="result"></param> /// <param name="result"></param>
public void SetContainerItem(int itemindex, bool result) public void SetContainerItem(int itemindex, bool result)
{ {
if (itemindex == 0)
return;
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 columnindex = itemindex / (tpContainer.RowCount);
var rowindex = itemindex % (tpContainer.RowCount); var rowindex = itemindex % (tpContainer.RowCount);
var label = tpContainer.GetControlFromPosition(columnindex, rowindex) as Label; var label = tpContainer.GetControlFromPosition(columnindex, rowindex) as Label;
@ -2199,6 +2114,8 @@ namespace QMAPP.WinForm.Forms.TianJin
} }
} }
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>

BIN
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt

Binary file not shown.

512
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.Designer.cs

@ -0,0 +1,512 @@
namespace QMAPP.WinForm.Forms.TianJin
{
partial class TJPrintPlanLabel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TJPrintPlanLabel));
this.dgvPlan = new System.Windows.Forms.DataGridView();
this.dgcOrderNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgcSeq = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgcMaterialCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgcMaterialName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgcState = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgcPlanDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgcShift = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tpContent = new System.Windows.Forms.TabControl();
this.tpPlanList = new System.Windows.Forms.TabPage();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.tsbPrint = new System.Windows.Forms.ToolStripButton();
this.tsbOrderOperation = new System.Windows.Forms.ToolStripDropDownButton();
this.tsmiSuspendOrder = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiCancelSuspend = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiDeleteOrder = new System.Windows.Forms.ToolStripMenuItem();
this.tslblOrderCount = new System.Windows.Forms.ToolStripLabel();
this.label1 = new System.Windows.Forms.Label();
this.cbRoutes = new System.Windows.Forms.ComboBox();
this.cbPlanFilter = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
this.cbListRowcount = new System.Windows.Forms.ComboBox();
this.cbRefreshRate = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
((System.ComponentModel.ISupportInitialize)(this.dgvPlan)).BeginInit();
this.tpContent.SuspendLayout();
this.tpPlanList.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// dgvPlan
//
this.dgvPlan.AllowUserToAddRows = false;
this.dgvPlan.AllowUserToDeleteRows = false;
this.dgvPlan.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dgvPlan.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dgvPlan.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvPlan.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvPlan.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvPlan.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dgcOrderNo,
this.dgcSeq,
this.dgcMaterialCode,
this.dgcMaterialName,
this.dgcState,
this.dgcPlanDate,
this.dgcShift,
this.dataGridViewTextBoxColumn8,
this.dataGridViewTextBoxColumn9,
this.dataGridViewTextBoxColumn10,
this.dataGridViewTextBoxColumn11});
this.dgvPlan.Location = new System.Drawing.Point(6, 6);
this.dgvPlan.Name = "dgvPlan";
this.dgvPlan.ReadOnly = true;
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvPlan.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle10.Padding = new System.Windows.Forms.Padding(0, 0, 8, 0);
this.dgvPlan.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.dgvPlan.RowTemplate.Height = 23;
this.dgvPlan.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvPlan.Size = new System.Drawing.Size(852, 183);
this.dgvPlan.TabIndex = 7;
this.dgvPlan.RowPrePaint += new System.Windows.Forms.DataGridViewRowPrePaintEventHandler(this.dgvPlan_RowPrePaint);
this.dgvPlan.SelectionChanged += new System.EventHandler(this.dgvPlan_SelectionChanged);
//
// dgcOrderNo
//
this.dgcOrderNo.DataPropertyName = "ORDERPLAN_NO";
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgcOrderNo.DefaultCellStyle = dataGridViewCellStyle2;
this.dgcOrderNo.HeaderText = "订单号";
this.dgcOrderNo.Name = "dgcOrderNo";
this.dgcOrderNo.ReadOnly = true;
this.dgcOrderNo.Width = 94;
//
// dgcSeq
//
this.dgcSeq.DataPropertyName = "SEQ";
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcSeq.DefaultCellStyle = dataGridViewCellStyle3;
this.dgcSeq.HeaderText = "顺序号";
this.dgcSeq.Name = "dgcSeq";
this.dgcSeq.ReadOnly = true;
this.dgcSeq.Width = 94;
//
// dgcMaterialCode
//
this.dgcMaterialCode.DataPropertyName = "MATERIAL_CODE";
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcMaterialCode.DefaultCellStyle = dataGridViewCellStyle4;
this.dgcMaterialCode.HeaderText = "零件号";
this.dgcMaterialCode.Name = "dgcMaterialCode";
this.dgcMaterialCode.ReadOnly = true;
this.dgcMaterialCode.Width = 94;
//
// dgcMaterialName
//
this.dgcMaterialName.DataPropertyName = "MATERIAL_NAME";
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcMaterialName.DefaultCellStyle = dataGridViewCellStyle5;
this.dgcMaterialName.HeaderText = "零件描述";
this.dgcMaterialName.Name = "dgcMaterialName";
this.dgcMaterialName.ReadOnly = true;
this.dgcMaterialName.Width = 113;
//
// dgcState
//
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgcState.DefaultCellStyle = dataGridViewCellStyle6;
this.dgcState.HeaderText = "工单状态";
this.dgcState.MinimumWidth = 80;
this.dgcState.Name = "dgcState";
this.dgcState.ReadOnly = true;
this.dgcState.Width = 113;
//
// dgcPlanDate
//
this.dgcPlanDate.DataPropertyName = "PLAN_DATE";
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcPlanDate.DefaultCellStyle = dataGridViewCellStyle7;
this.dgcPlanDate.HeaderText = "计划日期";
this.dgcPlanDate.Name = "dgcPlanDate";
this.dgcPlanDate.ReadOnly = true;
this.dgcPlanDate.Width = 113;
//
// dgcShift
//
this.dgcShift.DataPropertyName = "SHIFT_CODE";
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcShift.DefaultCellStyle = dataGridViewCellStyle8;
this.dgcShift.HeaderText = "计划类型";
this.dgcShift.Name = "dgcShift";
this.dgcShift.ReadOnly = true;
this.dgcShift.Width = 113;
//
// dataGridViewTextBoxColumn8
//
this.dataGridViewTextBoxColumn8.DataPropertyName = "PID";
this.dataGridViewTextBoxColumn8.HeaderText = "Pid";
this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
this.dataGridViewTextBoxColumn8.ReadOnly = true;
this.dataGridViewTextBoxColumn8.Visible = false;
this.dataGridViewTextBoxColumn8.Width = 66;
//
// dataGridViewTextBoxColumn9
//
this.dataGridViewTextBoxColumn9.DataPropertyName = "PDID";
this.dataGridViewTextBoxColumn9.HeaderText = "PROID";
this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
this.dataGridViewTextBoxColumn9.ReadOnly = true;
this.dataGridViewTextBoxColumn9.Visible = false;
this.dataGridViewTextBoxColumn9.Width = 96;
//
// dataGridViewTextBoxColumn10
//
this.dataGridViewTextBoxColumn10.DataPropertyName = "PRODUCTTYPE";
this.dataGridViewTextBoxColumn10.HeaderText = "PType";
this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
this.dataGridViewTextBoxColumn10.ReadOnly = true;
this.dataGridViewTextBoxColumn10.Visible = false;
this.dataGridViewTextBoxColumn10.Width = 93;
//
// dataGridViewTextBoxColumn11
//
this.dataGridViewTextBoxColumn11.DataPropertyName = "OPERATESTATE";
this.dataGridViewTextBoxColumn11.HeaderText = "OPERATESTATE";
this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
this.dataGridViewTextBoxColumn11.ReadOnly = true;
this.dataGridViewTextBoxColumn11.Visible = false;
this.dataGridViewTextBoxColumn11.Width = 176;
//
// tpContent
//
this.tpContent.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tpContent.Controls.Add(this.tpPlanList);
this.tpContent.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tpContent.ItemSize = new System.Drawing.Size(120, 45);
this.tpContent.Location = new System.Drawing.Point(5, 55);
this.tpContent.Name = "tpContent";
this.tpContent.SelectedIndex = 0;
this.tpContent.Size = new System.Drawing.Size(872, 323);
this.tpContent.TabIndex = 0;
//
// tpPlanList
//
this.tpPlanList.Controls.Add(this.toolStrip1);
this.tpPlanList.Controls.Add(this.dgvPlan);
this.tpPlanList.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tpPlanList.Location = new System.Drawing.Point(4, 49);
this.tpPlanList.Name = "tpPlanList";
this.tpPlanList.Padding = new System.Windows.Forms.Padding(3);
this.tpPlanList.Size = new System.Drawing.Size(864, 270);
this.tpPlanList.TabIndex = 0;
this.tpPlanList.Text = "计划列表";
this.tpPlanList.UseVisualStyleBackColor = true;
//
// toolStrip1
//
this.toolStrip1.AutoSize = false;
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbPrint,
this.tsbOrderOperation,
this.tslblOrderCount});
this.toolStrip1.Location = new System.Drawing.Point(3, 197);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(858, 70);
this.toolStrip1.Stretch = true;
this.toolStrip1.TabIndex = 0;
this.toolStrip1.Text = "toolStrip1";
//
// tsbPrint
//
this.tsbPrint.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsbPrint.Font = new System.Drawing.Font("微软雅黑", 12F);
this.tsbPrint.Image = ((System.Drawing.Image)(resources.GetObject("tsbPrint.Image")));
this.tsbPrint.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.tsbPrint.ImageTransparentColor = System.Drawing.Color.White;
this.tsbPrint.Name = "tsbPrint";
this.tsbPrint.Size = new System.Drawing.Size(114, 67);
this.tsbPrint.Text = "打印(&P)";
this.tsbPrint.Click += new System.EventHandler(this.tsbPrint_Click);
//
// tsbOrderOperation
//
this.tsbOrderOperation.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.tsbOrderOperation.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsmiSuspendOrder,
this.tsmiCancelSuspend,
this.tsmiDeleteOrder});
this.tsbOrderOperation.Font = new System.Drawing.Font("微软雅黑", 12F);
this.tsbOrderOperation.Image = global::QMAPP.WinForm.Resource1.edit;
this.tsbOrderOperation.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.tsbOrderOperation.ImageTransparentColor = System.Drawing.Color.White;
this.tsbOrderOperation.Name = "tsbOrderOperation";
this.tsbOrderOperation.Size = new System.Drawing.Size(135, 67);
this.tsbOrderOperation.Text = "工单操作";
//
// tsmiSuspendOrder
//
this.tsmiSuspendOrder.Image = global::QMAPP.WinForm.Resource1.stop;
this.tsmiSuspendOrder.Margin = new System.Windows.Forms.Padding(0, 7, 0, 7);
this.tsmiSuspendOrder.Name = "tsmiSuspendOrder";
this.tsmiSuspendOrder.Size = new System.Drawing.Size(144, 26);
this.tsmiSuspendOrder.Text = "挂起工单";
this.tsmiSuspendOrder.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.tsmiSuspendOrder.Click += new System.EventHandler(this.tsmiSuspendOrder_Click);
//
// tsmiCancelSuspend
//
this.tsmiCancelSuspend.Image = global::QMAPP.WinForm.Resource1.back;
this.tsmiCancelSuspend.Margin = new System.Windows.Forms.Padding(0, 7, 0, 7);
this.tsmiCancelSuspend.Name = "tsmiCancelSuspend";
this.tsmiCancelSuspend.Size = new System.Drawing.Size(144, 26);
this.tsmiCancelSuspend.Text = "取消挂起";
this.tsmiCancelSuspend.Click += new System.EventHandler(this.tsmiCancelSuspend_Click);
//
// tsmiDeleteOrder
//
this.tsmiDeleteOrder.Image = global::QMAPP.WinForm.Resource1.delete;
this.tsmiDeleteOrder.Margin = new System.Windows.Forms.Padding(0, 7, 0, 7);
this.tsmiDeleteOrder.Name = "tsmiDeleteOrder";
this.tsmiDeleteOrder.Size = new System.Drawing.Size(144, 26);
this.tsmiDeleteOrder.Text = "删除工单";
this.tsmiDeleteOrder.Click += new System.EventHandler(this.tsmiDeleteOrder_Click);
//
// tslblOrderCount
//
this.tslblOrderCount.Font = new System.Drawing.Font("微软雅黑", 14F);
this.tslblOrderCount.Name = "tslblOrderCount";
this.tslblOrderCount.Size = new System.Drawing.Size(140, 67);
this.tslblOrderCount.Text = "计划总数:100";
this.tslblOrderCount.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(69, 25);
this.label1.TabIndex = 10;
this.label1.Text = "生产线";
//
// cbRoutes
//
this.cbRoutes.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbRoutes.FormattingEnabled = true;
this.cbRoutes.Location = new System.Drawing.Point(87, 10);
this.cbRoutes.Name = "cbRoutes";
this.cbRoutes.Size = new System.Drawing.Size(359, 33);
this.cbRoutes.TabIndex = 1;
//
// cbPlanFilter
//
this.cbPlanFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cbPlanFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbPlanFilter.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbPlanFilter.FormattingEnabled = true;
this.cbPlanFilter.Items.AddRange(new object[] {
"显示全部工单",
"隐藏挂起工单",
"只看挂起工单"});
this.cbPlanFilter.Location = new System.Drawing.Point(351, 66);
this.cbPlanFilter.Name = "cbPlanFilter";
this.cbPlanFilter.Size = new System.Drawing.Size(175, 33);
this.cbPlanFilter.TabIndex = 2;
//
// label10
//
this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label10.Location = new System.Drawing.Point(283, 72);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(65, 20);
this.label10.TabIndex = 16;
this.label10.Text = "工单过滤";
//
// cbListRowcount
//
this.cbListRowcount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cbListRowcount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbListRowcount.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbListRowcount.FormattingEnabled = true;
this.cbListRowcount.Items.AddRange(new object[] {
"20",
"30",
"40",
"50",
"100"});
this.cbListRowcount.Location = new System.Drawing.Point(625, 66);
this.cbListRowcount.Name = "cbListRowcount";
this.cbListRowcount.Size = new System.Drawing.Size(78, 33);
this.cbListRowcount.TabIndex = 3;
//
// cbRefreshRate
//
this.cbRefreshRate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.cbRefreshRate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbRefreshRate.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cbRefreshRate.FormattingEnabled = true;
this.cbRefreshRate.Items.AddRange(new object[] {
"1s",
"2s",
"5s",
"10s",
"15s",
"20s"});
this.cbRefreshRate.Location = new System.Drawing.Point(802, 66);
this.cbRefreshRate.Name = "cbRefreshRate";
this.cbRefreshRate.Size = new System.Drawing.Size(66, 33);
this.cbRefreshRate.TabIndex = 4;
//
// label8
//
this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(529, 72);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(93, 20);
this.label8.TabIndex = 12;
this.label8.Text = "列表显示行数";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(706, 72);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(93, 20);
this.label6.TabIndex = 13;
this.label6.Text = "计划刷新频率";
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// PrintPlanLabel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 25F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(880, 382);
this.Controls.Add(this.cbPlanFilter);
this.Controls.Add(this.label10);
this.Controls.Add(this.cbListRowcount);
this.Controls.Add(this.cbRefreshRate);
this.Controls.Add(this.label8);
this.Controls.Add(this.label6);
this.Controls.Add(this.cbRoutes);
this.Controls.Add(this.label1);
this.Controls.Add(this.tpContent);
this.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
this.Name = "PrintPlanLabel";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "门板计划标签打印";
this.Load += new System.EventHandler(this.PrintPlanLabel_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvPlan)).EndInit();
this.tpContent.ResumeLayout(false);
this.tpPlanList.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView dgvPlan;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcOrderNo;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcSeq;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcMaterialCode;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcMaterialName;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcState;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcPlanDate;
private System.Windows.Forms.DataGridViewTextBoxColumn dgcShift;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
private System.Windows.Forms.TabControl tpContent;
private System.Windows.Forms.TabPage tpPlanList;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cbRoutes;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton tsbPrint;
private System.Windows.Forms.ToolStripDropDownButton tsbOrderOperation;
private System.Windows.Forms.ToolStripMenuItem tsmiSuspendOrder;
private System.Windows.Forms.ToolStripMenuItem tsmiCancelSuspend;
private System.Windows.Forms.ToolStripMenuItem tsmiDeleteOrder;
private System.Windows.Forms.ToolStripLabel tslblOrderCount;
private System.Windows.Forms.ComboBox cbPlanFilter;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.ComboBox cbListRowcount;
private System.Windows.Forms.ComboBox cbRefreshRate;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Timer timer1;
}
}

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

@ -0,0 +1,513 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QMAPP.FJC.Entity.Basic;
using QMAPP.FJC.Entity.Operation;
using QMAPP.ServicesAgent;
using QMAPP.MD.Entity;
using QMAPP.Entity;
using QMFrameWork.Data;
using System.Configuration;
namespace QMAPP.WinForm.Forms.TianJin
{
public partial class TJPrintPlanLabel : Form
{
QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent();
List<QMAPP.FJC.Entity.Basic.ProcessRoute> cbsource = null;
/// <summary>
///
/// </summary>
public TJPrintPlanLabel()
{
InitializeComponent();
}
/// <summary>
/// 加载工艺路线
/// </summary>
private void LoadProcessRoute()
{
var routes = _agent.InvokeServiceFunction<DataResult<List<QMAPP.FJC.Entity.Basic.ProcessRoute>>>
("ProcessRouteBLL_GetProcessRouteList", new QMAPP.FJC.Entity.Basic.ProcessRoute { }).Result;
routes = routes.OrderBy(p => p.ROUTE_CODE).ToList();
cbsource = routes;
cbsource.Insert(0, new QMAPP.FJC.Entity.Basic.ProcessRoute { ROUTE_NAME = "", ROUTE_CODE = "" });
cbRoutes.DisplayMember = "ROUTE_NAME";
cbRoutes.ValueMember = "ROUTE_CODE";
cbRoutes.DataSource = cbsource;
}
#region 加载列表显示设置
/// <summary>
/// 加载列表显示设置
/// </summary>
private void LoadViewSetting()
{
#region 加载列表显示设置
string filepath = ConfigurationManager.AppSettings["SaveFilePath"];
filepath = string.Format("{0}ViewSetting.cfg", filepath);
var setting = new { ListRowcount = 20, RefreshRate = 5 };
if (System.IO.File.Exists(filepath))
{
string settingstring = System.IO.File.ReadAllText(filepath);
setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting);
}
cbListRowcount.Text = setting.ListRowcount.ToString();
cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate);
cbPlanFilter.SelectedIndex = 1;
cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged);
cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged);
cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged);
#endregion
}
#endregion
#region 列表定时刷新
private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e)
{
SaveSetting();
BindPlanView();
}
/// <summary>
/// 发送指令或者接受完成指令刷新列表
/// </summary>
public void BindPlanView()
{
#region 刷新生产计划
dgvPlan.AutoGenerateColumns = false;
this.dgvPlan.DataSource = new List<FJC.Entity.ProductionPlan.WorkOrder>();
try
{
DataPage dataPage = new DataPage();
dataPage.PageSize = int.Parse(cbListRowcount.Text);
dataPage.PageIndex = 1;
dataPage.SortExpression = " ROWVALUE ASC";
#region 服务查询
var orderlist = _agent.InvokeServiceFunction<List<FJC.Entity.ProductionPlan.WorkOrder>>("WorkOrderBLL_GetOrderUnPrinted", cbRoutes.SelectedValue.ToString(), cbPlanFilter.SelectedIndex, dataPage);
#endregion
this.dgvPlan.DataSource = orderlist;
}
catch (Exception ex)
{
WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message);
}
finally
{
timecounter = 0;
}
#endregion
}
private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e)
{
SaveSetting();
}
private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e)
{
BindPlanView();
SaveSetting();
}
private void SaveSetting()
{
string filepath = ConfigurationManager.AppSettings["SaveFilePath"];
filepath = string.Format("{0}ViewSetting.cfg", filepath);
var setting = new
{
ListRowcount = int.Parse(cbListRowcount.Text),
RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')),
//PlanFilter = cbPlanFilter.SelectedIndex
};
string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting);
System.IO.File.WriteAllText(filepath, settingstring);
}
int timecounter = 0;
private void timer1_Tick(object sender, EventArgs e)
{
if (!tsbOrderOperation.DropDown.Visible)
{
timecounter += 1;
if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间
{
BindPlanView();
}
}
}
#endregion
private void PrintLabel(List<LabelData> labeldata)
{
#region 计划标签打印
//string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ;
//BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath);
//bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE);
QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo();
StringBuilder dataline=new StringBuilder();
foreach (var label in labeldata)
{
string[] texts = new string[6];
var sourcetext = label.Description.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < texts.Length && i < sourcetext.Length; i++)
{
texts[i] = sourcetext[i];
}
//OrderNo,OrderType,PlanDate,Name,Class,CarModel,Text1,Text2,Text3,Text4,Text5,Text6
dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\"\r\n",
label.OrderNo,//计划号
label.OrderType,//计划类型(0:FIS,1:STOCK,2:INSERT)
label.PlanDate,//计划日期
label.MaterialName,//总成物料名称
label.Class,//
label.CarModel,//车型
texts[0],//装配详细信息
texts[1],//装配详细信息
texts[2],//装配详细信息
texts[3],//装配详细信息
texts[4],//装配详细信息
texts[5]//装配详细信息
);
}
ll.BarCode=dataline.ToString().TrimEnd('\r','\n');
ll.PrinterName = "";
QM.Assist.PrintUtil.LabelList2.Add(ll);
QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil();
pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString
(), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString
(), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString
());
#endregion
}
private void PrintPlanLabel_Load(object sender, EventArgs e)
{
LoadViewSetting();
LoadProcessRoute();
//如果工位已设定
if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID))
{
//this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE;
var route = _agent.InvokeServiceFunction<QMAPP.FJC.Entity.Basic.ProcessRoute>
("ProcessRouteBLL_GetRouteByMachine", ClientContext.MachineInfo.MACHINECODDE);
if (route != null)
{
this.cbRoutes.SelectedValue = route.ROUTE_CODE;
this.cbRoutes.Enabled = false;
}
else
{
this.cbRoutes.Enabled = true;
}
}
else
{
this.cbRoutes.Enabled = true;
}
BindPlanView();
cbRoutes.SelectedIndexChanged += new EventHandler(cbRoutes_SelectedIndexChanged);
}
void cbRoutes_SelectedIndexChanged(object sender, EventArgs e)
{
BindPlanView();
}
#region 工单操作
#region 取消挂起
/// <summary>
/// 取消挂起
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tsmiCancelSuspend_Click(object sender, EventArgs e)
{
if (dgvPlan.SelectedRows.Count <= 0)
{
MessageBox.Show("请选择一条工单进行取消挂起操作!");
return;
}
List<string> ids = new List<string>();
foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows)
{
var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem;
if (!int.Equals(order.STATE, 4))
{
MessageBox.Show("只可取消状态为挂起的工单!");
return;
}
ids.Add(order.PID);
}
_agent.InvokeServiceFunction<int>(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids);
BindPlanView();
}
#endregion
#region 删除工单
/// <summary>
/// 删除工单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tsmiDeleteOrder_Click(object sender, EventArgs e)
{
if (dgvPlan.SelectedRows.Count <= 0)
{
MessageBox.Show("请选择一条工单进行删除操作!");
return;
}
List<string> ids = new List<string>();
foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows)
{
var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem;
if (!int.Equals(order.STATE, 4))
{
MessageBox.Show("只可删除状态为挂起的工单!");
return;
}
ids.Add(order.PID);
}
_agent.InvokeServiceFunction<int>(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids);
BindPlanView();
}
#endregion
#region 重置工单
/// <summary>
/// 重置工单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tsmiResetOrder_Click(object sender, EventArgs e)
{
if (dgvPlan.SelectedRows.Count <= 0)
{
MessageBox.Show("请选择一条工单进行重置操作!");
return;
}
List<string> ids = new List<string>();
foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows)
{
var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem;
if (!int.Equals(order.STATE, 4))
{
MessageBox.Show("只可重置状态为挂起的工单!");
return;
}
ids.Add(order.PID);
}
_agent.InvokeServiceFunction<int>(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids);
BindPlanView();
}
#endregion
#region 挂起工单
/// <summary>
/// 挂起工单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tsmiSuspendOrder_Click(object sender, EventArgs e)
{
if (dgvPlan.SelectedRows.Count <= 0)
{
MessageBox.Show("请选择一条工单进行挂起操作!");
return;
}
List<string> ids = new List<string>();
foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows)
{
var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem;
if (int.Equals(order.STATE, 2))
{
MessageBox.Show("不能挂起正在执行的工单!");
return;
}
ids.Add(order.PID);
}
_agent.InvokeServiceFunction<int>(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids);
BindPlanView();
}
#endregion
#region 回收工单
/// <summary>
/// 回收工单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tsmiTakebackOrder_Click(object sender, EventArgs e)
{
if (dgvPlan.SelectedRows.Count <= 0)
{
MessageBox.Show("请选择一条工单进行回收操作!");
return;
}
List<string> ids = new List<string>();
foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows)
{
var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem;
if (!int.Equals(order.STATE, 4))
{
MessageBox.Show("只可回收状态为挂起的工单!");
return;
}
ids.Add(order.PID);
}
_agent.InvokeServiceFunction<int>(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids);
BindPlanView();
}
#endregion
#endregion
#region 工单列表选择发送变化时延时自动刷新
/// <summary>
/// 工单列表选择发送变化时延时自动刷新
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dgvPlan_SelectionChanged(object sender, EventArgs e)
{
timecounter = -10;
}
#endregion
#region 设置计划工单列状态、颜色
/// <summary>
/// 设置计划工单列状态、颜色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
{
var WORKORDER_STATE_TEXT = new string[] { "初始", "确认", "执行中", "完成", "挂起" };
var row = dgvPlan.Rows[e.RowIndex];
var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem;
if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length)
{
row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE];
}
if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode())
{
row.DefaultCellStyle.BackColor = Color.LightGray;
row.DefaultCellStyle.ForeColor = Color.Gray;
}
if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode())
{
row.DefaultCellStyle.BackColor = Color.YellowGreen;
dgvPlan.ClearSelection();
}
}
#endregion
private void tsbPrint_Click(object sender, EventArgs e)
{
if (dgvPlan.Rows.Count == 0)
{
MessageBox.Show("当前生产线没有未打印标签的计划工单!");
}
tsbPrint.Enabled = false;
var order1 = (FJC.Entity.ProductionPlan.WorkOrder)dgvPlan.Rows[0].DataBoundItem;
var order2 = (FJC.Entity.ProductionPlan.WorkOrder)dgvPlan.Rows[1].DataBoundItem;
var orders = new List<FJC.Entity.ProductionPlan.WorkOrder>();
orders.Add(order1);
//if (string.Equals(order1.SEQ, order2.SEQ))
//{
// orders.Add(order2);
//}
List<LabelData> labels = new List<LabelData>();
foreach (var order in orders)
{
var data = DateTime.Now.ToString("yyyyMMddHHmmssfff");
//var codematch = System.Text.RegularExpressions.Regex.Match(order.PBOM_CODE, "_[LR][FR]_");
string positioncode = GetNameCode(order.MATERIAL_NAME);
var book = _agent.InvokeServiceFunction<FJC.Entity.FIS.FISPhraseBook>("FISPhraseBLL_GetFisPhraseBook", order.MATERIAL_CODE + "", positioncode);
LabelData labeldata = new LabelData();
labeldata.PlanDate = order.PLAN_DATE;
if (book != null)
{
labeldata.Class = " " + book.Class.Substring(0, 2);
labeldata.Description = book.Text;
labeldata.OrderNo = book.CarModel+ positioncode+ data;
}
var mcresult = _agent.InvokeServiceFunction<DataResult<Material>>("MaterialBLL_Get", new Material { MATERIAL_CODE = order.MATERIAL_CODE });
var material = mcresult.IsSuccess ? mcresult.Result : null;
if (material != null)
{
labeldata.MaterialName = material.MATERIAL_SHORT;
labeldata.CarModel = material.PROJECTCODE;
}
labels.Add(labeldata);
}
PrintLabel(labels);
//变更打印状态 0=>1
foreach (var order in orders)
{
//agent.InvokeServiceFunction<int>("WorkOrderBLL_SetOrderPrinted", order.PID);
}
BindPlanView();
tsbPrint.Enabled = true;
}
public string GetNameCode(string Name)
{
var Code = "";
if (!string.IsNullOrEmpty(Name))
{
if(Name.Contains("左前"))
Code = "FL";
else if(Name.Contains("左后"))
Code = "RL";
else if (Name.Contains("右前"))
Code = "FR";
else if (Name.Contains("右后"))
Code = "RR";
return Code;
}
else
return null;
}
}
class LabelData
{
public string OrderNo { get; set; }
public DateTime PlanDate { get; set; }
public string Class { get; set; }
public string Description { get; set; }
public string MaterialName { get; set; }
public string CarModel { get; set; }
public object[] OrderType { get; set; }
}
}

234
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="dgcOrderNo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgcSeq.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgcMaterialCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgcMaterialName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgcState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgcPlanDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgcShift.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbPrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
RK5CYII=
</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>127, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>63</value>
</metadata>
</root>

10
APPQ5/QMAPP.WinForm/MainForm.Designer.cs

@ -46,6 +46,7 @@
this.btnOperateStation = new System.Windows.Forms.ToolStripMenuItem(); this.btnOperateStation = new System.Windows.Forms.ToolStripMenuItem();
this.PrintCodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.PrintCodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tsmiPrintPlanlabel = new System.Windows.Forms.ToolStripMenuItem(); this.tsmiPrintPlanlabel = new System.Windows.Forms.ToolStripMenuItem();
this.TJtsmiPrintPlanlabel = new System.Windows.Forms.ToolStripMenuItem();
this.tsmDPAssmblyItem = new System.Windows.Forms.ToolStripMenuItem(); this.tsmDPAssmblyItem = new System.Windows.Forms.ToolStripMenuItem();
this.btnMendGroup = new System.Windows.Forms.ToolStripMenuItem(); this.btnMendGroup = new System.Windows.Forms.ToolStripMenuItem();
this.btnMendOperate = new System.Windows.Forms.ToolStripMenuItem(); this.btnMendOperate = new System.Windows.Forms.ToolStripMenuItem();
@ -189,6 +190,7 @@
this.btnOperateStation, this.btnOperateStation,
this.PrintCodeToolStripMenuItem, this.PrintCodeToolStripMenuItem,
this.tsmiPrintPlanlabel, this.tsmiPrintPlanlabel,
this.TJtsmiPrintPlanlabel,
this.tsmDPAssmblyItem}); this.tsmDPAssmblyItem});
this.btnOperateGroup.Name = "btnOperateGroup"; this.btnOperateGroup.Name = "btnOperateGroup";
this.btnOperateGroup.Size = new System.Drawing.Size(94, 28); this.btnOperateGroup.Size = new System.Drawing.Size(94, 28);
@ -215,6 +217,13 @@
this.tsmiPrintPlanlabel.Text = "门板计划标签打印"; this.tsmiPrintPlanlabel.Text = "门板计划标签打印";
this.tsmiPrintPlanlabel.Click += new System.EventHandler(this.tsmiPrintPlanlabel_Click); this.tsmiPrintPlanlabel.Click += new System.EventHandler(this.tsmiPrintPlanlabel_Click);
// //
// TJtsmiPrintPlanlabel
//
this.TJtsmiPrintPlanlabel.Name = "TJtsmiPrintPlanlabel";
this.TJtsmiPrintPlanlabel.Size = new System.Drawing.Size(224, 28);
this.TJtsmiPrintPlanlabel.Text = "TJ门板计划标签打印";
this.TJtsmiPrintPlanlabel.Click += new System.EventHandler(this.TJtsmiPrintPlanlabel_Click);
//
// tsmDPAssmblyItem // tsmDPAssmblyItem
// //
this.tsmDPAssmblyItem.Name = "tsmDPAssmblyItem"; this.tsmDPAssmblyItem.Name = "tsmDPAssmblyItem";
@ -480,6 +489,7 @@
private System.Windows.Forms.ToolStripMenuItem tsmiPutIn; private System.Windows.Forms.ToolStripMenuItem tsmiPutIn;
private System.Windows.Forms.ToolStripStatusLabel tslServerHost; private System.Windows.Forms.ToolStripStatusLabel tslServerHost;
private System.Windows.Forms.ToolStripMenuItem tsmiPrintPlanlabel; private System.Windows.Forms.ToolStripMenuItem tsmiPrintPlanlabel;
private System.Windows.Forms.ToolStripMenuItem TJtsmiPrintPlanlabel;
private System.Windows.Forms.ToolStripMenuItem tsmiTakeOut; private System.Windows.Forms.ToolStripMenuItem tsmiTakeOut;
private System.Windows.Forms.ToolStripMenuItem tsmiPartReplace; private System.Windows.Forms.ToolStripMenuItem tsmiPartReplace;
private System.Windows.Forms.ToolStripMenuItem tsmiCheck; private System.Windows.Forms.ToolStripMenuItem tsmiCheck;

29
APPQ5/QMAPP.WinForm/MainForm.cs

@ -779,7 +779,11 @@ namespace QMAPP.WinForm
f.Focus(); //打开过就让其获得焦点 f.Focus(); //打开过就让其获得焦点
} }
} }
/// <summary>
/// 门板计划标签打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tsmiPrintPlanlabel_Click(object sender, EventArgs e) private void tsmiPrintPlanlabel_Click(object sender, EventArgs e)
{ {
Form f = Application.OpenForms["PrintPlanLabel"]; //查找是否打开过Form1窗体 Form f = Application.OpenForms["PrintPlanLabel"]; //查找是否打开过Form1窗体
@ -798,6 +802,29 @@ namespace QMAPP.WinForm
} }
} }
/// <summary>
/// 天津门板计划标签打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void TJtsmiPrintPlanlabel_Click(object sender, EventArgs e)
{
Form f = Application.OpenForms["TJPrintPlanLabel"]; //查找是否打开过Form1窗体
if (f == null) //没打开过
{
TJPrintPlanLabel form = new TJPrintPlanLabel();
//new KeyEvent().SetKeyToTxt(form);
ClientContext.SetUserAuth(form);
form.MdiParent = this;
form.Show(); //重新new一个Show出来
}
else
{
f.WindowState = FormWindowState.Normal;
f.Focus(); //打开过就让其获得焦点
}
}
private void tsmiInspectSkipping_Click(object sender, EventArgs e) private void tsmiInspectSkipping_Click(object sender, EventArgs e)
{ {
Form f = Application.OpenForms["frmInspectSkipping"]; //查找是否打开过Form1窗体 Form f = Application.OpenForms["frmInspectSkipping"]; //查找是否打开过Form1窗体

23
APPQ5/QMAPP.WinForm/QMAPP.WinForm.csproj

@ -801,6 +801,18 @@
<Compile Include="Forms\RePrint\ReprintForm.Designer.cs"> <Compile Include="Forms\RePrint\ReprintForm.Designer.cs">
<DependentUpon>ReprintForm.cs</DependentUpon> <DependentUpon>ReprintForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\TianJin\TJPrintPlanLabel.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\TianJin\TJPrintPlanLabel.Designer.cs">
<DependentUpon>TJPrintPlanLabel.cs</DependentUpon>
</Compile>
<Compile Include="Forms\TianJin\TJPastCard.cs">
<DependentUpon>TJPastCard.rpt</DependentUpon>
<AutoGen>True</AutoGen>
<SubType>Component</SubType>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="Forms\TianJin\TJDefaultDataSetNum.cs"> <Compile Include="Forms\TianJin\TJDefaultDataSetNum.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -837,9 +849,6 @@
<Compile Include="Forms\TianJin\TJFrmPlace.designer.cs"> <Compile Include="Forms\TianJin\TJFrmPlace.designer.cs">
<DependentUpon>TJFrmPlace.cs</DependentUpon> <DependentUpon>TJFrmPlace.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\TianJin\TJPastCard.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Forms\TianJin\TJPastCardModel.cs" /> <Compile Include="Forms\TianJin\TJPastCardModel.cs" />
<Compile Include="Forms\TianJin\TJPrintPasteCard.cs" /> <Compile Include="Forms\TianJin\TJPrintPasteCard.cs" />
<Compile Include="Forms\TianJin\TJResetSendIndexForm.cs"> <Compile Include="Forms\TianJin\TJResetSendIndexForm.cs">
@ -1281,6 +1290,9 @@
<EmbeddedResource Include="Forms\RePrint\ReprintForm.resx"> <EmbeddedResource Include="Forms\RePrint\ReprintForm.resx">
<DependentUpon>ReprintForm.cs</DependentUpon> <DependentUpon>ReprintForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\TianJin\TJPrintPlanLabel.resx">
<DependentUpon>TJPrintPlanLabel.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\TianJin\TJDefaultDataSetNum.resx"> <EmbeddedResource Include="Forms\TianJin\TJDefaultDataSetNum.resx">
<DependentUpon>TJDefaultDataSetNum.cs</DependentUpon> <DependentUpon>TJDefaultDataSetNum.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -1398,8 +1410,11 @@
<Content Include="PrintTemplate\LoginLabel.frx"> <Content Include="PrintTemplate\LoginLabel.frx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<EmbeddedResource Include="Forms\TianJin\TJPastCard.rpt">
<Generator>CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator</Generator>
<LastGenOutput>TJPastCard.cs</LastGenOutput>
</EmbeddedResource>
<None Include="Forms\TianJin\RerportModel.ttx" /> <None Include="Forms\TianJin\RerportModel.ttx" />
<None Include="Forms\TianJin\TJPastCard.rpt" />
<None Include="PrintTemplate\reprint.qdf" /> <None Include="PrintTemplate\reprint.qdf" />
<Content Include="PrintTemplate\InjectLabel_NCB.frx"> <Content Include="PrintTemplate\InjectLabel_NCB.frx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>

11
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -242,6 +242,12 @@ namespace QMAPP.ServicesAgent
[Description("更新")] [Description("更新")]
AppConfigBLL_Update, AppConfigBLL_Update,
/// <summary>
/// 查询
/// </summary>
[Description("查询")]
TSWeighRecoreBLL_Statistics,
#endregion #endregion
#region #region
@ -2011,6 +2017,11 @@ namespace QMAPP.ServicesAgent
/// </summary> /// </summary>
[Description("贴车单记录明细查询")] [Description("贴车单记录明细查询")]
TJFrmPlaceBLL_GetPasteDetails, TJFrmPlaceBLL_GetPasteDetails,
/// <summary>
/// 添加贴车单
/// </summary>
[Description(" 添加贴车单")]
TJFrmPlaceBLL_AddPasteCard,
#endregion #endregion

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

@ -66,9 +66,12 @@
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=CDmes123;max pool size=10240;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=CDmes123;max pool size=10240;" 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.99;Initial Catalog=ADIENT_CD_MES9;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES9;User Id=sa;Password=Password2018;max pool size=10240;" 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="maindbYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=CdFisYbbNCSNF;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/> <!--<add name="maindbYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=CdFisYbbNCSNF;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=CdFisYbbDY;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>--> <add name="maindbNCSYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=CdFisYbbDY;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>-->

Loading…
Cancel
Save