Browse Source

调整接口

master
张松男 2 months ago
parent
commit
cad902bfa7
  1. 139
      APP/QMAPP.Web/App_Data/Menu.xml
  2. 2
      APP/QMAPP.Web/App_Data/PCPower.xml
  3. 6
      APP/QMAPP.Web/Web.config
  4. 7
      APPMD/QMAPP.MD.Web/Web.config
  5. 27
      APPQ5/QMAPP.FJC.BLL/Bucket/RawMaterialRecordBLL.cs
  6. 56
      APPQ5/QMAPP.FJC.BLL/CompleteStatistics/CompleteStatisticsBLL.cs
  7. 2
      APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj
  8. 1523
      APPQ5/QMAPP.FJC.BLL/TianJin/TJPaoMoPlanBLL.cs
  9. 1523
      APPQ5/QMAPP.FJC.BLL/TianJin/TJZhuSuPlanBLL.cs
  10. 4
      APPQ5/QMAPP.FJC.DAL/Bucket/RawMaterialDAL.cs
  11. 94
      APPQ5/QMAPP.FJC.DAL/Bucket/RawMaterialRecordDAL.cs
  12. 111
      APPQ5/QMAPP.FJC.DAL/CompleteStatistics/CompleteStatisticsDAL.cs
  13. 2
      APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj
  14. 2
      APPQ5/QMAPP.FJC.DAL/TianJin/TJFrmPlaceDAL.cs
  15. 990
      APPQ5/QMAPP.FJC.DAL/TianJin/TJPaoMoPlanDAL.cs
  16. 990
      APPQ5/QMAPP.FJC.DAL/TianJin/TJZhuSuPlanDAL.cs
  17. 12
      APPQ5/QMAPP.FJC.Entity/Bucket/RawMaterial.cs
  18. 27
      APPQ5/QMAPP.FJC.Entity/Bucket/RawMaterialRecord.cs
  19. 2
      APPQ5/QMAPP.FJC.Entity/QMAPP.FJC.Entity.csproj
  20. 125
      APPQ5/QMAPP.FJC.Entity/TianJin/TJPaoMoPlan.cs
  21. 125
      APPQ5/QMAPP.FJC.Entity/TianJin/TJZhuSuPlan.cs
  22. 2
      APPQ5/QMAPP.FJC.Web/Content/Xml/Dictionary.xml
  23. 566
      APPQ5/QMAPP.FJC.Web/Controllers/InjectionCountController.cs
  24. 581
      APPQ5/QMAPP.FJC.Web/Controllers/TJPaoMoPlanController.cs
  25. 581
      APPQ5/QMAPP.FJC.Web/Controllers/TJZhuSuPlanController.cs
  26. 80
      APPQ5/QMAPP.FJC.Web/Models/Bucket/RawMaterialModel.cs
  27. 6
      APPQ5/QMAPP.FJC.Web/Models/Bucket/RawMaterialRecordModel.cs
  28. 35
      APPQ5/QMAPP.FJC.Web/Models/TestEChartModel.cs
  29. 76
      APPQ5/QMAPP.FJC.Web/Models/TianJin/InjectionCountModelModel.cs
  30. 153
      APPQ5/QMAPP.FJC.Web/Models/TianJin/TJPaoMoPlanModel.cs
  31. 153
      APPQ5/QMAPP.FJC.Web/Models/TianJin/TJZhuSuPlanModel.cs
  32. 13
      APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj
  33. 143
      APPQ5/QMAPP.FJC.Web/Views/InjectionCount/QTYInjectionCount.aspx
  34. 106
      APPQ5/QMAPP.FJC.Web/Views/TJPaoMoPlan/TJPaoMoPlanEdit.aspx
  35. 198
      APPQ5/QMAPP.FJC.Web/Views/TJPaoMoPlan/TJPaoMoPlanList.aspx
  36. 106
      APPQ5/QMAPP.FJC.Web/Views/TJZhuSuPlan/TJZhuSuPlanEdit.aspx
  37. 198
      APPQ5/QMAPP.FJC.Web/Views/TJZhuSuPlan/TJZhuSuPlanList.aspx
  38. 5
      APPQ5/QMAPP.FJC.Web/Web.config
  39. 10
      APPQ5/QMAPP.WinForm/App.config
  40. 51
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs
  41. 452
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.designer.cs
  42. 3
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.resx
  43. 22
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  44. 4
      APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
  45. 12
      ServicesCenter/Task/QMTask.Host/App.config
  46. 2
      ServicesCenter/Task/QMTask.Host/PlanConfig.xml
  47. 22
      ServicesCenter/Task/QMTask.Host/QMTask.Host.csproj
  48. 8
      ServicesCenter/Task/QMTask.Host/TaskConfig.xml
  49. 22
      ServicesCenter/Task/QMTask.WindowService/QMTask.WindowService.csproj
  50. 14
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml
  51. 8
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config
  52. 105
      WebAPI/Controllers/InventoryController.cs
  53. 29
      WebAPI/Controllers/MachineClassController.cs
  54. 6
      WebAPI/Controllers/MachineController.cs
  55. 14
      WebAPI/Controllers/PlanController.cs
  56. 2
      WebAPI/Controllers/WareController.cs
  57. 2
      WebAPI/Controllers/WareHouseController.cs
  58. 5
      WebAPI/Models/MachineValue.cs
  59. 5
      WebAPI/Models/OrderPlan_PaoMo.cs
  60. 3
      WebAPI/Web.config

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

@ -304,36 +304,36 @@
</MenuItem> </MenuItem>
<!--TJDoorPlankPlanPrint DoorPlankPlan--> <!--TJDoorPlankPlanPrint DoorPlankPlan-->
<MenuItem MenuID="02030000" SystemID="FJC" MenuDes="泡沫计划管理" Action="/TJDoorPlankPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1"> <MenuItem MenuID="02030000" SystemID="FJC" MenuDes="泡沫计划管理" Action="/TJPaoMoPlan/List" Target="url" PowerID="CD02030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="PaomoPlanPrint" ActionName="List" PowerID="CD02030001">查询</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="List" PowerID="CD02030001">查询</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="Add" PowerID="CD02030002">添加</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="Add" PowerID="CD02030002">添加</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="AddWholeDoor" PowerID="CD02030003">整车添加</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="AddWholeDoor" PowerID="CD02030003">整车添加</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="Edit" PowerID="CD02030004">修改</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="Edit" PowerID="CD02030004">修改</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="EditDoorPlankPlanSeq" PowerID="CD02030011">修改计划顺序号</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="EditDoorPlankPlanSeq" PowerID="CD02030011">修改计划顺序号</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="Insert" PowerID="CD02030005">插单</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="Insert" PowerID="CD02030005">插单</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="Delete" PowerID="CD02030006">删除</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="Delete" PowerID="CD02030006">删除</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="PutOut" PowerID="CD02030007">发布</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="PutOut" PowerID="CD02030007">发布</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="ImportExcel" PowerID="CD02030008">导入</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="ImportExcel" PowerID="CD02030008">导入</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="ExportExcel" PowerID="CD02030009">导出</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="ExportExcel" PowerID="CD02030009">导出</Action>
<Action ContorllerName="PaomoPlanPrint" ActionName="TemplateExcel" PowerID="CD02030010">下载模板</Action> <Action ContorllerName="TJPaoMoPlan" ActionName="TemplateExcel" PowerID="CD02030010">下载模板</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<!--TJDoorPlankPlanPrint DoorPlankPlan--> <!--TJDoorPlankPlanPrint DoorPlankPlan-->
<MenuItem MenuID="02040000" SystemID="FJC" MenuDes="注塑计划管理" Action="/TJDoorPlankPlanPrint/List?ORDER_TYPE=DOORPLANK" Target="url" PowerID="CD02040000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1"> <MenuItem MenuID="02040000" SystemID="FJC" MenuDes="注塑计划管理" Action="/TJZhuSuPlan/List" Target="url" PowerID="CD02040000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="02000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="List" PowerID="CD02040001">查询</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="List" PowerID="CD02040001">查询</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Add" PowerID="CD02040002">添加</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="Add" PowerID="CD02040002">添加</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="AddWholeDoor" PowerID="CD02040003">整车添加</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="AddWholeDoor" PowerID="CD02040003">整车添加</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Edit" PowerID="CD02040004">修改</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="Edit" PowerID="CD02040004">修改</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="EditDoorPlankPlanSeq" PowerID="CD02040011">修改计划顺序号</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="EditDoorPlankPlanSeq" PowerID="CD02040011">修改计划顺序号</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Insert" PowerID="CD02040005">插单</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="Insert" PowerID="CD02040005">插单</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="Delete" PowerID="CD02040006">删除</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="Delete" PowerID="CD02040006">删除</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="PutOut" PowerID="CD02040007">发布</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="PutOut" PowerID="CD02040007">发布</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ImportExcel" PowerID="CD02040008">导入</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="ImportExcel" PowerID="CD02040008">导入</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="ExportExcel" PowerID="CD02040009">导出</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="ExportExcel" PowerID="CD02040009">导出</Action>
<Action ContorllerName="TJDoorPlankPlanPrint" ActionName="TemplateExcel" PowerID="CD02040010">下载模板</Action> <Action ContorllerName="TJZhuSuPlan" ActionName="TemplateExcel" PowerID="CD02040010">下载模板</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
@ -535,24 +535,8 @@
<Action ContorllerName="BucketMaterial" ActionName="Delete" PowerID="CD14090004">删除</Action> <Action ContorllerName="BucketMaterial" ActionName="Delete" PowerID="CD14090004">删除</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="14080000" SystemID="FJC" MenuDes="零件号绑定" Action="/BucketMaterialClass/List" Target="url" PowerID="CD14080000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="BucketMaterialClass" ActionName="List" PowerID="CD14080001">查询</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Add" PowerID="CD14080002">添加</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Edit" PowerID="CD14080003">修改</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Delete" PowerID="CD14080004">删除</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14060000" SystemID="FJC" MenuDes="注塑投料查询" Action="/RawMaterial/List" Target="url" PowerID="CD14060000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="RawMaterial" ActionName="List" PowerID="CD14060001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="14070000" SystemID="FJC" MenuDes="注塑打印记录" Action="/RawMaterialRecord/List" Target="url" PowerID="CD14070000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="14000000" Seq="1">
<Actions>
<Action ContorllerName="RawMaterialRecord" ActionName="List" PowerID="CD14070001">查询</Action>
</Actions>
</MenuItem>
<!--<MenuItem MenuID="15000000" SystemID="Main" MenuDes="能源管理" Action="" PowerID="CD15000000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="" Seq="2"> <!--<MenuItem MenuID="15000000" SystemID="Main" MenuDes="能源管理" Action="" PowerID="CD15000000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="" Seq="2">
<Actions> <Actions>
@ -840,55 +824,78 @@
<Actions> <Actions>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20100000" SystemID="FJC" MenuDes="点检项" Action="/PutMachineClass/List" Target="url" PowerID="CD20100000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20010000" SystemID="FJC" MenuDes="点检项" Action="/PutMachineClass/List" Target="url" PowerID="CD20010000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="PutMachineClass" ActionName="List" PowerID="CD20100001">查询</Action> <Action ContorllerName="PutMachineClass" ActionName="List" PowerID="CD20010001">查询</Action>
<Action ContorllerName="PutMachineClass" ActionName="Add" PowerID="CD20100002">添加</Action> <Action ContorllerName="PutMachineClass" ActionName="Add" PowerID="CD20010002">添加</Action>
<Action ContorllerName="PutMachineClass" ActionName="Edit" PowerID="CD20100003">修改</Action> <Action ContorllerName="PutMachineClass" ActionName="Edit" PowerID="CD20010003">修改</Action>
<Action ContorllerName="PutMachineClass" ActionName="Delete" PowerID="CD20100004">删除</Action> <Action ContorllerName="PutMachineClass" ActionName="Delete" PowerID="CD20010004">删除</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20200000" SystemID="FJC" MenuDes="点检项极限值" Action="/PutMachine/List" Target="url" PowerID="CD20200000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20020000" SystemID="FJC" MenuDes="点检项极限值" Action="/PutMachine/List" Target="url" PowerID="CD20020000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="PutMachine" ActionName="List" PowerID="CD20200001">查询</Action> <Action ContorllerName="PutMachine" ActionName="List" PowerID="CD20020001">查询</Action>
<Action ContorllerName="PutMachine" ActionName="Add" PowerID="CD20200002">添加</Action> <Action ContorllerName="PutMachine" ActionName="Add" PowerID="CD20020002">添加</Action>
<Action ContorllerName="PutMachine" ActionName="Edit" PowerID="CD20200003">修改</Action> <Action ContorllerName="PutMachine" ActionName="Edit" PowerID="CD20020003">修改</Action>
<Action ContorllerName="PutMachine" ActionName="Delete" PowerID="CD20200004">删除</Action> <Action ContorllerName="PutMachine" ActionName="Delete" PowerID="CD20020004">删除</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20300000" SystemID="FJC" MenuDes="泡沫点检记录" Action="/PutMachineValue/List" Target="url" PowerID="CD20300000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20030000" SystemID="FJC" MenuDes="泡沫点检记录" Action="/PutMachineValue/List" Target="url" PowerID="CD20030000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="PutMachineValue" ActionName="List" PowerID="CD20030001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20040000" SystemID="FJC" MenuDes="注塑点检记录" Action="/PutMachineValueZhusu/List" Target="url" PowerID="CD20040000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="PutMachineValueZhusu" ActionName="List" PowerID="CD20040001">查询</Action>
</Actions>
</MenuItem>
<MenuItem MenuID="20050000" SystemID="FJC" MenuDes="泡沫悬链查询" Action="/InOutPutInventory/List?Type=1" Target="url" PowerID="CD20050000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutInventory" ActionName="List" PowerID="CD20050001">查询</Action>
</Actions>
</MenuItem>
<!--<MenuItem MenuID="20060000" SystemID="FJC" MenuDes="注塑库存" Action="/InOutPutInventory/List?Type=2" Target="url" PowerID="CD20060000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions>
<Action ContorllerName="InOutPutInventory" ActionName="List" PowerID="CD20060001">查询</Action>
</Actions>
</MenuItem>-->
<MenuItem MenuID="20070000" SystemID="FJC" MenuDes="泡沫操作日志" Action="/InOutPutInventoryLog/List?Type=1" Target="url" PowerID="CD20070000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="PutMachineValue" ActionName="List" PowerID="CD20300001">查询</Action> <Action ContorllerName="InOutPutInventoryLog" ActionName="List" PowerID="CD20070001">查询</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20400000" SystemID="FJC" MenuDes="注塑点检记录" Action="/PutMachineValueZhusu/List" Target="url" PowerID="CD20400000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20080000" SystemID="FJC" MenuDes="注塑操作日志" Action="/InOutPutInventoryLog/List?Type=2" Target="url" PowerID="CD20080000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="PutMachineValueZhusu" ActionName="List" PowerID="CD20400001">查询</Action> <Action ContorllerName="InOutPutInventoryLog" ActionName="List" PowerID="CD20080001">查询</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20500000" SystemID="FJC" MenuDes="泡沫库存" Action="/InOutPutInventory/List?Type=1" Target="url" PowerID="CD20500000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20090000" SystemID="FJC" MenuDes="开班件查询" Action="/InOutPutBeginShift/List" Target="url" PowerID="CD20090000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="InOutPutInventory" ActionName="List" PowerID="CD20500001">查询</Action> <Action ContorllerName="InOutPutBeginShift" ActionName="List" PowerID="CD20090001">查询</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20600000" SystemID="FJC" MenuDes="注塑库存" Action="/InOutPutInventory/List?Type=2" Target="url" PowerID="CD20600000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20100000" SystemID="FJC" MenuDes="注塑投料查询" Action="/RawMaterial/List" Target="url" PowerID="CD20100000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="InOutPutInventory" ActionName="List" PowerID="CD20600001">查询</Action> <Action ContorllerName="RawMaterial" ActionName="List" PowerID="CD20100001">查询</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20700000" SystemID="FJC" MenuDes="泡沫库存日志" Action="/InOutPutInventoryLog/List?Type=1" Target="url" PowerID="CD20700000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20110000" SystemID="FJC" MenuDes="注塑记录" Action="/RawMaterialRecord/List" Target="url" PowerID="CD20110000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="InOutPutInventoryLog" ActionName="List" PowerID="CD20700001">查询</Action> <Action ContorllerName="RawMaterialRecord" ActionName="List" PowerID="CD20110001">查询</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20800000" SystemID="FJC" MenuDes="注塑库存日志" Action="/InOutPutInventoryLog/List?Type=2" Target="url" PowerID="CD20800000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20120000" SystemID="FJC" MenuDes="注塑投入产出" Action="/InjectionCount/QTYInjectionCount" Target="url" PowerID="CD20120000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="InOutPutInventoryLog" ActionName="List" PowerID="CD20800001">查询</Action> <Action ContorllerName="InjectionCount" ActionName="QTYInjectionCount" PowerID="CD20120001">查询</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>
<MenuItem MenuID="20900000" SystemID="FJC" MenuDes="开班件查询" Action="/InOutPutBeginShift/List" Target="url" PowerID="CD20900000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1"> <MenuItem MenuID="20130000" SystemID="FJC" MenuDes="泡沫原料" Action="/BucketMaterialClass/List" Target="url" PowerID="CD20130000" Visible="true" Ico="../../Content/Menu/images/ico/2.gif" SuperID="20000000" Seq="1">
<Actions> <Actions>
<Action ContorllerName="InOutPutBeginShift" ActionName="List" PowerID="CD20900001">查询</Action> <Action ContorllerName="BucketMaterialClass" ActionName="List" PowerID="CD20130001">查询</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Add" PowerID="CD20130002">添加</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Edit" PowerID="CD20130003">修改</Action>
<Action ContorllerName="BucketMaterialClass" ActionName="Delete" PowerID="CD20130004">删除</Action>
</Actions> </Actions>
</MenuItem> </MenuItem>

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

@ -103,7 +103,7 @@
<PowerInfo PowerID="PDA0000002" PowerDes="泡沫投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="PDA0000002" PowerDes="泡沫投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000003" PowerDes="泡沫上悬连" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="PDA0000003" PowerDes="泡沫上悬连" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000004" PowerDes="泡沫下悬连" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="PDA0000004" PowerDes="泡沫下悬连" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="PDA0000004" PowerDes="泡沫不良品" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="PDA0000005" PowerDes="泡沫不良品" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000001" PowerDes="注塑点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="SPDA000001" PowerDes="注塑点检" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000002" PowerDes="注塑投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="SPDA000002" PowerDes="注塑投料" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>
<PowerInfo PowerID="SPDA000003" PowerDes="开班件扫码" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo> <PowerInfo PowerID="SPDA000003" PowerDes="开班件扫码" PowerType="item" ActionList="" Visible="true" Seq="1" SuperID="CD98000000"></PowerInfo>

6
APP/QMAPP.Web/Web.config

@ -40,7 +40,7 @@
<!--主数据库连接--> <!--主数据库连接-->
<!--<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=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_VW276PA_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_VW276PA_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
@ -67,12 +67,12 @@
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
--> -->
<!--
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<!--
<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>

7
APPMD/QMAPP.MD.Web/Web.config

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

27
APPQ5/QMAPP.FJC.BLL/Bucket/RawMaterialRecordBLL.cs

@ -237,6 +237,31 @@ namespace QMAPP.FJC.BLL.Bucket
} }
} }
#endregion #endregion
#region 生产发运统计
/// <summary>
/// 生产发运统计--表格--所有电表
/// </summary>
/// <param name="condition"></param>
/// <returns></returns>
public DataResult<List<RawMaterialRecord>> GetMainListB(RawMaterialRecord condition)
{
DataResult<List<RawMaterialRecord>> result = new DataResult<List<RawMaterialRecord>>();
try
{
result.Result = new RawMaterialRecordDAL().GetDPListB(condition);
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
result.IsSuccess = false;
result.Msg = ex.ToString();
return result;
}
}
#endregion
} }
} }

56
APPQ5/QMAPP.FJC.BLL/CompleteStatistics/CompleteStatisticsBLL.cs

@ -42,14 +42,14 @@ namespace QMAPP.FJC.BLL.CompleteStatistics
{ {
try { try {
//向MES T_AW_COMPLETE_STATISTICS插入需要的数据 //向MES T_AW_COMPLETE_STATISTICS插入需要的数据
int count = new CompleteStatisticsDAL().GenericCompleteStatistics(starTime, endTime); //int count = new CompleteStatisticsDAL().GenericCompleteStatistics(starTime, endTime);
string isAutoExport = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_AUTO_EXPORT); //完工统计标识:1 自动,0 手动。 string isAutoExport = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_AUTO_EXPORT); //完工统计标识:1 自动,0 手动。
if (isAutoExport.Equals("1")) { if (isAutoExport.Equals("1")) {
//this.ExportCompleteStatistics(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") }); //this.ExportCompleteStatistics(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") });
this.ExportCompleteStatisticsSQL(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") }); this.ExportCompleteStatisticsSQL(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") });
} }
return count; return 0;
} }
catch (Exception ex) { catch (Exception ex) {
LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "生成统计信息列表错误!" }); LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "生成统计信息列表错误!" });
@ -57,6 +57,28 @@ namespace QMAPP.FJC.BLL.CompleteStatistics
} }
} }
public int FrmPlaceCompleteStatistics(DateTime starTime, DateTime endTime)
{
try
{
//向MES T_AW_COMPLETE_STATISTICS插入需要的数据
int count = new CompleteStatisticsDAL().FrmPlaceCompleteStatistics(starTime, endTime);
string isAutoExport = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_AUTO_EXPORT); //完工统计标识:1 自动,0 手动。
if (isAutoExport.Equals("1"))
{
//this.ExportCompleteStatistics(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") });
this.ExportCompleteStatisticsSQL(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") });
}
return count;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "生成统计信息列表错误!" });
throw;
}
}
/// <summary> /// <summary>
/// 获取列表 /// 获取列表
/// </summary> /// </summary>
@ -159,15 +181,19 @@ namespace QMAPP.FJC.BLL.CompleteStatistics
Msg = Resource.MsgSuccess Msg = Resource.MsgSuccess
}; };
try { try {
var material = new CompleteStatisticsDAL().GetMFGMaterialCode(model.MATERIALNO);
if (!string.IsNullOrEmpty(material))
model.MATERIALNO = material;
//基本信息 //基本信息
model.PID = Guid.NewGuid().ToString(); model.PID = Guid.NewGuid().ToString();
model.CREATEUSER = this.LoginUser.UserID; model.CREATEUSER = this.LoginUser.UserID;
model.CREATETIME = DateTime.Now; model.CREATETIME = DateTime.Now;
model.UPDATEUSER = this.LoginUser.UserID; model.UPDATEUSER = this.LoginUser.UserID;
model.DELFLAG = "0"; model.DELFLAG = "0";
//if (this.ExistsMain(model)) {
// return -1;
//}
result.Result = new CompleteStatisticsDAL().Insert(model); result.Result = new CompleteStatisticsDAL().Insert(model);
} }
catch (Exception ex) { catch (Exception ex) {
@ -178,6 +204,8 @@ namespace QMAPP.FJC.BLL.CompleteStatistics
return result; return result;
} }
/// <summary> /// <summary>
/// 更新信息 /// 更新信息
/// </summary> /// </summary>
@ -456,5 +484,23 @@ namespace QMAPP.FJC.BLL.CompleteStatistics
new QMFrameWork.Log.LogInfo { ClientIP = "localhost", UserName = "admin", Info = "完工数量统计结束" }); new QMFrameWork.Log.LogInfo { ClientIP = "localhost", UserName = "admin", Info = "完工数量统计结束" });
} }
} }
public void FrmPlaceMFG()
{
//int interval = 30;
//DateTime lastRunTime = GetLastRunTime();
int interval = 24;
DateTime lastRunTime = GetLastRunTime();
DateTime judgementTime = lastRunTime.AddHours(interval);
if (judgementTime < DateTime.Now)
{
QMFrameWork.Log.LogManager.LogHelper.Info(
new QMFrameWork.Log.LogInfo { ClientIP = "localhost", UserName = "admin", Info = "发运数量统计开始" });
FrmPlaceCompleteStatistics(lastRunTime, judgementTime);
QMFrameWork.Log.LogManager.LogHelper.Info(
new QMFrameWork.Log.LogInfo { ClientIP = "localhost", UserName = "admin", Info = "发运数量统计结束" });
}
}
} }
} }

2
APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj

@ -200,6 +200,8 @@
<Compile Include="TianJin\StorageBLL.cs" /> <Compile Include="TianJin\StorageBLL.cs" />
<Compile Include="TianJin\TJDoorPlankPlanBLL.cs" /> <Compile Include="TianJin\TJDoorPlankPlanBLL.cs" />
<Compile Include="TianJin\TJFrmPlaceBLL.cs" /> <Compile Include="TianJin\TJFrmPlaceBLL.cs" />
<Compile Include="TianJin\TJZhuSuPlanBLL.cs" />
<Compile Include="TianJin\TJPaoMoPlanBLL.cs" />
<Compile Include="TianJin\TJOrderPlanBLL.cs" /> <Compile Include="TianJin\TJOrderPlanBLL.cs" />
<Compile Include="TianJin\TJWorkOrderBLL.cs" /> <Compile Include="TianJin\TJWorkOrderBLL.cs" />
<Compile Include="WarehouseManage\OutWarehouseBLL.cs" /> <Compile Include="WarehouseManage\OutWarehouseBLL.cs" />

1523
APPQ5/QMAPP.FJC.BLL/TianJin/TJPaoMoPlanBLL.cs

File diff suppressed because it is too large

1523
APPQ5/QMAPP.FJC.BLL/TianJin/TJZhuSuPlanBLL.cs

File diff suppressed because it is too large

4
APPQ5/QMAPP.FJC.DAL/Bucket/RawMaterialDAL.cs

@ -85,7 +85,7 @@ namespace QMAPP.FJC.DAL.Bucket
//分页关键字段及排序 //分页关键字段及排序
page.KeyName = "PID"; page.KeyName = "PID";
if (string.IsNullOrEmpty(page.SortExpression)) if (string.IsNullOrEmpty(page.SortExpression))
page.SortExpression = "UPDATEDATE DESC"; page.SortExpression = "CREATEDATE DESC";
using (IDataSession session = AppDataFactory.CreateMainSession()) using (IDataSession session = AppDataFactory.CreateMainSession())
{ {
page = session.GetDataPage<RawMaterial>(sql, parameters.ToArray(), page); page = session.GetDataPage<RawMaterial>(sql, parameters.ToArray(), page);
@ -203,7 +203,7 @@ namespace QMAPP.FJC.DAL.Bucket
try try
{ {
//构成查询语句 //构成查询语句
sqlBuilder.Append("SELECT PID,BucketCode,PartCode,BatchCode,IsCheck,SerialCode,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE,ProductLine,MaterialType,MachineCode "); sqlBuilder.Append("SELECT PID,BucketCode,PartCode,BatchCode,IsCheck,SerialCode,CREATEUSER,CREATEDATE,planNumber,supplierCode,weight ");
sqlBuilder.Append("FROM T_MD_RawMaterial "); sqlBuilder.Append("FROM T_MD_RawMaterial ");
whereBuilder.Append(" AND IsCheck<> '1' "); whereBuilder.Append(" AND IsCheck<> '1' ");
if (string.IsNullOrEmpty(condition.BucketCode) == false) if (string.IsNullOrEmpty(condition.BucketCode) == false)

94
APPQ5/QMAPP.FJC.DAL/Bucket/RawMaterialRecordDAL.cs

@ -165,25 +165,17 @@ namespace QMAPP.FJC.DAL.Bucket
try try
{ {
//构成查询语句 //构成查询语句
sqlBuilder.Append("SELECT R.PID,R.ProductCode,R.MaterialCode,R.MaterialName,R.MachineCode,M.BucketCode,M.PartCode,M.BatchCode,M.SerialCode,R.IsCheck,R.CREATEUSER,R.CREATEDATE,R.UPDATEUSER,R.UPDATEDATE "); sqlBuilder.Append("SELECT R.PID,R.ProductCode,LEFT(R.ProductCode, 13) as 'MaterialCode',R.MaterialName,M.BucketCode,M.PartCode,M.BatchCode,M.SerialCode,R.IsCheck,R.CREATEUSER,R.CREATEDATE,R.UPDATEUSER,R.UPDATEDATE ");
sqlBuilder.Append("FROM T_MD_RawMaterialRecord AS R LEFT JOIN T_MD_RawMaterial AS M ON R.RawMaterialPID = M.PID "); sqlBuilder.Append("FROM T_MD_RawMaterialRecord AS R LEFT JOIN T_MD_RawMaterial AS M ON R.RawMaterialPID = M.planNumber ");
whereBuilder.Append(" AND R.IsCheck<> '1' "); whereBuilder.Append(" AND R.IsCheck<> '1' ");
if (condition.BeginTime != "0001/1/1 00:00:00") if (condition.BeginTime != "0001/1/1 0:00:00")
{ {
whereBuilder.Append($" AND R.CREATEDATE >= '{condition.BeginTime}'"); whereBuilder.Append($" AND R.CREATEDATE >= '{condition.BeginTime}'");
} }
else if (condition.EndTime != "0001/1/1 0:00:00")
{
whereBuilder.Append($" AND R.CREATEDATE >= '{DateTime.Now.AddDays(-5)}'");
}
if (condition.EndTime != "0001/1/1 00:00:00")
{ {
whereBuilder.Append($" AND R.CREATEDATE <= '{condition.EndTime}'"); whereBuilder.Append($" AND R.CREATEDATE <= '{condition.EndTime}'");
} }
else
{
whereBuilder.Append($" AND R.CREATEDATE <= '{DateTime.Now.AddDays(+1)}'");
}
if (string.IsNullOrEmpty(condition.PartCode) == false) if (string.IsNullOrEmpty(condition.PartCode) == false)
{ {
@ -333,7 +325,83 @@ namespace QMAPP.FJC.DAL.Bucket
} }
#endregion #endregion
/// <summary>
/// 获取查询语句
/// </summary>
/// <param name="user">查询条件</param>
/// <param name="parameters">参数</param>
/// <returns>查询语句</returns>
private string GetDPQuerySqlC(RawMaterialRecord condition, ref List<DataParameter> parameters)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
try
{
sqlBuilder.AppendLine(" select MAX(PartCode) as 'PartCode',MAX(CREATEDATE) as 'CREATEDATE', planNumber,SUM(RawMaterialCount) as 'RawMaterialCount' from View_RawMaterialRecord where 1=1 ");
if (!string.IsNullOrEmpty(condition.PartCode))
{
sqlBuilder.AppendLine($" and PartCode = '{condition.PartCode}' ");
}
if (!string.IsNullOrEmpty(condition.START_DATE) && condition.START_DATE != DateTime.MinValue.ToString())
{
sqlBuilder.AppendLine($" and CREATEDATE >= '{condition.START_DATE}' ");
}
if (!string.IsNullOrEmpty(condition.END_DATE) && condition.END_DATE != DateTime.MinValue.ToString())
{
sqlBuilder.AppendLine($" and CREATEDATE <= '{condition.END_DATE}' ");
}
sqlBuilder.AppendLine($" GROUP BY planNumber order by CREATEDATE desc ");
return sqlBuilder.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 生产发运统计
/// </summary>
/// <param name="condition"></param>
/// <returns></returns>
public List<RawMaterialRecord> GetDPListB(RawMaterialRecord condition)
{
List<RawMaterialRecord> list = new List<RawMaterialRecord>();
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
#region 月统计 按照开始时间的月份进行统计
sql = this.GetDPQuerySqlC(condition, ref parameters);
using (IDataSession session = AppDataFactory.CreateMainSession())
{
var listt = session.GetList<RawMaterialRecord>(sql, parameters.ToArray()).ToList();
if (listt.Count > 0)
{
var t = new RawMaterialRecord();
t.planNumber = listt[0].planNumber; //批次号
t.PartCode = listt[0].PartCode; //零件号
t.RawMaterialCount = listt[0].RawMaterialCount; //统计数量
list.Add(t);
}
}
#endregion
return list;
}
catch (Exception ex)
{
throw ex;
}
}
} }
} }

111
APPQ5/QMAPP.FJC.DAL/CompleteStatistics/CompleteStatisticsDAL.cs

@ -106,6 +106,42 @@ namespace QMAPP.FJC.DAL.CompleteStatistics
return count; return count;
} }
public int FrmPlaceCompleteStatistics(DateTime starTime, DateTime endTime)
{
int count;
using (IDataSession session = AppDataFactory.CreateMainSession())
{
DataParameter[] parameters = {
new DataParameter {ParameterName = "StartTime", DataType = DbType.DateTime, Value = starTime},
new DataParameter {ParameterName = "EndTime", DataType = DbType.DateTime, Value = endTime}
};
try
{
session.OpenTs();
//string location = this.GetSystemConfig(CompleteStatisticsConstants.COMP_STATIS_SITE).CODEVALUE;
//string sql = location.Equals("080121") ? this.GetGenericStatisticsSqlForCC() : this.GetGenericStatisticsSqlForCD();
//成品
string sql = GetGenericStatisticsSqlForBORA();
count = session.ExecuteSql(sql, parameters);
//注塑件
sql = GetGenericStatisticsSqlForINJECT();
count += session.ExecuteSql(sql, parameters);
this.UpdateLastGenericTime(endTime, session);
session.CommitTs();
}
catch (Exception)
{
session.RollbackTs();
throw;
}
}
return count;
}
public SystemConfig GetSystemConfig(string codeType) public SystemConfig GetSystemConfig(string codeType)
{ {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
@ -121,6 +157,27 @@ namespace QMAPP.FJC.DAL.CompleteStatistics
} }
} }
public string GetMFGMaterialCode(string MaterialCode)
{
StringBuilder sql = new StringBuilder();
sql.AppendLine("SELECT *");
sql.AppendLine(" FROM T_PP_TJFY_ExchangeType");
sql.AppendLine(" WHERE MaterialCode = @MaterialCode");
DataParameter[] parameters = {
new DataParameter {ParameterName = "MaterialCode", DataType = DbType.String, Value = MaterialCode}
};
using (IDataSession session = AppDataFactory.CreateMainSession())
{
var date = session.GetTable(sql.ToString(), parameters);
if (date.Rows.Count > 0)
{
return date.Rows[0]["MFGMaterialCode"].ToString();
}
else
return "";
}
}
protected int UpdateLastGenericTime(DateTime endTime, IDataSession session) protected int UpdateLastGenericTime(DateTime endTime, IDataSession session)
{ {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
@ -271,6 +328,40 @@ namespace QMAPP.FJC.DAL.CompleteStatistics
sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY "); sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY ");
return sql.ToString(); return sql.ToString();
} }
//天津770发运 MFG回冲
protected string GetFrmPlaceStatisticsSql()
{
StringBuilder sql = new StringBuilder();
sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS ");
sql.AppendLine(" SELECT NEWID(),");
sql.AppendLine(" C.MFG_MATERIAL_CODE AS MATERIALNO,");
sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,");
sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,");
sql.AppendLine(" @StartTime AS STARTTIME,");
sql.AppendLine(" @EndTime AS ENDTIME,");
sql.AppendLine(" C.ORDERIDENTITY + ");
sql.AppendLine(" REPLACE(substring(CONVERT(VARCHAR(100), GETDATE(), 112),3,6) + ");
sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + ");
sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE))) + CAST (ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE) AS VARCHAR) AS ORDERNO, ");
sql.AppendLine(" GETDATE() AS CREATETIME, ");
sql.AppendLine(" USR.USERID AS CREATEUSER, ");
sql.AppendLine(" GETDATE() AS UPDATETIME, ");
sql.AppendLine(" USR.USERID AS UPDATEUSER, ");
sql.AppendLine(" '0' AS DELFLAG ");
sql.AppendLine(" FROM T_AW_PRODUCT T ");
sql.AppendLine(" LEFT JOIN T_MD_MATERIAL_CLASS S ON S.MATERIAL_TYPE_CODE=T.MATERIAL_TYPE ");
sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C ON C.MES_MATERIAL_CODE = T.MATERIAL_CODE ");
sql.AppendLine(" LEFT JOIN T_QM_USER USR ");
sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' ");
sql.AppendLine(" WHERE S.MATERIAL_ATTRIBUTE='2' ");
sql.AppendLine(" AND C.MFG_MATERIAL_CODE IS NOT NULL ");
sql.AppendLine(" AND T.CREATEDATE > @StartTime ");
sql.AppendLine(" AND T.CREATEDATE <= @EndTime ");
sql.AppendLine(" AND T.MACHINECODDE IS NOT NULL ");
sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY ");
return sql.ToString();
}
protected string GetGenericStatisticsSqlForINJECT() protected string GetGenericStatisticsSqlForINJECT()
{ {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
@ -367,7 +458,13 @@ namespace QMAPP.FJC.DAL.CompleteStatistics
string unableSql = this.unableExportDataString(model, out unableParameters); string unableSql = this.unableExportDataString(model, out unableParameters);
List<CompleteStatisticsEntity> rtn = session.GetList<CompleteStatisticsEntity>(sql, parameters).ToList(); List<CompleteStatisticsEntity> rtn = session.GetList<CompleteStatisticsEntity>(sql, parameters).ToList();
session.ExecuteSql(unableSql, unableParameters);
//var count = session.ExecuteSql(unableSql, unableParameters);
using (IDataSession session2 = AppDataFactory.CreateMainSession())
{
var count = session2.ExecuteSql(unableSql, unableParameters);
}
return rtn; return rtn;
} }
@ -375,7 +472,7 @@ namespace QMAPP.FJC.DAL.CompleteStatistics
{ {
List<DataParameter> parametersList = new List<DataParameter>(); List<DataParameter> parametersList = new List<DataParameter>();
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.AppendLine("UPDATE T_AW_COMPLETE_STATISTICS"); sql.AppendLine("UPDATE [dbo].[T_AW_COMPLETE_STATISTICS] ");
sql.AppendLine(" SET DELFLAG = '1'"); sql.AppendLine(" SET DELFLAG = '1'");
sql.AppendLine(" WHERE DELFLAG = '0'"); sql.AppendLine(" WHERE DELFLAG = '0'");
if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) if (!string.IsNullOrWhiteSpace(condition.MATERIALNO))
@ -456,21 +553,19 @@ namespace QMAPP.FJC.DAL.CompleteStatistics
{ {
List<DataParameter> parametersList = new List<DataParameter>(); List<DataParameter> parametersList = new List<DataParameter>();
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.AppendLine("SELECT C.MFG_USERCODE AS EMPLOYEE, "); sql.AppendLine("SELECT (select top 1 MFG_USERCODE from T_AW_COMPLETE_MFG_CONFIG where MFG_MATERIAL_CODE = T.MATERIALNO) AS EMPLOYEE, ");
sql.AppendLine(" C.MFG_LOCATIONCODE AS SITE, "); sql.AppendLine(" (select top 1 MFG_LOCATIONCODE from T_AW_COMPLETE_MFG_CONFIG where MFG_MATERIAL_CODE = T.MATERIALNO) AS SITE, ");
sql.AppendLine(" '' AS SHIFT, "); sql.AppendLine(" '' AS SHIFT, ");
sql.AppendLine(" T.MATERIALNO, "); sql.AppendLine(" T.MATERIALNO, ");
sql.AppendLine(" C.PRODUCELINECODE AS PRODUCTLINE, "); sql.AppendLine(" (select top 1 PRODUCELINECODE from T_AW_COMPLETE_MFG_CONFIG where MFG_MATERIAL_CODE = T.MATERIALNO) AS PRODUCTLINE, ");
sql.AppendLine(" '' AS EDIMAT, "); sql.AppendLine(" '' AS EDIMAT, ");
sql.AppendLine(" '' AS SERIAL, "); sql.AppendLine(" '' AS SERIAL, ");
sql.AppendLine(" C.USERID, "); sql.AppendLine(" (select top 1 USERID from T_AW_COMPLETE_MFG_CONFIG where MFG_MATERIAL_CODE = T.MATERIALNO), ");
sql.AppendLine(" T.ORDERNO, "); sql.AppendLine(" T.ORDERNO, ");
sql.AppendLine(" T.COMPLETECOUNT,"); sql.AppendLine(" T.COMPLETECOUNT,");
sql.AppendLine(" T.STARTTIME,"); sql.AppendLine(" T.STARTTIME,");
sql.AppendLine(" T.ENDTIME"); sql.AppendLine(" T.ENDTIME");
sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T");
sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C");
sql.AppendLine(" ON T.MATERIALNO = C.MFG_MATERIAL_CODE");
sql.AppendLine(" WHERE T.DELFLAG = '0'"); sql.AppendLine(" WHERE T.DELFLAG = '0'");
if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) if (!string.IsNullOrWhiteSpace(condition.MATERIALNO))

2
APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj

@ -190,6 +190,8 @@
<Compile Include="TianJin\StorageDAL.cs" /> <Compile Include="TianJin\StorageDAL.cs" />
<Compile Include="TianJin\TJDoorPlankPlanDAL.cs" /> <Compile Include="TianJin\TJDoorPlankPlanDAL.cs" />
<Compile Include="TianJin\TJFrmPlaceDAL.cs" /> <Compile Include="TianJin\TJFrmPlaceDAL.cs" />
<Compile Include="TianJin\TJZhuSuPlanDAL.cs" />
<Compile Include="TianJin\TJPaoMoPlanDAL.cs" />
<Compile Include="TianJin\TJOrderPlanDAL.cs" /> <Compile Include="TianJin\TJOrderPlanDAL.cs" />
<Compile Include="TianJin\TJWorkOrderDAL.cs" /> <Compile Include="TianJin\TJWorkOrderDAL.cs" />
<Compile Include="TianJin\TWorkOrderDAL.cs" /> <Compile Include="TianJin\TWorkOrderDAL.cs" />

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

@ -38,7 +38,7 @@ namespace QMAPP.FJC.DAL.TianJin
// //
// //
strSql.Append(" SELECT TOP 1000 O.PID,O.SEQ,O.MATERIAL_CODE,O.MATERIAL_NAME,O.STATE,O.[LINENO]," + strSql.Append(" SELECT TOP 1000 O.PID,P.PLAN_NO,O.SEQ,O.MATERIAL_CODE,O.MATERIAL_NAME,O.STATE,O.[LINENO]," +
"CASE O.MOULD_CODE WHEN 'LF' THEN '左前' WHEN 'LR' THEN '左后' WHEN 'RF' THEN '右前' WHEN 'RR' THEN '右后' ELSE O.MOULD_CODE END as 'MOULD_CODE'," + "CASE O.MOULD_CODE WHEN 'LF' THEN '左前' WHEN 'LR' THEN '左后' WHEN 'RF' THEN '右前' WHEN 'RR' THEN '右后' ELSE O.MOULD_CODE END as 'MOULD_CODE'," +
"O.PLAN_DATE FROM T_PP_TJFY_WORKORDER AS O LEFT JOIN T_PP_TJFY_ORDERPLAN AS P ON P.PID = O.ORDERPLANID "); "O.PLAN_DATE FROM T_PP_TJFY_WORKORDER AS O LEFT JOIN T_PP_TJFY_ORDERPLAN AS P ON P.PID = O.ORDERPLANID ");

990
APPQ5/QMAPP.FJC.DAL/TianJin/TJPaoMoPlanDAL.cs

@ -0,0 +1,990 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.FJC.Entity.FIS;
using QMFrameWork.Data;
using QMFrameWork.Log;
using System.Data;
using QMAPP.Entity;
using QMAPP.DAL;
using QMAPP.FJC.Entity.TianJin;
using QMAPP.FJC.Entity.FileCopy.FIS;
//using QMAPP.FJC.Entity.FileCopy.FIS;
namespace QMAPP.FJC.DAL.TianJin
{
/// <summary>
/// 注塑计划管理
///
///
/// </summary>
public class TJPaoMoPlanDAL : BaseDAL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public TJPaoMoPlan Get(TJPaoMoPlan model)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_PP_TJFY_ORDERPLAN WHERE 1=1 ";
if (string.IsNullOrEmpty(model.PID) == false)
{
sql += " AND PID = @PID";
parameters.Add(new DataParameter("PID", model.PID));
}
if (string.IsNullOrEmpty(model.PLAN_NO) == false)
{
sql += " AND PLAN_NO = @PLAN_NO";
parameters.Add(new DataParameter("PLAN_NO", model.PLAN_NO));
}
//if (string.IsNullOrEmpty(model.MACHINECODDE) == false)
//{
// sql += " AND MACHINECODDE = @MACHINECODDE";
// parameters.Add(new DataParameter("MACHINECODDE", model.MACHINECODDE));
//}
if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false)
{
sql += " AND MATERIAL_CODE = @MATERIAL_CODE";
parameters.Add(new DataParameter("MATERIAL_CODE", model.MATERIAL_CODE));
}
if (string.IsNullOrEmpty(model.PLAN_STATES) == false)
{
sql += " AND PLAN_STATE IN ('" + model.PLAN_STATES.Replace(",", "','") + "')";
}
if (BaseSession != null)
{
//获取信息
model = BaseSession.Get<TJPaoMoPlan>(sql, parameters.ToArray());
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
model = session.Get<TJPaoMoPlan>(sql, parameters.ToArray());
}
}
return model;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "信息数据层-获取信息"
});
throw;
}
}
public TJPaoMoPlan GetOne(TJPaoMoPlan model)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_PP_ORDERPLAN_PAOMO WHERE PLAN_STATE IN ('1','2') ";
if (string.IsNullOrEmpty(model.PID) == false)
{
sql += " AND PID = @PID";
parameters.Add(new DataParameter("PID", model.PID));
}
if (string.IsNullOrEmpty(model.PLAN_NO) == false)
{
sql += " AND PLAN_NO = @PLAN_NO";
parameters.Add(new DataParameter("PLAN_NO", model.PLAN_NO));
}
//if (string.IsNullOrEmpty(model.MACHINECODDE) == false)
//{
// sql += " AND MACHINECODDE = @MACHINECODDE";
// parameters.Add(new DataParameter("MACHINECODDE", model.MACHINECODDE));
//}
if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false)
{
sql += " AND MATERIAL_CODE = @MATERIAL_CODE";
parameters.Add(new DataParameter("MATERIAL_CODE", model.MATERIAL_CODE));
}
sql += " order by CREATEDATE desc ";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
model = session.Get<TJPaoMoPlan>(sql, parameters.ToArray());
}
return model;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "信息数据层-获取信息"
});
throw;
}
}
public TJPaoMoPlan GetInfo(TJPaoMoPlan model)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_PP_ORDERPLAN_PAOMO WHERE PLAN_NO = @PLAN_NO";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
parameters.Add(new DataParameter { ParameterName = "PLAN_NO", DataType = DbType.String, Value = model.PLAN_NO });
model = session.Get<TJPaoMoPlan>(sql, parameters.ToArray());
}
return model;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "信息数据层-获取信息"
});
throw;
}
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
public DataPage GetList(TJPaoMoPlan condition, DataPage page)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = this.GetQuerySql(condition, ref parameters);
//分页关键字段及排序
page.KeyName = "PID";
if (string.IsNullOrEmpty(page.SortExpression))
{
page.SortExpression = "CREATEDATE DESC";
}
using (IDataSession session = AppDataFactory.CreateMainSession())
{
page = session.GetDataPage<TJPaoMoPlan>(sql, parameters.ToArray(), page);
}
return page;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "注塑信息数据层-获取列表"
});
throw;
}
}
#endregion
#region 获取查询语句
/// <summary>
/// 获取查询语句
/// </summary>
/// <param name="user">查询条件</param>
/// <param name="parameters">参数</param>
/// <returns>查询语句</returns>
private string GetQuerySql(TJPaoMoPlan condition, ref List<DataParameter> parameters)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
try
{
//构成查询语句
sqlBuilder.AppendLine(" SELECT DISTINCT O.PID ");
sqlBuilder.AppendLine(" ,O.FACTORY_CODE ");
sqlBuilder.AppendLine(" ,F.FACTORY_NAME ");
sqlBuilder.AppendLine(" ,O.PLAN_NO ");
sqlBuilder.AppendLine(" ,O.PLAN_SEQ ");
sqlBuilder.AppendLine(" ,O.PLAN_STATE ");
sqlBuilder.AppendLine(" ,O.MATERIAL_CODE ");
sqlBuilder.AppendLine(" ,M.MATERIAL_NAME ");
sqlBuilder.AppendLine(" ,O.MACHINECODDE ");
sqlBuilder.AppendLine(" ,O.PBOM_CODE ");
sqlBuilder.AppendLine(" ,O.ROUTE_CODE ");
sqlBuilder.AppendLine(" ,O.REMARK ");
sqlBuilder.AppendLine(" ,O.QTY ");
sqlBuilder.AppendLine(" ,O.COMPLETE_QTY ");
sqlBuilder.AppendLine(" ,CONVERT(VARCHAR(19),O.PLAN_DATE,120) AS PLAN_DATE ");
sqlBuilder.AppendLine(" ,O.SHIFT_CODE ");
sqlBuilder.AppendLine(" ,P.PRODUCESHIFTNAME AS SHIFT_NAME ");
sqlBuilder.AppendLine(" ,O.PLANSOURCE ");
sqlBuilder.AppendLine(" ,O.PRODUCEREQUIRE ");
//sqlBuilder.AppendLine(" ,WC.WORKCENTER_CODE ");
sqlBuilder.AppendLine(" ,O.CREATEUSER ");
sqlBuilder.AppendLine(" ,O.CREATEDATE ");
sqlBuilder.AppendLine(" ,O.UPDATEUSER ");
sqlBuilder.AppendLine(" ,O.UPDATEDATE ");
sqlBuilder.AppendLine(" ,O.IGNORE_FISBREAK ");
sqlBuilder.AppendLine(" ,O.FIS_ASMSETCODE ");
sqlBuilder.AppendLine(" ,O.STARTTIME AS STARTTIMEVIEW ");
sqlBuilder.AppendLine(" ,O.ENDTIME AS ENDTIMEVIEW");
sqlBuilder.AppendLine(" ,C.USERNAME AS CREATEUSERNAME ");
sqlBuilder.AppendLine(" ,U.USERNAME AS UPDATEUSERNAME ");
sqlBuilder.AppendLine(" FROM T_PP_ORDERPLAN_PAOMO O ");
//注塑所需要的表T_PP_WORKORDER
sqlBuilder.AppendLine(" LEFT JOIN T_BD_PRODUCESHIFT P ON P.PRODUCESHIFTTCODE=O.SHIFT_CODE ");
sqlBuilder.AppendLine(" LEFT JOIN T_MD_FACTORY F ON F.FACTORY_CODE=O.FACTORY_CODE ");
sqlBuilder.AppendLine(" LEFT JOIN T_PP_WORKORDER W ON W.ORDERPLANID=O.PID ");
sqlBuilder.AppendLine(" LEFT JOIN T_MD_MATERIAL M ON M.MATERIAL_CODE=O.MATERIAL_CODE ");
//sqlBuilder.AppendLine(" LEFT JOIN T_MD_WORKCELL WC ON WC.WORKCELL_CODE=PRW.WORKCELL_CODE ");
sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER C ON C.USERID=O.CREATEUSER ");
sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER U ON U.USERID=O.UPDATEUSER ");
//whereBuilder.AppendFormat(" AND O.WORKCENTER_CODE in (select distinct WORKCENTER from T_PP_ORDERINDENTITY where ORDER_TYPE='{0}')", condition.ORDER_TYPE);
//查询条件
//if (string.IsNullOrEmpty(condition.FACTORY_CODE) == false)
//{
// whereBuilder.Append(" AND O.FACTORY_CODE = @FACTORY_CODE ");
// parameters.Add(new DataParameter { ParameterName = "FACTORY_CODE", DataType = DbType.String, Value = condition.FACTORY_CODE });
//}
if (string.IsNullOrEmpty(condition.PLAN_NO) == false)
{
whereBuilder.Append(" AND O.PLAN_NO = @PLAN_NO ");
parameters.Add(new DataParameter { ParameterName = "PLAN_NO", DataType = DbType.String, Value = condition.PLAN_NO });
}
//物料号
if (string.IsNullOrEmpty(condition.MATERIAL_CODE) == false)
{
whereBuilder.Append(" AND O.MATERIAL_CODE = @MATERIAL_CODE ");
parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = condition.MATERIAL_CODE });
}
//工艺路线
//if (string.IsNullOrEmpty(condition.ROUTE_CODE) == false)
//{
// whereBuilder.Append(" AND O.ROUTE_CODE = @ROUTE_CODE ");
// parameters.Add(new DataParameter { ParameterName = "ROUTE_CODE", DataType = DbType.String, Value = condition.ROUTE_CODE });
//}
//班次编码
//if (string.IsNullOrEmpty(condition.SHIFT_CODE) == false)
//{
// whereBuilder.Append(" AND O.SHIFT_CODE = @SHIFT_CODE ");
// parameters.Add(new DataParameter { ParameterName = "SHIFT_CODE", DataType = DbType.String, Value = condition.SHIFT_CODE });
//}
//设备
//if (string.IsNullOrEmpty(condition.MACHINECODDE) == false)
//{
// whereBuilder.Append(" AND O.MACHINECODDE = @MACHINECODDE ");
// parameters.Add(new DataParameter { ParameterName = "MACHINECODDE", DataType = DbType.String, Value = condition.MACHINECODDE });
//}
//计划时间
if (condition.PLANTIMESTART != DateTime.MinValue)
{
whereBuilder.Append(" AND O.PLAN_DATE >= @PLANTIMESTART");
parameters.Add(new DataParameter { ParameterName = "PLANTIMESTART", DataType = DbType.String, Value = condition.PLANTIMESTART });
}
if (condition.PLANTIMEEND != DateTime.MinValue)
{
whereBuilder.Append(" AND O.PLAN_DATE <= @PLANTIMEEND");
parameters.Add(new DataParameter { ParameterName = "PLANTIMEEND", DataType = DbType.String, Value = condition.PLANTIMEEND });
}
if (whereBuilder.Length > 0)
{
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
}
return sqlBuilder.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 信息是否重复
/// <summary>
/// 判断计划单号是否存在
/// </summary>
/// <param name="info"></param>
/// <returns>true:已存在;fasel:不存在。</returns>
public int ExistsOrderPlan(TJPaoMoPlan model)
{
string PID = "";
int count = 0;
StringBuilder sqlBuilder = new StringBuilder();
try
{
if (string.IsNullOrEmpty(model.PID) == false)
{
PID = model.PID;
}
sqlBuilder.AppendLine("SELECT COUNT(*) FROM T_PP_ORDERPLAN_PAOMO ");
sqlBuilder.AppendLine(" WHERE PID <> @PID AND PLAN_NO=@PLAN_NO");
using (IDataSession session = AppDataFactory.CreateMainSession())
{
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(),
new DataParameter("PID", PID),
new DataParameter { ParameterName = "PLAN_NO", Value = model.PLAN_NO }));
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public int Insert(TJPaoMoPlan model)
{
int count = 0;
try
{
if (BaseSession != null)
{
//插入基本信息
count = BaseSession.Insert<TJPaoMoPlan>(model);
//InsertOrderPlanTrace(BaseSession, model, "新增");
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
count = session.Insert<TJPaoMoPlan>(model);
//InsertOrderPlanTrace(session, model, "新增");
}
}
//using (IDataSession session = AppDataFactory.CreateMainSession())
//{
// //插入基本信息
// count = session.Insert<TJPaoMoPlan>(model);
//}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
public int Update(TJPaoMoPlan model)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
var sql = $"update T_PP_TJFY_ORDERPLAN set MATERIAL_CODE = '{model.MATERIAL_CODE}',QTY = '{model.QTY}',PLAN_SEQ = '{model.PLAN_SEQ}',PLAN_NO = '{model.PLAN_NO}',MATERIAL_NAME = '{model.MATERIAL_NAME}',PLAN_STATE = '{model.PLAN_STATE}' where PID = '{model.PID}';";
//更新基本信息
count = session.ExecuteSql(sql);
InsertOrderPlanTrace(session, model, "修改");
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
/// <summary>
/// 删除信息
/// </summary>
/// <param name=""></param>
/// <returns>删除个数</returns>
//提交事务
public int Delete(TJPaoMoPlan model)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//删除基本信息
count = session.Delete<TJPaoMoPlan>(model);
//InsertOrderPlanTrace(session, model, "删除");
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除校验
/// <summary>
/// 删除校验
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int DelCheck(TJPaoMoPlan model)
{
int num = 0;
int state;
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
sqlBuilder.AppendLine(" SELECT COMPLETE_QTY ");
sqlBuilder.AppendLine(" FROM T_PP_ORDERPLAN_PAOMO ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
sqlBuilder2.AppendLine(" SELECT PLAN_STATE ");
sqlBuilder2.AppendLine(" FROM T_PP_ORDERPLAN_PAOMO ");
sqlBuilder2.AppendLine(" WHERE PID = @PID ");
using (IDataSession session = AppDataFactory.CreateMainSession())
{
num = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), new DataParameter("PID", model.PID)));
state = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder2.ToString(), new DataParameter("PID", model.PID)));
}
return num+state;
}
#endregion
#region 发布
/// <summary>
/// 发布信息
/// </summary>
/// <param name=""></param>
/// <returns>发布个数</returns>
public int PutOut(TJPaoMoPlan model, DataTable workOrderDt)
{
BaseSession = AppDataFactory.CreateMainSession();
IDbConnection dbConn = DbManager.MainConnectionInfo.Connection;
IDbTransaction ids = dbConn.BeginTransaction();
try
{
if (workOrderDt.Rows != null)
{
BaseSession.DbHelper.BulkCopyData(workOrderDt, "T_PP_WORKORDER", dbConn, ids);
ids.Commit();
}
}
catch (Exception ex)
{
ids.Rollback();
throw ex;
}
int count = 0;
int count2 = 0;
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
sqlBuilder.AppendLine(" UPDATE T_PP_ORDERPLAN_PAOMO ");
sqlBuilder.AppendLine(" SET PLAN_STATE='1' ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
sqlBuilder2.AppendLine(" UPDATE T_PP_WORKORDER ");
sqlBuilder2.AppendLine(" SET STATE='1' ");
sqlBuilder2.AppendLine(" WHERE ORDERPLANID = @PID ");
//发布更新基本信息
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID });
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray());
count2 = session.ExecuteSql(sqlBuilder2.ToString(), parameters.ToArray());
}
return count;
}
#endregion
#region 发布 新
/// <summary>
/// 发布信息
/// 为了事物传递新的session zxd20171101
/// </summary>
/// <param name=""></param>
/// <returns>发布个数</returns>
public int PutOutBaseSession(TJPaoMoPlan model, DataTable workOrderDt)
{
if (BaseSession==null)
{
BaseSession = AppDataFactory.CreateMainSession();
}
//IDbConnection dbConn = DbManager.MainConnectionInfo.Connection;
//IDbTransaction ids = dbConn.BeginTransaction();
//try
//{
// if (workOrderDt.Rows != null)
// {
// BaseSession.DbHelper.BulkCopyData(workOrderDt, "T_PP_WORKORDER", dbConn, ids);
// ids.Commit();
// }
//}
//catch (Exception ex)
//{
// ids.Rollback();
// throw ex;
//}
int count = 0;
int count2 = 0;
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
sqlBuilder.AppendLine(" UPDATE T_PP_ORDERPLAN_PAOMO ");
sqlBuilder.AppendLine(" SET PLAN_STATE='1' ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
sqlBuilder2.AppendLine(" UPDATE T_PP_WORKORDER ");
sqlBuilder2.AppendLine(" SET STATE='1' ");
sqlBuilder2.AppendLine(" WHERE ORDERPLANID = @PID ");
//发布更新基本信息
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID });
//string sqlChange = ChangeSqlByDB(sqlBuilder.ToString(), session);
count = BaseSession.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray());
count2 = BaseSession.ExecuteSql(sqlBuilder2.ToString(), parameters.ToArray());
return count;
}
#endregion
#region 发布校验
/// <summary>
/// 发布校验
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int PutOutCheck(TJPaoMoPlan model)
{
int num = 0;
StringBuilder sqlBuilder = new StringBuilder();
sqlBuilder.AppendLine(" SELECT PLAN_STATE ");
sqlBuilder.AppendLine(" FROM T_PP_ORDERPLAN_PAOMO ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
if (BaseSession != null)
{
num = Convert.ToInt32(BaseSession.ExecuteSqlScalar(sqlBuilder.ToString(), new DataParameter("PID", model.PID)));
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
num = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), new DataParameter("PID", model.PID)));
}
}
return num;
}
#endregion
#region 导入
public ImportMessage GetImportData(List<TJPaoMoPlan> list)
{
ImportMessage em = new ImportMessage();
List<DataParameter> parameters = new List<DataParameter>();
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//设置祖先对象数据会话
session.OpenTs();
foreach (TJPaoMoPlan info in list)
{
if (info.IsNewInfo == true)
{
//插入信息
int count = session.Insert<TJPaoMoPlan>(info);
//InsertOrderPlanTrace(session, info, "新增");
////痕迹表
FISPlanRecord record = new FISPlanRecord();
record.PID = Guid.NewGuid().ToString();
record.MID = info.PID;
record.PLAN_NO = info.PLAN_NO;
record.MATERIAL_CODE = info.MATERIAL_CODE;
record.PLAN_QTY = info.QTY;
record.OPERATION_TYPE = "0";
record.CREATEUSER = info.CREATEUSER;
record.CREATEDATE = info.CREATEDATE;
//int no = new OrderPlanDAL().InsertRecord(record);
em.insertNum++;
}
else
{
//更新信息
int count = session.Update<TJPaoMoPlan>(info);
//InsertOrderPlanTrace(session, info, "修改");
//#region 插入修改信息痕迹表
////插入修改信息痕迹表
//FISPlanRecord record = new FISPlanRecord();
//record.PID = Guid.NewGuid().ToString();
//record.MID = info.PID;
//record.PLAN_NO = info.PLAN_NO;
//record.MATERIAL_CODE = info.MATERIAL_CODE;
//record.PLAN_QTY = info.QTY;
//record.OPERATION_TYPE = "1";
//record.CREATEUSER = info.CREATEUSER;
//record.CREATEDATE = info.CREATEDATE;
//int no = new OrderPlanDAL().InsertRecord(record);
#endregion
em.updateNum++;
}
}
session.CommitTs();
}
}
catch (Exception ex)
{
throw ex;
}
return em;
}
//#endregion
#region 获取导出的数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="user">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(TJPaoMoPlan model)
{
DataTable dt = null;
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
//构成查询语句
sql = this.GetQuerySql(model, ref parameters);
using (IDataSession session = AppDataFactory.CreateMainSession())
{
dt = session.GetTable(sql, parameters.ToArray());
dt.TableName = "OrderPlanExp";
}
return dt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除订单
public void DeleteOrderPlan(TJPaoMoPlan entity)
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.Delete<TJPaoMoPlan>(entity);
InsertOrderPlanTrace(session, entity, "删除");
}
}
#endregion
#region 改变更新订单
/// <summary>
/// 改变更新订单
/// </summary>
/// <param name="entity"></param>
public void ChangeOrderPlan(TJPaoMoPlan entity)
{
if (this.BaseSession != null)
{
this.BaseSession.Update<TJPaoMoPlan>(entity);
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.Update<TJPaoMoPlan>(entity);
}
}
}
#endregion
#region 获取流水号
/// <summary>
/// 获取流水号
/// </summary>
/// <param name = "" > 条件 </ param >
/// < returns > *信息 </ returns >
public FISPlan GetOrderPlanSeq(FISPlan condition)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = $"SELECT TOP 1 PLAN_SEQ as 'SEQSTR',PLAN_DATE as 'DATASTR' FROM T_PP_ORDERPLAN_PAOMO WHERE PLAN_DATE = '{condition.DATASTR}' ORDER BY PLAN_SEQ DESC ";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
return session.Get<FISPlan>(sql, parameters.ToArray());
}
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "流水号本体-获取信息"
});
throw;
}
}
#endregion
#region 更新流水号信息
/// <summary>
/// 更新流水号信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
//public int UpdateFisPlan(FISPlan model)
//{
// int count = 0;
// try
// {
// if (this.BaseSession != null)
// {
// count = BaseSession.Update<FISPlan>(model);
// }
// else
// {
// using (IDataSession session = AppDataFactory.CreateMainSession())
// {
// //更新基本信息
// count = session.Update<FISPlan>(model);
// }
// }
// return count;
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
#endregion
#region 插入流水号信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name=model"">物料号信息</param>
/// <returns>插入行数</returns>
//public int InsertFisPlan(FISPlan model)
//{
// int count = 0;
// try
// {
// using (IDataSession session = AppDataFactory.CreateMainSession())
// {
// //插入基本信息
// count = session.Insert<FISPlan>(model);
// }
// return count;
// }
// catch (Exception ex)
// {
// LogManager.LogHelper.Error(new LogInfo()
// {
// ErrorInfo = ex,
// Tag = ex.StackTrace,
// Info = "物料号信息数据层-插入信息"
// });
// throw;
// }
//}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public int InsertRecord(FISPlanRecord record)
{
int no = 0;
try
{
if (BaseSession != null)
{
//插入基本信息
no = BaseSession.Insert<FISPlanRecord>(record);
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
no = session.Insert<FISPlanRecord>(record);
}
}
return no;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 配置设备人员
#region 配置设备人员
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
//public DataPage FisPlanRecordList(FISPlanRecord condition, DataPage page)
//{
// string sql = "";
// List<DataParameter> parameters = new List<DataParameter>();
// try
// {
// sql = this.GetFisPlanRecordSql(condition, ref parameters);
// //分页关键字段及排序
// page.KeyName = "PID";
// if (string.IsNullOrEmpty(page.SortExpression))
// {
// page.SortExpression = "CREATEDATE DESC";
// }
// using (IDataSession session = AppDataFactory.CreateMainSession())
// {
// page = session.GetDataPage<FISPlanRecord>(sql, parameters.ToArray(), page);
// }
// return page;
// }
// catch (Exception ex)
// {
// LogManager.LogHelper.Error(new LogInfo()
// {
// ErrorInfo = ex,
// Tag = ex.StackTrace,
// Info = "订单信息数据层-获取列表"
// });
// throw;
// }
//}
#endregion
#region 获取查询语句
/// <summary>
/// 获取查询语句
/// </summary>
/// <param name="user">查询条件</param>
/// <param name="parameters">参数</param>
/// <returns>查询语句</returns>
//private string GetFisPlanRecordSql(FISPlanRecord condition, ref List<DataParameter> parameters)
//{
// StringBuilder sqlBuilder = new StringBuilder();
// StringBuilder whereBuilder = new StringBuilder();
// try
// {
// //构成查询语句
// sqlBuilder.AppendLine(" SELECT P.PID ");
// sqlBuilder.AppendLine(" ,P.MID ");
// sqlBuilder.AppendLine(" ,P.PLAN_NO ");
// sqlBuilder.AppendLine(" ,P.MATERIAL_CODE ");
// sqlBuilder.AppendLine(" ,P.PLAN_QTY ");
// sqlBuilder.AppendLine(" ,P.OPERATION_TYPE ");
// sqlBuilder.AppendLine(" ,P.CREATEUSER ");
// sqlBuilder.AppendLine(" ,P.CREATEDATE ");;
// sqlBuilder.AppendLine(" ,C.USERNAME AS CREATEUSERNAME ");
// sqlBuilder.AppendLine(" FROM T_AW_FISPLANRECORD P ");
// sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER C ON C.USERID=P.CREATEUSER ");
// //查询条件
// if (string.IsNullOrEmpty(condition.MID) == false)
// {
// whereBuilder.Append(" AND P.MID= @MID ");
// parameters.Add(new DataParameter { ParameterName = "MID", DataType = DbType.String, Value = condition.PLAN_NO });
// }
// if (whereBuilder.Length > 0)
// {
// sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
// }
// return sqlBuilder.ToString();
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
#endregion
#endregion
#region 插入操作记录
public int InsertOrderPlanTrace(IDataSession Bsession, TJPaoMoPlan model, string operatType)
{
try
{
var sql = $" insert into T_PP_TJFY_ORDERPLANTRACE(PID,PLAN_NO,PLAN_SEQ,PLAN_STATE,MATERIAL_CODE,QTY,PLAN_DATE,CREATEDATE,CREATEUSER,OPERATE_TYPE) " +
$" VALUES ('{Guid.NewGuid().ToString()}','{model.PLAN_NO}','{model.PLAN_SEQ}','{model.PLAN_STATE}','{model.MATERIAL_CODE}','{model.QTY}','{model.PLAN_DATE}','{model.UPDATEDATE}','{model.UPDATEUSER}','{operatType}');";
return Bsession.ExecuteSql(sql);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

990
APPQ5/QMAPP.FJC.DAL/TianJin/TJZhuSuPlanDAL.cs

@ -0,0 +1,990 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMAPP.FJC.Entity.FIS;
using QMFrameWork.Data;
using QMFrameWork.Log;
using System.Data;
using QMAPP.Entity;
using QMAPP.DAL;
using QMAPP.FJC.Entity.TianJin;
using QMAPP.FJC.Entity.FileCopy.FIS;
//using QMAPP.FJC.Entity.FileCopy.FIS;
namespace QMAPP.FJC.DAL.TianJin
{
/// <summary>
/// 注塑计划管理
///
///
/// </summary>
public class TJZhuSuPlanDAL : BaseDAL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public TJZhuSuPlan Get(TJZhuSuPlan model)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_PP_TJFY_ORDERPLAN WHERE 1=1 ";
if (string.IsNullOrEmpty(model.PID) == false)
{
sql += " AND PID = @PID";
parameters.Add(new DataParameter("PID", model.PID));
}
if (string.IsNullOrEmpty(model.PLAN_NO) == false)
{
sql += " AND PLAN_NO = @PLAN_NO";
parameters.Add(new DataParameter("PLAN_NO", model.PLAN_NO));
}
//if (string.IsNullOrEmpty(model.MACHINECODDE) == false)
//{
// sql += " AND MACHINECODDE = @MACHINECODDE";
// parameters.Add(new DataParameter("MACHINECODDE", model.MACHINECODDE));
//}
if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false)
{
sql += " AND MATERIAL_CODE = @MATERIAL_CODE";
parameters.Add(new DataParameter("MATERIAL_CODE", model.MATERIAL_CODE));
}
if (string.IsNullOrEmpty(model.PLAN_STATES) == false)
{
sql += " AND PLAN_STATE IN ('" + model.PLAN_STATES.Replace(",", "','") + "')";
}
if (BaseSession != null)
{
//获取信息
model = BaseSession.Get<TJZhuSuPlan>(sql, parameters.ToArray());
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
model = session.Get<TJZhuSuPlan>(sql, parameters.ToArray());
}
}
return model;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "信息数据层-获取信息"
});
throw;
}
}
public TJZhuSuPlan GetOne(TJZhuSuPlan model)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_PP_ORDERPLAN_ZHUSU WHERE PLAN_STATE IN ('1','2') ";
if (string.IsNullOrEmpty(model.PID) == false)
{
sql += " AND PID = @PID";
parameters.Add(new DataParameter("PID", model.PID));
}
if (string.IsNullOrEmpty(model.PLAN_NO) == false)
{
sql += " AND PLAN_NO = @PLAN_NO";
parameters.Add(new DataParameter("PLAN_NO", model.PLAN_NO));
}
//if (string.IsNullOrEmpty(model.MACHINECODDE) == false)
//{
// sql += " AND MACHINECODDE = @MACHINECODDE";
// parameters.Add(new DataParameter("MACHINECODDE", model.MACHINECODDE));
//}
if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false)
{
sql += " AND MATERIAL_CODE = @MATERIAL_CODE";
parameters.Add(new DataParameter("MATERIAL_CODE", model.MATERIAL_CODE));
}
sql += " order by CREATEDATE desc ";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
model = session.Get<TJZhuSuPlan>(sql, parameters.ToArray());
}
return model;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "信息数据层-获取信息"
});
throw;
}
}
public TJZhuSuPlan GetInfo(TJZhuSuPlan model)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = "SELECT * FROM T_PP_ORDERPLAN_ZHUSU WHERE PLAN_NO = @PLAN_NO";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
parameters.Add(new DataParameter { ParameterName = "PLAN_NO", DataType = DbType.String, Value = model.PLAN_NO });
model = session.Get<TJZhuSuPlan>(sql, parameters.ToArray());
}
return model;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "信息数据层-获取信息"
});
throw;
}
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
public DataPage GetList(TJZhuSuPlan condition, DataPage page)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = this.GetQuerySql(condition, ref parameters);
//分页关键字段及排序
page.KeyName = "PID";
if (string.IsNullOrEmpty(page.SortExpression))
{
page.SortExpression = "CREATEDATE DESC";
}
using (IDataSession session = AppDataFactory.CreateMainSession())
{
page = session.GetDataPage<TJZhuSuPlan>(sql, parameters.ToArray(), page);
}
return page;
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "注塑信息数据层-获取列表"
});
throw;
}
}
#endregion
#region 获取查询语句
/// <summary>
/// 获取查询语句
/// </summary>
/// <param name="user">查询条件</param>
/// <param name="parameters">参数</param>
/// <returns>查询语句</returns>
private string GetQuerySql(TJZhuSuPlan condition, ref List<DataParameter> parameters)
{
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder whereBuilder = new StringBuilder();
try
{
//构成查询语句
sqlBuilder.AppendLine(" SELECT DISTINCT O.PID ");
sqlBuilder.AppendLine(" ,O.FACTORY_CODE ");
sqlBuilder.AppendLine(" ,F.FACTORY_NAME ");
sqlBuilder.AppendLine(" ,O.PLAN_NO ");
sqlBuilder.AppendLine(" ,O.PLAN_SEQ ");
sqlBuilder.AppendLine(" ,O.PLAN_STATE ");
sqlBuilder.AppendLine(" ,O.MATERIAL_CODE ");
sqlBuilder.AppendLine(" ,M.MATERIAL_NAME ");
sqlBuilder.AppendLine(" ,O.MACHINECODDE ");
sqlBuilder.AppendLine(" ,O.PBOM_CODE ");
sqlBuilder.AppendLine(" ,O.ROUTE_CODE ");
sqlBuilder.AppendLine(" ,O.REMARK ");
sqlBuilder.AppendLine(" ,O.QTY ");
sqlBuilder.AppendLine(" ,O.COMPLETE_QTY ");
sqlBuilder.AppendLine(" ,CONVERT(VARCHAR(19),O.PLAN_DATE,120) AS PLAN_DATE ");
sqlBuilder.AppendLine(" ,O.SHIFT_CODE ");
sqlBuilder.AppendLine(" ,P.PRODUCESHIFTNAME AS SHIFT_NAME ");
sqlBuilder.AppendLine(" ,O.PLANSOURCE ");
sqlBuilder.AppendLine(" ,O.PRODUCEREQUIRE ");
//sqlBuilder.AppendLine(" ,WC.WORKCENTER_CODE ");
sqlBuilder.AppendLine(" ,O.CREATEUSER ");
sqlBuilder.AppendLine(" ,O.CREATEDATE ");
sqlBuilder.AppendLine(" ,O.UPDATEUSER ");
sqlBuilder.AppendLine(" ,O.UPDATEDATE ");
sqlBuilder.AppendLine(" ,O.IGNORE_FISBREAK ");
sqlBuilder.AppendLine(" ,O.FIS_ASMSETCODE ");
sqlBuilder.AppendLine(" ,O.STARTTIME AS STARTTIMEVIEW ");
sqlBuilder.AppendLine(" ,O.ENDTIME AS ENDTIMEVIEW");
sqlBuilder.AppendLine(" ,C.USERNAME AS CREATEUSERNAME ");
sqlBuilder.AppendLine(" ,U.USERNAME AS UPDATEUSERNAME ");
sqlBuilder.AppendLine(" FROM T_PP_ORDERPLAN_ZHUSU O ");
//注塑所需要的表T_PP_WORKORDER
sqlBuilder.AppendLine(" LEFT JOIN T_BD_PRODUCESHIFT P ON P.PRODUCESHIFTTCODE=O.SHIFT_CODE ");
sqlBuilder.AppendLine(" LEFT JOIN T_MD_FACTORY F ON F.FACTORY_CODE=O.FACTORY_CODE ");
sqlBuilder.AppendLine(" LEFT JOIN T_PP_WORKORDER W ON W.ORDERPLANID=O.PID ");
sqlBuilder.AppendLine(" LEFT JOIN T_MD_MATERIAL M ON M.MATERIAL_CODE=O.MATERIAL_CODE ");
//sqlBuilder.AppendLine(" LEFT JOIN T_MD_WORKCELL WC ON WC.WORKCELL_CODE=PRW.WORKCELL_CODE ");
sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER C ON C.USERID=O.CREATEUSER ");
sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER U ON U.USERID=O.UPDATEUSER ");
//whereBuilder.AppendFormat(" AND O.WORKCENTER_CODE in (select distinct WORKCENTER from T_PP_ORDERINDENTITY where ORDER_TYPE='{0}')", condition.ORDER_TYPE);
//查询条件
//if (string.IsNullOrEmpty(condition.FACTORY_CODE) == false)
//{
// whereBuilder.Append(" AND O.FACTORY_CODE = @FACTORY_CODE ");
// parameters.Add(new DataParameter { ParameterName = "FACTORY_CODE", DataType = DbType.String, Value = condition.FACTORY_CODE });
//}
if (string.IsNullOrEmpty(condition.PLAN_NO) == false)
{
whereBuilder.Append(" AND O.PLAN_NO = @PLAN_NO ");
parameters.Add(new DataParameter { ParameterName = "PLAN_NO", DataType = DbType.String, Value = condition.PLAN_NO });
}
//物料号
if (string.IsNullOrEmpty(condition.MATERIAL_CODE) == false)
{
whereBuilder.Append(" AND O.MATERIAL_CODE = @MATERIAL_CODE ");
parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = condition.MATERIAL_CODE });
}
//工艺路线
//if (string.IsNullOrEmpty(condition.ROUTE_CODE) == false)
//{
// whereBuilder.Append(" AND O.ROUTE_CODE = @ROUTE_CODE ");
// parameters.Add(new DataParameter { ParameterName = "ROUTE_CODE", DataType = DbType.String, Value = condition.ROUTE_CODE });
//}
//班次编码
//if (string.IsNullOrEmpty(condition.SHIFT_CODE) == false)
//{
// whereBuilder.Append(" AND O.SHIFT_CODE = @SHIFT_CODE ");
// parameters.Add(new DataParameter { ParameterName = "SHIFT_CODE", DataType = DbType.String, Value = condition.SHIFT_CODE });
//}
//设备
//if (string.IsNullOrEmpty(condition.MACHINECODDE) == false)
//{
// whereBuilder.Append(" AND O.MACHINECODDE = @MACHINECODDE ");
// parameters.Add(new DataParameter { ParameterName = "MACHINECODDE", DataType = DbType.String, Value = condition.MACHINECODDE });
//}
//计划时间
if (condition.PLANTIMESTART != DateTime.MinValue)
{
whereBuilder.Append(" AND O.PLAN_DATE >= @PLANTIMESTART");
parameters.Add(new DataParameter { ParameterName = "PLANTIMESTART", DataType = DbType.String, Value = condition.PLANTIMESTART });
}
if (condition.PLANTIMEEND != DateTime.MinValue)
{
whereBuilder.Append(" AND O.PLAN_DATE <= @PLANTIMEEND");
parameters.Add(new DataParameter { ParameterName = "PLANTIMEEND", DataType = DbType.String, Value = condition.PLANTIMEEND });
}
if (whereBuilder.Length > 0)
{
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
}
return sqlBuilder.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 信息是否重复
/// <summary>
/// 判断计划单号是否存在
/// </summary>
/// <param name="info"></param>
/// <returns>true:已存在;fasel:不存在。</returns>
public int ExistsOrderPlan(TJZhuSuPlan model)
{
string PID = "";
int count = 0;
StringBuilder sqlBuilder = new StringBuilder();
try
{
if (string.IsNullOrEmpty(model.PID) == false)
{
PID = model.PID;
}
sqlBuilder.AppendLine("SELECT COUNT(*) FROM T_PP_ORDERPLAN_ZHUSU ");
sqlBuilder.AppendLine(" WHERE PID <> @PID AND PLAN_NO=@PLAN_NO");
using (IDataSession session = AppDataFactory.CreateMainSession())
{
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(),
new DataParameter("PID", PID),
new DataParameter { ParameterName = "PLAN_NO", Value = model.PLAN_NO }));
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public int Insert(TJZhuSuPlan model)
{
int count = 0;
try
{
if (BaseSession != null)
{
//插入基本信息
count = BaseSession.Insert<TJZhuSuPlan>(model);
//InsertOrderPlanTrace(BaseSession, model, "新增");
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
count = session.Insert<TJZhuSuPlan>(model);
//InsertOrderPlanTrace(session, model, "新增");
}
}
//using (IDataSession session = AppDataFactory.CreateMainSession())
//{
// //插入基本信息
// count = session.Insert<TJZhuSuPlan>(model);
//}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
public int Update(TJZhuSuPlan model)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
var sql = $"update T_PP_TJFY_ORDERPLAN set MATERIAL_CODE = '{model.MATERIAL_CODE}',QTY = '{model.QTY}',PLAN_SEQ = '{model.PLAN_SEQ}',PLAN_NO = '{model.PLAN_NO}',MATERIAL_NAME = '{model.MATERIAL_NAME}',PLAN_STATE = '{model.PLAN_STATE}' where PID = '{model.PID}';";
//更新基本信息
count = session.ExecuteSql(sql);
InsertOrderPlanTrace(session, model, "修改");
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
/// <summary>
/// 删除信息
/// </summary>
/// <param name=""></param>
/// <returns>删除个数</returns>
//提交事务
public int Delete(TJZhuSuPlan model)
{
int count = 0;
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//删除基本信息
count = session.Delete<TJZhuSuPlan>(model);
//InsertOrderPlanTrace(session, model, "删除");
}
return count;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除校验
/// <summary>
/// 删除校验
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int DelCheck(TJZhuSuPlan model)
{
int num = 0;
int state;
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
sqlBuilder.AppendLine(" SELECT COMPLETE_QTY ");
sqlBuilder.AppendLine(" FROM T_PP_ORDERPLAN_ZHUSU ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
sqlBuilder2.AppendLine(" SELECT PLAN_STATE ");
sqlBuilder2.AppendLine(" FROM T_PP_ORDERPLAN_ZHUSU ");
sqlBuilder2.AppendLine(" WHERE PID = @PID ");
using (IDataSession session = AppDataFactory.CreateMainSession())
{
num = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), new DataParameter("PID", model.PID)));
state = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder2.ToString(), new DataParameter("PID", model.PID)));
}
return num+state;
}
#endregion
#region 发布
/// <summary>
/// 发布信息
/// </summary>
/// <param name=""></param>
/// <returns>发布个数</returns>
public int PutOut(TJZhuSuPlan model, DataTable workOrderDt)
{
BaseSession = AppDataFactory.CreateMainSession();
IDbConnection dbConn = DbManager.MainConnectionInfo.Connection;
IDbTransaction ids = dbConn.BeginTransaction();
try
{
if (workOrderDt.Rows != null)
{
BaseSession.DbHelper.BulkCopyData(workOrderDt, "T_PP_WORKORDER", dbConn, ids);
ids.Commit();
}
}
catch (Exception ex)
{
ids.Rollback();
throw ex;
}
int count = 0;
int count2 = 0;
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
sqlBuilder.AppendLine(" UPDATE T_PP_ORDERPLAN_ZHUSU ");
sqlBuilder.AppendLine(" SET PLAN_STATE='1' ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
sqlBuilder2.AppendLine(" UPDATE T_PP_WORKORDER ");
sqlBuilder2.AppendLine(" SET STATE='1' ");
sqlBuilder2.AppendLine(" WHERE ORDERPLANID = @PID ");
//发布更新基本信息
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID });
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray());
count2 = session.ExecuteSql(sqlBuilder2.ToString(), parameters.ToArray());
}
return count;
}
#endregion
#region 发布 新
/// <summary>
/// 发布信息
/// 为了事物传递新的session zxd20171101
/// </summary>
/// <param name=""></param>
/// <returns>发布个数</returns>
public int PutOutBaseSession(TJZhuSuPlan model, DataTable workOrderDt)
{
if (BaseSession==null)
{
BaseSession = AppDataFactory.CreateMainSession();
}
//IDbConnection dbConn = DbManager.MainConnectionInfo.Connection;
//IDbTransaction ids = dbConn.BeginTransaction();
//try
//{
// if (workOrderDt.Rows != null)
// {
// BaseSession.DbHelper.BulkCopyData(workOrderDt, "T_PP_WORKORDER", dbConn, ids);
// ids.Commit();
// }
//}
//catch (Exception ex)
//{
// ids.Rollback();
// throw ex;
//}
int count = 0;
int count2 = 0;
StringBuilder sqlBuilder = new StringBuilder();
StringBuilder sqlBuilder2 = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
sqlBuilder.AppendLine(" UPDATE T_PP_ORDERPLAN_ZHUSU ");
sqlBuilder.AppendLine(" SET PLAN_STATE='1' ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
sqlBuilder2.AppendLine(" UPDATE T_PP_WORKORDER ");
sqlBuilder2.AppendLine(" SET STATE='1' ");
sqlBuilder2.AppendLine(" WHERE ORDERPLANID = @PID ");
//发布更新基本信息
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID });
//string sqlChange = ChangeSqlByDB(sqlBuilder.ToString(), session);
count = BaseSession.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray());
count2 = BaseSession.ExecuteSql(sqlBuilder2.ToString(), parameters.ToArray());
return count;
}
#endregion
#region 发布校验
/// <summary>
/// 发布校验
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public int PutOutCheck(TJZhuSuPlan model)
{
int num = 0;
StringBuilder sqlBuilder = new StringBuilder();
sqlBuilder.AppendLine(" SELECT PLAN_STATE ");
sqlBuilder.AppendLine(" FROM T_PP_ORDERPLAN_ZHUSU ");
sqlBuilder.AppendLine(" WHERE PID = @PID ");
if (BaseSession != null)
{
num = Convert.ToInt32(BaseSession.ExecuteSqlScalar(sqlBuilder.ToString(), new DataParameter("PID", model.PID)));
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
num = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), new DataParameter("PID", model.PID)));
}
}
return num;
}
#endregion
#region 导入
public ImportMessage GetImportData(List<TJZhuSuPlan> list)
{
ImportMessage em = new ImportMessage();
List<DataParameter> parameters = new List<DataParameter>();
try
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//设置祖先对象数据会话
session.OpenTs();
foreach (TJZhuSuPlan info in list)
{
if (info.IsNewInfo == true)
{
//插入信息
int count = session.Insert<TJZhuSuPlan>(info);
//InsertOrderPlanTrace(session, info, "新增");
////痕迹表
FISPlanRecord record = new FISPlanRecord();
record.PID = Guid.NewGuid().ToString();
record.MID = info.PID;
record.PLAN_NO = info.PLAN_NO;
record.MATERIAL_CODE = info.MATERIAL_CODE;
record.PLAN_QTY = info.QTY;
record.OPERATION_TYPE = "0";
record.CREATEUSER = info.CREATEUSER;
record.CREATEDATE = info.CREATEDATE;
//int no = new OrderPlanDAL().InsertRecord(record);
em.insertNum++;
}
else
{
//更新信息
int count = session.Update<TJZhuSuPlan>(info);
//InsertOrderPlanTrace(session, info, "修改");
//#region 插入修改信息痕迹表
////插入修改信息痕迹表
//FISPlanRecord record = new FISPlanRecord();
//record.PID = Guid.NewGuid().ToString();
//record.MID = info.PID;
//record.PLAN_NO = info.PLAN_NO;
//record.MATERIAL_CODE = info.MATERIAL_CODE;
//record.PLAN_QTY = info.QTY;
//record.OPERATION_TYPE = "1";
//record.CREATEUSER = info.CREATEUSER;
//record.CREATEDATE = info.CREATEDATE;
//int no = new OrderPlanDAL().InsertRecord(record);
#endregion
em.updateNum++;
}
}
session.CommitTs();
}
}
catch (Exception ex)
{
throw ex;
}
return em;
}
//#endregion
#region 获取导出的数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="user">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(TJZhuSuPlan model)
{
DataTable dt = null;
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
//构成查询语句
sql = this.GetQuerySql(model, ref parameters);
using (IDataSession session = AppDataFactory.CreateMainSession())
{
dt = session.GetTable(sql, parameters.ToArray());
dt.TableName = "OrderPlanExp";
}
return dt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除订单
public void DeleteOrderPlan(TJZhuSuPlan entity)
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.Delete<TJZhuSuPlan>(entity);
InsertOrderPlanTrace(session, entity, "删除");
}
}
#endregion
#region 改变更新订单
/// <summary>
/// 改变更新订单
/// </summary>
/// <param name="entity"></param>
public void ChangeOrderPlan(TJZhuSuPlan entity)
{
if (this.BaseSession != null)
{
this.BaseSession.Update<TJZhuSuPlan>(entity);
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
session.Update<TJZhuSuPlan>(entity);
}
}
}
#endregion
#region 获取流水号
/// <summary>
/// 获取流水号
/// </summary>
/// <param name = "" > 条件 </ param >
/// < returns > *信息 </ returns >
public FISPlan GetOrderPlanSeq(FISPlan condition)
{
string sql = null;
List<DataParameter> parameters = new List<DataParameter>();
try
{
sql = $"SELECT TOP 1 PLAN_SEQ as 'SEQSTR',PLAN_DATE as 'DATASTR' FROM T_PP_ORDERPLAN_ZHUSU WHERE PLAN_DATE = '{condition.DATASTR}' ORDER BY PLAN_SEQ DESC ";
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//获取信息
return session.Get<FISPlan>(sql, parameters.ToArray());
}
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo()
{
ErrorInfo = ex,
Tag = ex.StackTrace,
Info = "流水号本体-获取信息"
});
throw;
}
}
#endregion
#region 更新流水号信息
/// <summary>
/// 更新流水号信息
/// </summary>
/// <param name=""></param>
/// <returns>更新行数</returns>
//public int UpdateFisPlan(FISPlan model)
//{
// int count = 0;
// try
// {
// if (this.BaseSession != null)
// {
// count = BaseSession.Update<FISPlan>(model);
// }
// else
// {
// using (IDataSession session = AppDataFactory.CreateMainSession())
// {
// //更新基本信息
// count = session.Update<FISPlan>(model);
// }
// }
// return count;
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
#endregion
#region 插入流水号信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name=model"">物料号信息</param>
/// <returns>插入行数</returns>
//public int InsertFisPlan(FISPlan model)
//{
// int count = 0;
// try
// {
// using (IDataSession session = AppDataFactory.CreateMainSession())
// {
// //插入基本信息
// count = session.Insert<FISPlan>(model);
// }
// return count;
// }
// catch (Exception ex)
// {
// LogManager.LogHelper.Error(new LogInfo()
// {
// ErrorInfo = ex,
// Tag = ex.StackTrace,
// Info = "物料号信息数据层-插入信息"
// });
// throw;
// }
//}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public int InsertRecord(FISPlanRecord record)
{
int no = 0;
try
{
if (BaseSession != null)
{
//插入基本信息
no = BaseSession.Insert<FISPlanRecord>(record);
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
//插入基本信息
no = session.Insert<FISPlanRecord>(record);
}
}
return no;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 配置设备人员
#region 配置设备人员
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
//public DataPage FisPlanRecordList(FISPlanRecord condition, DataPage page)
//{
// string sql = "";
// List<DataParameter> parameters = new List<DataParameter>();
// try
// {
// sql = this.GetFisPlanRecordSql(condition, ref parameters);
// //分页关键字段及排序
// page.KeyName = "PID";
// if (string.IsNullOrEmpty(page.SortExpression))
// {
// page.SortExpression = "CREATEDATE DESC";
// }
// using (IDataSession session = AppDataFactory.CreateMainSession())
// {
// page = session.GetDataPage<FISPlanRecord>(sql, parameters.ToArray(), page);
// }
// return page;
// }
// catch (Exception ex)
// {
// LogManager.LogHelper.Error(new LogInfo()
// {
// ErrorInfo = ex,
// Tag = ex.StackTrace,
// Info = "订单信息数据层-获取列表"
// });
// throw;
// }
//}
#endregion
#region 获取查询语句
/// <summary>
/// 获取查询语句
/// </summary>
/// <param name="user">查询条件</param>
/// <param name="parameters">参数</param>
/// <returns>查询语句</returns>
//private string GetFisPlanRecordSql(FISPlanRecord condition, ref List<DataParameter> parameters)
//{
// StringBuilder sqlBuilder = new StringBuilder();
// StringBuilder whereBuilder = new StringBuilder();
// try
// {
// //构成查询语句
// sqlBuilder.AppendLine(" SELECT P.PID ");
// sqlBuilder.AppendLine(" ,P.MID ");
// sqlBuilder.AppendLine(" ,P.PLAN_NO ");
// sqlBuilder.AppendLine(" ,P.MATERIAL_CODE ");
// sqlBuilder.AppendLine(" ,P.PLAN_QTY ");
// sqlBuilder.AppendLine(" ,P.OPERATION_TYPE ");
// sqlBuilder.AppendLine(" ,P.CREATEUSER ");
// sqlBuilder.AppendLine(" ,P.CREATEDATE ");;
// sqlBuilder.AppendLine(" ,C.USERNAME AS CREATEUSERNAME ");
// sqlBuilder.AppendLine(" FROM T_AW_FISPLANRECORD P ");
// sqlBuilder.AppendLine(" LEFT JOIN T_QM_USER C ON C.USERID=P.CREATEUSER ");
// //查询条件
// if (string.IsNullOrEmpty(condition.MID) == false)
// {
// whereBuilder.Append(" AND P.MID= @MID ");
// parameters.Add(new DataParameter { ParameterName = "MID", DataType = DbType.String, Value = condition.PLAN_NO });
// }
// if (whereBuilder.Length > 0)
// {
// sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4));
// }
// return sqlBuilder.ToString();
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
#endregion
#endregion
#region 插入操作记录
public int InsertOrderPlanTrace(IDataSession Bsession, TJZhuSuPlan model, string operatType)
{
try
{
var sql = $" insert into T_PP_TJFY_ORDERPLANTRACE(PID,PLAN_NO,PLAN_SEQ,PLAN_STATE,MATERIAL_CODE,QTY,PLAN_DATE,CREATEDATE,CREATEUSER,OPERATE_TYPE) " +
$" VALUES ('{Guid.NewGuid().ToString()}','{model.PLAN_NO}','{model.PLAN_SEQ}','{model.PLAN_STATE}','{model.MATERIAL_CODE}','{model.QTY}','{model.PLAN_DATE}','{model.UPDATEDATE}','{model.UPDATEUSER}','{operatType}');";
return Bsession.ExecuteSql(sql);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}

12
APPQ5/QMAPP.FJC.Entity/Bucket/RawMaterial.cs

@ -39,7 +39,7 @@ namespace QMAPP.MD.Entity.Bucket
public string PartCode { get; set; } public string PartCode { get; set; }
/// <summary> /// <summary>
/// 批次 /// 原料批次
/// </summary> /// </summary>
[Description("批次号")] [Description("批次号")]
[DBColumn(ColumnName = "BatchCode", DataType = DbType.String)] [DBColumn(ColumnName = "BatchCode", DataType = DbType.String)]
@ -97,5 +97,15 @@ 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; }
/// <summary>
/// 投料批次
/// </summary>
public string planNumber { get; set; }
/// <summary>
/// 重量
/// </summary>
public string weight { get; set; }
} }
} }

27
APPQ5/QMAPP.FJC.Entity/Bucket/RawMaterialRecord.cs

@ -118,6 +118,31 @@ namespace QMAPP.MD.Entity.Bucket
public string SerialCode { get; set; } public string SerialCode { get; set; }
public string BeginTime { get; set; } public string BeginTime { get; set; }
public string EndTime { get; set; } public string EndTime { get; set; }
/// <summary>
/// 类型
/// </summary>
public string TYPE_COUNT { get; set; }
/// <summary>
/// 起始日期
/// </summary>
public string START_DATE { get; set; }
/// <summary>
/// 结束日期
/// </summary>
public string END_DATE { get; set; }
/// <summary>
/// 统计值
/// </summary>
public string RawMaterialCount { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string planNumber { get; set; }
} }
} }

2
APPQ5/QMAPP.FJC.Entity/QMAPP.FJC.Entity.csproj

@ -238,6 +238,8 @@
<Compile Include="TianJin\TJEPasteCard.cs" /> <Compile Include="TianJin\TJEPasteCard.cs" />
<Compile Include="TianJin\TJEPasteDetailsCard.cs" /> <Compile Include="TianJin\TJEPasteDetailsCard.cs" />
<Compile Include="TianJin\TJFISORDER.cs" /> <Compile Include="TianJin\TJFISORDER.cs" />
<Compile Include="TianJin\TJZhuSuPlan.cs" />
<Compile Include="TianJin\TJPaoMoPlan.cs" />
<Compile Include="TianJin\TJOrderPlan.cs" /> <Compile Include="TianJin\TJOrderPlan.cs" />
<Compile Include="TianJin\TJOrderPlanTrace.cs" /> <Compile Include="TianJin\TJOrderPlanTrace.cs" />
<Compile Include="TianJin\TJWorkOrder.cs" /> <Compile Include="TianJin\TJWorkOrder.cs" />

125
APPQ5/QMAPP.FJC.Entity/TianJin/TJPaoMoPlan.cs

@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMFrameWork.Data.Attributes;
using System.Data;
using QMAPP.Entity;
namespace QMAPP.FJC.Entity.TianJin
{
/// <summary>
/// 工单计划
/// </summary>
[DBTable(TableName = "T_PP_ORDERPLAN_PAOMO", TimeStampColumn = "UPDATEDATE")]
public class TJPaoMoPlan : BaseEntity
{
///<summary>
///
///</summary>
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
///<summary>
///计划单号
///</summary>
[DBColumn(ColumnName = "PLAN_NO", DataType = DbType.String)]
public string PLAN_NO { get; set; }
///<summary>
///计划顺序号
///</summary>
[DBColumn(ColumnName = "PLAN_SEQ", DataType = DbType.String)]
public String PLAN_SEQ { get; set; }
///<summary>
///车型
///</summary>
// [DBColumn(ColumnName = "LINENO", DataType = DbType.String)]
// public String LINENO { get; set; }
///<summary>
///计划状态
///</summary>
[DBColumn(ColumnName = "PLAN_STATE", DataType = DbType.String)]
public string PLAN_STATE { get; set; }
public string PLAN_STATES { get; set; }
///<summary>
///物料号
///</summary>
[DBColumn(ColumnName = "MATERIAL_CODE", DataType = DbType.String)]
public string MATERIAL_CODE { get; set; }
///<summary>
///物料名称
///</summary>
[DBColumn(ColumnName = "MATERIAL_NAME", DataType = DbType.String)]
public string MATERIAL_NAME { get; set; }
///<summary>
///计划数量
///</summary>
[DBColumn(ColumnName = "QTY", DataType = DbType.String)]
public int QTY { get; set; }
///<summary>
///完成数量
///</summary>
[DBColumn(ColumnName = "COMPLETE_QTY", DataType = DbType.String)]
public int COMPLETE_QTY { get; set; }
///<summary>
///计划日期
///</summary>
[DBColumn(ColumnName = "PLAN_DATE", DataType = DbType.DateTime)]
public DateTime PLAN_DATE { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)]
public string CREATEUSER { get; set; }
public string CREATEUSERNAME { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[DBColumn(ColumnName = "CREATEDATE", DataType = DbType.DateTime, DefaultValue = DataDefaultValue.SysDate)]
public DateTime CREATEDATE { get; set; }
/// <summary>
/// 更新用户
/// </summary>
[DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)]
public string UPDATEUSER { get; set; }
public string UPDATEUSERNAME { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.DateTime)]
public DateTime UPDATEDATE { get; set; }
public DateTime PLANTIMESTART { get; set; }
public DateTime PLANTIMEEND { get; set; }
public string STARTTIMEVIEW { get; set; }
public string ENDTIMEVIEW { get; set; }
public string STARTTIMEIN { get; set; }
public string ENDTIMEIN { get; set; }
public string PLAN_DATEIN { get; set; }
public string AsmSetCode { get; set; }
}
}

125
APPQ5/QMAPP.FJC.Entity/TianJin/TJZhuSuPlan.cs

@ -0,0 +1,125 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMFrameWork.Data.Attributes;
using System.Data;
using QMAPP.Entity;
namespace QMAPP.FJC.Entity.TianJin
{
/// <summary>
/// 工单计划
/// </summary>
[DBTable(TableName = "T_PP_ORDERPLAN_ZHUSU", TimeStampColumn = "UPDATEDATE")]
public class TJZhuSuPlan : BaseEntity
{
///<summary>
///
///</summary>
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)]
public string PID { get; set; }
///<summary>
///计划单号
///</summary>
[DBColumn(ColumnName = "PLAN_NO", DataType = DbType.String)]
public string PLAN_NO { get; set; }
///<summary>
///计划顺序号
///</summary>
[DBColumn(ColumnName = "PLAN_SEQ", DataType = DbType.String)]
public String PLAN_SEQ { get; set; }
///<summary>
///车型
///</summary>
// [DBColumn(ColumnName = "LINENO", DataType = DbType.String)]
// public String LINENO { get; set; }
///<summary>
///计划状态
///</summary>
[DBColumn(ColumnName = "PLAN_STATE", DataType = DbType.String)]
public string PLAN_STATE { get; set; }
public string PLAN_STATES { get; set; }
///<summary>
///物料号
///</summary>
[DBColumn(ColumnName = "MATERIAL_CODE", DataType = DbType.String)]
public string MATERIAL_CODE { get; set; }
///<summary>
///物料名称
///</summary>
[DBColumn(ColumnName = "MATERIAL_NAME", DataType = DbType.String)]
public string MATERIAL_NAME { get; set; }
///<summary>
///计划数量
///</summary>
[DBColumn(ColumnName = "QTY", DataType = DbType.String)]
public int QTY { get; set; }
///<summary>
///完成数量
///</summary>
[DBColumn(ColumnName = "COMPLETE_QTY", DataType = DbType.String)]
public int COMPLETE_QTY { get; set; }
///<summary>
///计划日期
///</summary>
[DBColumn(ColumnName = "PLAN_DATE", DataType = DbType.DateTime)]
public DateTime PLAN_DATE { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)]
public string CREATEUSER { get; set; }
public string CREATEUSERNAME { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[DBColumn(ColumnName = "CREATEDATE", DataType = DbType.DateTime, DefaultValue = DataDefaultValue.SysDate)]
public DateTime CREATEDATE { get; set; }
/// <summary>
/// 更新用户
/// </summary>
[DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)]
public string UPDATEUSER { get; set; }
public string UPDATEUSERNAME { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.DateTime)]
public DateTime UPDATEDATE { get; set; }
public DateTime PLANTIMESTART { get; set; }
public DateTime PLANTIMEEND { get; set; }
public string STARTTIMEVIEW { get; set; }
public string ENDTIMEVIEW { get; set; }
public string STARTTIMEIN { get; set; }
public string ENDTIMEIN { get; set; }
public string PLAN_DATEIN { get; set; }
public string AsmSetCode { get; set; }
}
}

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

@ -571,6 +571,8 @@
<Button key="PublishEndWorkCell" value="发布到总成工位" /> <Button key="PublishEndWorkCell" value="发布到总成工位" />
<Button key="PublishEndWorkloc" value="发布到P1工位" /> <Button key="PublishEndWorkloc" value="发布到P1工位" />
<Button key="AddPutMachine" value="查询上下限" /> <Button key="AddPutMachine" value="查询上下限" />
<Button key="InjectionCount" value="查询" />
</Buttons> </Buttons>
</Config> </Config>

566
APPQ5/QMAPP.FJC.Web/Controllers/InjectionCountController.cs

@ -0,0 +1,566 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
using QMAPP.Common.Web.Controllers;
using QMFrameWork.WebUI.Attribute;
using QMFrameWork.Data;
using QMAPP.Entity;
using QMAPP.ServicesAgent;
using System.Data;
using QMFrameWork.WebUI.QMEChart;
using QMFrameWork.WebUI.QMEChart.Data;
using System.Text;
using QMFrameWork.Log;
using ExcelOperationHelper = QMAPP.Web.Common.ExcelOperationHelper;
using QMFrameWork.Common.ExcelOperation;
using QMAPP.FJC.Web.Models.TianJin;
using QMAPP.MD.Entity.Bucket;
using QMAPP.FJC.Web.Models;
namespace QMAPP.FJC.Web.Controllers
{
/// <summary>
/// 生产发运统计
/// 于子清
/// 2017-10-12
/// </summary>
public class InjectionCountController : QController
{
public ActionResult QTYInjectionCount()
{
InjectionCountModel seachModel = new InjectionCountModel();
seachModel.TYPE_COUNT = DateTime.Now.ToString("DAY");
seachModel.START_DATE = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.END_DATE = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss");
return View(seachModel);
}
/// <summary>
/// 异步刷新TABLE
/// </summary>
/// <param name="pageIndex"></param>
/// <returns></returns>
public ActionResult GetTable(string TYPE_COUNT, string START_DATE, string END_DATE)
{
ServiceAgent wcfAgent = this.GetServiceAgent();
RawMaterialRecord condition = new RawMaterialRecord();
condition.TYPE_COUNT = TYPE_COUNT;
condition.START_DATE = START_DATE;
condition.END_DATE = END_DATE;
List<RawMaterialRecord> nli = new List<RawMaterialRecord>();
try
{
#region wcf服务统一接口
var dataResult = wcfAgent.InvokeServiceFunction<DataResult<List<RawMaterialRecord>>>("RawMaterialRecordBLL_GetMainListB", condition);
nli = dataResult.Result;
#endregion
}
catch (Exception ex)
{
throw ex;
}
string sss = GetHTMLStr(nli);
return Json(sss);
}
/// <summary>
/// 拼接字符串
/// </summary>
/// <returns></returns>
public string GetHTMLStr(List<RawMaterialRecord> nli)
{
StringBuilder html = new StringBuilder();
if (nli==null)
{
return "";
}
//拼接表头
Dictionary<string, int> sumDic = new Dictionary<string, int>();
Dictionary<string, int> timeDic = new Dictionary<string, int>();
html.Append("<tr><td class='L1cos'></td>");
List<string> headList = nli.Select(o => o.PartCode).Distinct().OrderBy(o => o.ToString()).ToList<string>();
List<string> materialList=nli.Select(o => o.planNumber).Distinct().OrderBy(o =>o.ToString()).ToList<string>();
materialList.Add("合计");
foreach (var str in headList)
{
html.AppendFormat("<td>{0}</td>", str);
sumDic[str]=0;
}
html.Append("<td style='background-color:#ECF5FF'>合计</td>");
html.Append("</tr>");
for (int i = 0; i < materialList.Count; i++)
{
timeDic[materialList[i]] = 0;
if (materialList[i] != "合计")
{
//增加行
html.Append("<tr>");
//增加类型
//html.AppendFormat("<td>{0}</td>", materialList[i]);
var ss = nli.Where(p => p.planNumber == materialList[i]).ToList()[0].planNumber;
html.AppendFormat("<td>{0}</td>", ss);
for (int j = 0; j < headList.Count; j++)
{
int countValue=0;
if (nli.Exists(o => (o.planNumber) == materialList[i] && o.PartCode == headList[j]))
{
var no= nli.First(o => (o.planNumber) == materialList[i] && o.PartCode == headList[j]);
html.AppendFormat("<td>{0}</td>", no.RawMaterialCount.ToString());
countValue=Convert.ToInt32(no.RawMaterialCount);
}
else
{
html.AppendFormat("<td></td>", materialList[i]);
}
sumDic[headList[j]] = sumDic[headList[j]] + countValue;
timeDic[materialList[i]] = timeDic[materialList[i]] + countValue;
}
html.AppendFormat("<td style='background-color:#ECF5FF'>{0}</td>", timeDic[materialList[i]].ToString());
html.Append("</tr>");
}
else
{
//增加行
html.Append("<tr style='background-color:#ECF5FF'>");
html.AppendFormat("<td>合计</td>");
//html.AppendFormat("<td class='L1cos'></td>");
for (int j = 0; j < headList.Count; j++)
{
html.AppendFormat("<td>{0}</td>", sumDic[headList[j]].ToString());
}
html.AppendFormat("<td>{0}</td>",timeDic.Values.Sum().ToString());
html.Append("</tr>");
}
}
return html.ToString();
}
#region
/// <summary>
/// 堆积柱状图
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult GetEchartDataBar2()
{
InjectionCountModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
RawMaterialRecord condition = null;
List<RawMaterialRecord> nli = new List<RawMaterialRecord>();
try
{
//获取查询对象
seachModel = GetModel<InjectionCountModel>();
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<RawMaterialRecord, InjectionCountModel>(seachModel);
#region wcf服务统一接口
var dataResult = wcfAgent.InvokeServiceFunction<DataResult<List<RawMaterialRecord>>>("RawMaterialRecordBLL_GetMainListB", condition);
nli = dataResult.Result;
#endregion
}
catch (Exception ex)
{
throw ex;
}
#region 源数据定义
//生成数据
List<TestEChartModel> dataList = new List<TestEChartModel>();
if (nli == null)
{
nli = new List<RawMaterialRecord>();
dataList.Add(new TestEChartModel() { Week = "", Value = "0", TypeValue = " ", StackValue = "产品数量!" });
}
foreach (RawMaterialRecord item in nli)
{
dataList.Add(new TestEChartModel() { Week = item.PartCode, Value = item.RawMaterialCount, TypeValue = item.planNumber, StackValue = "产品数量!" });
}
#endregion
#region 默认设置
QMEChartBar chartLBar = new QMEChartBar() { BarType = "bar2" };
//设置源数据列表
chartLBar.DataList = dataList;
#region 设置标题
//不为空时显示Title,为空时不显示
//chartLBar.Title = new QMECTitle();
//chartLBar.Title.Text = "";
//chartLBar.Title.Subtext = "";
#endregion
#region Tooltip提示窗口设置
//是否显示ToolTip工具条
chartLBar.HaveTooltip = true;
#endregion
#region Legend图例设置
//是否有Legend
chartLBar.HaveLegend = true;
//Legend的自动统计字段,对应chartLine.DataList中用于统计的字段
chartLBar.LegendField = "TypeValue";
#endregion
#region Toolbox工具栏设置
//是否存在工具栏,为空时使用默认设置
chartLBar.HaveToolBox = false;
#endregion
#region XAxis横坐标轴设置
//为空时使用默认值并从数据源中统计类型,需要设置DataList数据源
chartLBar.HaveXAxis = true;
//设置X轴统计类型字段
chartLBar.XAxisField = "Week";
#endregion
#region YAxis纵坐标轴设置
//设置Y轴显示格式。
chartLBar.HaveYAxis = true;
//自定义设置
chartLBar.YAxis = new QMECYAxis() { AxisLabel = new QMECAxisLabel() };
chartLBar.YAxis.Type = "value";
#endregion
#region 堆积字段设置
//堆积字段,是否是堆积图形
chartLBar.StackField = "StackValue";
#endregion
#region 生成图表所需要数据格式
//转换数据格式,值字段
chartLBar.ValueField = "Value";
chartLBar.Series = QMEChartHelper.CovertDataToSeries(chartLBar);
#endregion
#region 辅助线设置,有则设置,没有则无需设置
//设置辅助线
QMECMarkLine ml = new QMECMarkLine() { ItemStyle = new QMECItemStyle() { Normal = new QMECNormal() { LineStyle = new QMECLineStyle() } }, LineData = new List<QMECPoint>() };
ml.ItemStyle.Normal.LineStyle = new QMECLineStyle() { Type = "dashed", Width = 1 };
List<QMECMarkPoint> mp = new List<QMECMarkPoint>();
QMECPoint mpstart = new QMECPoint();
QMECPoint mpend = new QMECPoint();
mpstart.Type = "min";
mpend.Type = "max";
ml.LineData.Add(mpstart);
ml.LineData.Add(mpend);
foreach (QMECSerie ser in chartLBar.Series)
{
if (ser.Name == "搜索引擎")
{
ser.MarkLine = ml;
}
}
#endregion
return Content(QMEChartHelper.QMECHelper<QMEChartBar>(chartLBar));
#endregion
}
#endregion
#region 导出图片
[HttpPost]
[HandleException]
public ActionResult ExportBanCi()
{
string imgSend = Request.Form["hiChartImg"];
imgSend = imgSend.Replace(" ", "+");
string[] contents = imgSend.Split(',');
imgSend = contents[1];
byte[] content = Convert.FromBase64String(imgSend);
System.Web.Mvc.FileContentResult result = null;
result = new System.Web.Mvc.FileContentResult(content, "application/png");
result.FileDownloadName = System.Web.HttpUtility.UrlEncode("生产发运统计.png", System.Text.Encoding.UTF8);
return result;
}
#endregion
#region 导出excel
/// <summary>
/// 导出excel
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult ExportExcel()
{
InjectionCountModel seachModel = null;
RawMaterialRecord condition = null;
DataTable exportDt = new DataTable();
string selectKey = Request["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
//获取查询对象
seachModel = GetModel<InjectionCountModel>();
condition = CopyToModel<RawMaterialRecord, InjectionCountModel>(seachModel);
//获取数据
var dataResult = wcfAgent.InvokeServiceFunction<DataTable>("RawMaterialRecordBLL_GetExportData", condition);
exportDt = dataResult;
//通过返回dataResult判断
//if (dataResult.Ex != null)
//{
// throw dataResult.Ex;
//}
//else if (dataResult.IsSuccess)
//{
// exportDt = dataResult.Result;
//}
//else
//{
// SetMessage(dataResult.Msg);
// return View(true);
//}
//根据所选信息进行导出
//if (!String.IsNullOrEmpty(selectKey))
//{
// DataView dv = new DataView(exportDt);
// string strWhere = "";
// string[] list = selectKey.Split(":".ToCharArray());
// foreach (string ID in list)
// {
// strWhere += " PID='" + ID + "' or";
// }
// if (strWhere != "")
// {
// strWhere = strWhere.Remove((strWhere.Length - 2), 2);
// }
// dv.RowFilter = strWhere;
// exportDt = dv.ToTable();
//}
//导出
IEExcelHelper ieExcelHelper = new IEExcelHelper();
var sheetInfoName = "RawMaterialRecordExp";
var sheetInfo = ieExcelHelper.GetMainInfo(sheetInfoName);
var fileName = System.Guid.NewGuid().ToString() + ".xlsx";
ieExcelHelper.ExportExcel(sheetInfo, exportDt, ExcelOperationHelper.GetTempPath() + fileName, true);
return Content(fileName);
}
catch (Exception ex)
{
LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Info = "导出excel", Tag = "电量统计" });
SetMessage("导出excel失败");
return View(true);
}
}
/// <summary>
/// 导出文件
/// </summary>
/// <returns></returns>
public ActionResult ExportFile(int Trend)
{
String filePath = ExcelOperationHelper.GetTempPath();
String fileName = Request["FileName"];
var sheetInfoName = "电量统计.xlsx";
ExcelOperationHelper.FileDownload(Response, filePath + fileName, sheetInfoName);
return Content("");
}
#endregion
//#region 导出excel
//#region 导出excel
///// <summary>
///// 导出excel
///// </summary>
///// <returns>结果</returns>
//[HttpPost]
//public ActionResult ExportExcel()
//{
// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
// {
// file.WriteLine("==1111===");
// }
// InjectionCountModel seachModel = null;
// RawMaterialRecord condition = null;
// ServiceAgent wcfAgent = this.GetServiceAgent();
// DataTable result = new DataTable();
// string selectKey = Request.Form["selectKey"];
// try
// {
// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
// {
// file.WriteLine("==2222===");
// }
// //获取查询对象
// seachModel = GetModel<InjectionCountModel>();
// condition = CopyToModel<RawMaterialRecord, InjectionCountModel>(seachModel);
// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
// {
// file.WriteLine("==3333===");
// }
// //获取数据
// result = wcfAgent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.B9BasicService.RawMaterialRecordBLL_GetExportData.ToString(), condition);
// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
// {
// file.WriteLine("==444===");
// }
// //导出
// QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool();
// return efTool.GetExcelFileResult("RawMaterialRecordExp", "加工信息.xlsx", result);
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
//#endregion
/////// <summary>
/////// 导出excel
/////// </summary>
/////// <returns>结果</returns>
////[HandleException]
////public ActionResult ExportExcel()
////{
//// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
//// {
//// file.WriteLine("==1111===");
//// }
//// InjectionCountModel seachModel = null;
//// RawMaterialRecord condition = null;
//// DataTable exportDt = new DataTable();
//// string selectKey = Request["selectKey"];
//// ServiceAgent wcfAgent = this.GetServiceAgent();
//// try
//// {
//// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
//// {
//// file.WriteLine("==22222===");
//// }
//// //获取查询对象
//// seachModel = GetModel<InjectionCountModel>();
//// condition = CopyToModel<RawMaterialRecord, InjectionCountModel>(seachModel);
//// //condition.TYPE_COUNT = TYPE_COUNT;
//// //condition.START_DATE = START_DATE;
//// //condition.END_DATE = END_DATE;
//// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
//// {
//// file.WriteLine("==33333===");
//// }
//// //获取数据
//// var dataResult = wcfAgent.InvokeServiceFunction<DataTable>("RawMaterialRecordBLL_GetExportData", condition);
//// using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"D:\ceshi\WriteLines.txt", true))
//// {
//// file.WriteLine("==4444===");
//// }
//// //通过返回dataResult判断
//// exportDt = dataResult;
//// //根据所选信息进行导出
//// //if (!String.IsNullOrEmpty(selectKey))
//// //{
//// // DataView dv = new DataView(exportDt);
//// // string strWhere = "";
//// // string[] list = selectKey.Split(":".ToCharArray());
//// // foreach (string ID in list)
//// // {
//// // strWhere += " PID='" + ID + "' or";
//// // }
//// // if (strWhere != "")
//// // {
//// // strWhere = strWhere.Remove((strWhere.Length - 2), 2);
//// // }
//// // dv.RowFilter = strWhere;
//// // exportDt = dv.ToTable();
//// //}
//// //导出
//// IEExcelHelper ieExcelHelper = new IEExcelHelper();
//// var sheetInfoName = "RawMaterialRecordExp";
//// var sheetInfo = ieExcelHelper.GetMainInfo(sheetInfoName);
//// var fileName = System.Guid.NewGuid().ToString() + ".xlsx";
//// ieExcelHelper.ExportExcel(sheetInfo, exportDt, ExcelOperationHelper.GetTempPath() + fileName, true);
//// return Content(fileName);
//// }
//// catch (Exception ex)
//// {
//// LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Info = "导出excel", Tag = "耗电量统计" });
//// SetMessage("导出excel失败");
//// return View(true);
//// }
////}
///// <summary>
///// 导出文件
///// </summary>
///// <returns></returns>
//public ActionResult ExportFile(int Trend)
//{
// String filePath = ExcelOperationHelper.GetTempPath();
// String fileName = Request["FileName"];
// var sheetInfoName = "耗电量统计.xlsx";
// ExcelOperationHelper.FileDownload(Response, filePath + fileName, sheetInfoName);
// return Content("");
//}
//#endregion
}
}

581
APPQ5/QMAPP.FJC.Web/Controllers/TJPaoMoPlanController.cs

@ -0,0 +1,581 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QMAPP.Common.Web.Controllers;
using QMFrameWork.WebUI.Attribute;
using QMAPP.FJC.Web.Models.TianJin;
using QMFrameWork.Data;
using QMAPP.ServicesAgent;
using QMAPP.FJC.Entity.TianJin;
using QMAPP.Entity;
using QMFrameWork.WebUI.DataSource;
using QMFrameWork.Common.Serialization;
using System.Data;
using QMAPP.Common.Web.Models;
using QMAPP.FJC.Entity.Basic;
using QMAPP.MD.Entity;
using QMAPP.FJC.BLL.TianJin;
namespace QMAPP.FJC.Web.Controllers
{
/// <summary>
/// 投入产出--泡沫计划
/// 作 者:张松男
/// 时 间:2021年12月28日
/// </summary>
public class TJPaoMoPlanController : QController
{
#region 获取信息
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callback)
{
TJPaoMoPlanModel seachModel = new TJPaoMoPlanModel();
seachModel.PLANTIMESTART = DateTime.Now.Date.AddDays(-10).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.PLANTIMEEND = DateTime.Now.Date.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.PLAN_STATE = "0";
seachModel.ImmediateSearch = false;
if (callback == true)
TryGetSelectBuffer<TJPaoMoPlanModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/TJPaoMoPlan/GetList";
return View("TJPaoMoPlanList", seachModel);
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
TJPaoMoPlanModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
TJPaoMoPlan condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<TJPaoMoPlanModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<TJPaoMoPlanModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<TJPaoMoPlanModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<TJPaoMoPlan, TJPaoMoPlanModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("TJPaoMoPlanBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<TJPaoMoPlan> result = new DateGridResult<TJPaoMoPlan>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<TJPaoMoPlan>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
TJPaoMoPlanModel model = new TJPaoMoPlanModel();
string ID = Request.Params["PID"];
TJPaoMoPlan Entity = new TJPaoMoPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<TJPaoMoPlan> result = new DataResult<TJPaoMoPlan>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<TJPaoMoPlan>>("TJPaoMoPlanBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("TJPaoMoPlanEdit", model);
}
model = CopyToModel<TJPaoMoPlanModel, TJPaoMoPlan>(result.Result);
}
return View("TJPaoMoPlanEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(TJPaoMoPlanModel saveModel)
{
TJPaoMoPlan Entity = null;
string TYPE = Request.Form["ORDER_TYPE"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<TJPaoMoPlan, TJPaoMoPlanModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
//Entity.ORDER_TYPE = TYPE;
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJPaoMoPlanBLL_Insert", Entity);
if (result.IsSuccess == false)
{
SetMessage("计划单号已存在!");
return View("TJPaoMoPlanEdit", saveModel);
}
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJPaoMoPlanBLL_Update", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("TJPaoMoPlanEdit", saveModel);
}
}
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
/// <summary>
/// 删除
/// </summary>
/// <returns>结果</returns>
[HttpPost]
[HandleException]
public ActionResult Delete(TJPaoMoPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJPaoMoPlanBLL_Delete", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.DeleteMessage);
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 发布
/// <summary>
/// 发布
/// </summary>
/// <returns></returns>
[HttpPost]
[HandleException]
public ActionResult PutOut(TJPaoMoPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJPaoMoPlanBLL_PutOut", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.PutOutMessage);
return List(true);
}
#endregion
#region 导出excel
/// <summary>
/// 导出excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ExportExcel()
{
TJPaoMoPlanModel seachModel = null;
TJPaoMoPlan condition = null;
DataTable exportDt = new DataTable();
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
//获取查询对象
seachModel = GetModel<TJPaoMoPlanModel>();
condition = CopyToModel<TJPaoMoPlan, TJPaoMoPlanModel>(seachModel);
//获取数据
TJPaoMoPlanBLL dp = new TJPaoMoPlanBLL();
exportDt = dp.GetExportData(condition);
//exportDt = wcfAgent.InvokeServiceFunction<DataTable>("TJPaoMoPlanBLL_GetExportData", condition);
//导出
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool();
return efTool.GetExcelFileResult("TJPaoMoPlanExp", "门板计划信息.xlsx", exportDt);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 导入excel
/// <summary>
/// 导入excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ImportExcel()
{
DataTable dt = null;
List<TJPaoMoPlan> list = new List<TJPaoMoPlan>();
DataResult<ImportMessage> serviceResult = null;
string fileName = Request.Form["fileName"];
string orderby = Request.Form["ORDER_TYPE"];
ServiceAgent wcfAgent = this.GetServiceAgent();
Materiel materialmodel = new Materiel();
ProduceShift produceshiftmodel = new ProduceShift();
MachineInfo machine = new MachineInfo();
//初始工作中心编号条件
QMAPP.MD.Entity.WorkCell workcell = new QMAPP.MD.Entity.WorkCell();
workcell.WORKCELL_CODE = orderby;
try
{
dt = this.GetTableByExcel("TJPaoMoPlanImp", fileName, dt);
//格式转换
list = QMFrameWork.Common.Util.BindHelper.ConvertToList<TJPaoMoPlan>(dt).ToList();
serviceResult = wcfAgent.InvokeServiceFunction<DataResult<ImportMessage>>("TJPaoMoPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell);
if (serviceResult.Ex != null)
{
throw serviceResult.Ex;
}
if (serviceResult.Result.failureNum != 0)
{
foreach (RowError error in serviceResult.Result.Errors)
{
dt.Rows[error.Key - 1]["InfoError"] = error.Value;
}
ImportMessageModel model = new ImportMessageModel();
model.InfoName = "TJPaoMoPlanImp";
model.ReturnUrl = "/TJPaoMoPlan/List?callBack=true";
model.Message = serviceResult.Result;
model.ErrorDt = dt;
return new MessageOutputController().OutputImportMessage(model);
}
else
{
SetMessage(serviceResult.Msg + ",如下:<br/>"
+ "插入" + serviceResult.Result.insertNum + "条,"
+ "更新" + serviceResult.Result.updateNum + "条"
);
return List(true);
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
System.IO.File.Delete(MvcApplication.TempPath + fileName);
}
}
#endregion
#region 下载模板
/// <summary>
/// 下载导入模板
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult GetTemplate()
{
try
{
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/";
string fileName = "TJPaoMoPlanImp.xlsx";
return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板发运导入模板.xlsx"));
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
//#region 整车添加物料信息
///// <summary>
///// 编辑载入
///// </summary>
///// <returns>处理结果</returns>
//[HandleException]
//public ActionResult AddMaterial()
//{
// TJPaoMoPlanModel model = new TJPaoMoPlanModel();
// string ID = Request.Params["PID"];
// string TYPE = Request.Params["ORDER_TYPE"];
// TJPaoMoPlan Entity = new TJPaoMoPlan();
// ServiceAgent wcfAgent = this.GetServiceAgent();
// DataResult<TJPaoMoPlan> result = new DataResult<TJPaoMoPlan>();
// try
// {
// model.ORDER_TYPE = TYPE;
// return View("AddMaterialEdit", model);
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
///// <summary>
///// 保存
///// </summary>
///// <param name="model"></param>
///// <returns>处理结果</returns>
//[HttpPost]
//[HandleException]
//[ValidateInput(false)]
//public ActionResult SaveMaterial(TJPaoMoPlanModel saveModel)
//{
// Material condition = new Material();
// ServiceAgent wcfAgent = this.GetServiceAgent();
// condition.MATERIAL_CODE = saveModel.MATERIAL_CODE;
// Material material = wcfAgent.InvokeServiceFunction<Material>("MaterialBLL_GetMaterialInfo", condition);
// if (!string.IsNullOrEmpty(material.PID))
// {
// saveModel.MATERIAL_NAME = material.MATERIAL_NAME;
// saveModel.COLOR = material.COLOR;
// saveModel.HBTYPE = material.HBTYPE;
// return View("AddWholeDoorEdit", saveModel);
// }
// return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
//}
//#endregion
#region 整车添加物料信息
//[HandleException]
//public ActionResult AddSendDetail(bool? callBack)
//{
// //实例化服务
// ServiceAgent wcfAgent = this.GetServiceAgent();
// QMAPP.MD.Web.Models.MaterialModel seachModel = null;
// DataResult<DataPage> pageResult = new DataResult<DataPage>();
// DataPage page = new DataPage();
// string Fisid = Request["MATERIAL_CODE"].ToString();
// FISAssembly MaterialAssInfo = wcfAgent.InvokeServiceFunction<FISAssembly>("TJPaoMoPlanBLL_GetFISMaterialInfoCD", Fisid);
// string materials = "('" + MaterialAssInfo.MESModulFL + "','" + MaterialAssInfo.MESModulFR + "','" + MaterialAssInfo.MESModulRL + "','" + MaterialAssInfo.MESModulRR + "')";
// //物料发货明细实体
// Material detail = new Material()
// {
// MaterialCodes = materials,
// };
// try
// {
// //获取查询对象
// seachModel = GetModel<QMAPP.MD.Web.Models.MaterialModel>();
// #region 获取缓存值
// if (callBack != null)
// {
// TryGetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(out seachModel);
// }
// else
// {
// //保存搜索条件
// SetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(seachModel);
// }
// #endregion
// //获取前台分页设置信息
// page = this.GetDataPage(seachModel);
// pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("MaterialBLL_GetList", detail, page);
// if (pageResult.IsSuccess == false)
// {
// SetMessage(pageResult.Msg);
// return List(true);
// }
// DateGridResult<Material> result = new DateGridResult<Material>();
// result.Total = pageResult.Result.RecordCount;
// result.Rows = JsonConvertHelper.GetDeserialize<List<Material>>(pageResult.Result.Result.ToString());
// for (var i = 0; i < result.Total; i++)
// {
// result.Rows[i].AsmSetCode = MaterialAssInfo.AsmSetCode;
// }
// return Content(result.GetJsonSource());
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
#endregion
#region 门板顺序号编辑
/// <summary>
/// 门板顺序号编辑
/// </summary>
/// <returns></returns>
public ActionResult DoorPlankEditSeq()
{
TJPaoMoPlanModel model = new TJPaoMoPlanModel();
TJPaoMoPlan Entity = new TJPaoMoPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<TJPaoMoPlan> result = new DataResult<TJPaoMoPlan>();
try
{
model = GetModel<TJPaoMoPlanModel>();
return View("DoorPlankEditSeq", model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取编辑系列号列表
/// <summary>
/// 获取编辑系列号列表
/// </summary>
/// <param name="callBack"></param>
/// <returns></returns>
[HandleException]
public ActionResult GetTJPaoMoPlanList(bool? callBack)
{
TJPaoMoPlanModel seachModel = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
DataPage page = new DataPage();
ServiceAgent wcfAgent = this.GetServiceAgent();
TJPaoMoPlan condition = new TJPaoMoPlan();
try
{
//获取查询对象
seachModel = GetModel<TJPaoMoPlanModel>();
//condition.PIDList =seachModel.PIDList;
//condition.ORDER_TYPE = seachModel.ORDER_TYPE;
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<TJPaoMoPlanModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<TJPaoMoPlanModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<TJPaoMoPlan, TJPaoMoPlanModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("TJPaoMoPlanBLL_GetTJPaoMoPlanList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<TJPaoMoPlan> result = new DateGridResult<TJPaoMoPlan>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<TJPaoMoPlan>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存顺序号修改
/// <summary>
///
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult TJPaoMoPlanSeqSave(TJPaoMoPlanModel saveModel)
{
TJPaoMoPlan entity = new TJPaoMoPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
entity.PLAN_SEQ = saveModel.PLAN_SEQ;
//entity.PIDList = saveModel.PIDList;
entity = CopyToModel<TJPaoMoPlan, TJPaoMoPlanModel>(saveModel);
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJPaoMoPlanBLL_UpdateTJPaoMoPlanSeq", entity);
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
#endregion
}
}

581
APPQ5/QMAPP.FJC.Web/Controllers/TJZhuSuPlanController.cs

@ -0,0 +1,581 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using QMAPP.Common.Web.Controllers;
using QMFrameWork.WebUI.Attribute;
using QMAPP.FJC.Web.Models.TianJin;
using QMFrameWork.Data;
using QMAPP.ServicesAgent;
using QMAPP.FJC.Entity.TianJin;
using QMAPP.Entity;
using QMFrameWork.WebUI.DataSource;
using QMFrameWork.Common.Serialization;
using System.Data;
using QMAPP.Common.Web.Models;
using QMAPP.FJC.Entity.Basic;
using QMAPP.MD.Entity;
using QMAPP.FJC.BLL.TianJin;
namespace QMAPP.FJC.Web.Controllers
{
/// <summary>
/// 投入产出--注塑计划
/// 作 者:张松男
/// 时 间:2021年12月28日
/// </summary>
public class TJZhuSuPlanController : QController
{
#region 获取信息
/// <summary>
/// 加载列表
/// </summary>
/// <returns>结果</returns>
[HandleException]
public ActionResult List(bool? callback)
{
TJZhuSuPlanModel seachModel = new TJZhuSuPlanModel();
seachModel.PLANTIMESTART = DateTime.Now.Date.AddDays(-10).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.PLANTIMEEND = DateTime.Now.Date.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss");
seachModel.PLAN_STATE = "0";
seachModel.ImmediateSearch = false;
if (callback == true)
TryGetSelectBuffer<TJZhuSuPlanModel>(out seachModel);
seachModel.rownumbers = false;
seachModel.url = "/TJZhuSuPlan/GetList";
return View("TJZhuSuPlanList", seachModel);
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="callBack">是否回调</param>
/// <returns>列表</returns>
[HandleException]
public ActionResult GetList(bool? callBack)
{
TJZhuSuPlanModel seachModel = null;
DataPage page = null;
ServiceAgent wcfAgent = this.GetServiceAgent();
TJZhuSuPlan condition = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
try
{
//获取查询对象
seachModel = GetModel<TJZhuSuPlanModel>();
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<TJZhuSuPlanModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<TJZhuSuPlanModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<TJZhuSuPlan, TJZhuSuPlanModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("TJZhuSuPlanBLL_GetList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<TJZhuSuPlan> result = new DateGridResult<TJZhuSuPlan>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<TJZhuSuPlan>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 编辑
/// <summary>
/// 编辑载入
/// </summary>
/// <returns>处理结果</returns>
[HandleException]
public ActionResult Edit()
{
TJZhuSuPlanModel model = new TJZhuSuPlanModel();
string ID = Request.Params["PID"];
TJZhuSuPlan Entity = new TJZhuSuPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<TJZhuSuPlan> result = new DataResult<TJZhuSuPlan>();
try
{
if (string.IsNullOrEmpty(ID) == false)
{
//修改获取原数据
Entity.PID = ID;
result = wcfAgent.InvokeServiceFunction<DataResult<TJZhuSuPlan>>("TJZhuSuPlanBLL_Get", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("TJZhuSuPlanEdit", model);
}
model = CopyToModel<TJZhuSuPlanModel, TJZhuSuPlan>(result.Result);
}
return View("TJZhuSuPlanEdit", model);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 保存
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult Save(TJZhuSuPlanModel saveModel)
{
TJZhuSuPlan Entity = null;
string TYPE = Request.Form["ORDER_TYPE"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
Entity = CopyToModel<TJZhuSuPlan, TJZhuSuPlanModel>(saveModel);
if (string.IsNullOrEmpty(Entity.PID) == true)
{
//新增
//Entity.ORDER_TYPE = TYPE;
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJZhuSuPlanBLL_Insert", Entity);
if (result.IsSuccess == false)
{
SetMessage("计划单号已存在!");
return View("TJZhuSuPlanEdit", saveModel);
}
}
else
{
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJZhuSuPlanBLL_Update", Entity);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return View("TJZhuSuPlanEdit", saveModel);
}
}
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 删除
/// <summary>
/// 删除
/// </summary>
/// <returns>结果</returns>
[HttpPost]
[HandleException]
public ActionResult Delete(TJZhuSuPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
try
{
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJZhuSuPlanBLL_Delete", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.DeleteMessage);
return List(true);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 发布
/// <summary>
/// 发布
/// </summary>
/// <returns></returns>
[HttpPost]
[HandleException]
public ActionResult PutOut(TJZhuSuPlan model)
{
string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJZhuSuPlanBLL_PutOut", selectKey);
if (result.IsSuccess == false)
{
SetMessage(result.Msg);
return List(true);
}
SetMessage(AppResource.PutOutMessage);
return List(true);
}
#endregion
#region 导出excel
/// <summary>
/// 导出excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ExportExcel()
{
TJZhuSuPlanModel seachModel = null;
TJZhuSuPlan condition = null;
DataTable exportDt = new DataTable();
ServiceAgent wcfAgent = this.GetServiceAgent();
try
{
//获取查询对象
seachModel = GetModel<TJZhuSuPlanModel>();
condition = CopyToModel<TJZhuSuPlan, TJZhuSuPlanModel>(seachModel);
//获取数据
TJZhuSuPlanBLL dp = new TJZhuSuPlanBLL();
exportDt = dp.GetExportData(condition);
//exportDt = wcfAgent.InvokeServiceFunction<DataTable>("TJZhuSuPlanBLL_GetExportData", condition);
//导出
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool();
return efTool.GetExcelFileResult("TJZhuSuPlanExp", "门板计划信息.xlsx", exportDt);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 导入excel
/// <summary>
/// 导入excel
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult ImportExcel()
{
DataTable dt = null;
List<TJZhuSuPlan> list = new List<TJZhuSuPlan>();
DataResult<ImportMessage> serviceResult = null;
string fileName = Request.Form["fileName"];
string orderby = Request.Form["ORDER_TYPE"];
ServiceAgent wcfAgent = this.GetServiceAgent();
Materiel materialmodel = new Materiel();
ProduceShift produceshiftmodel = new ProduceShift();
MachineInfo machine = new MachineInfo();
//初始工作中心编号条件
QMAPP.MD.Entity.WorkCell workcell = new QMAPP.MD.Entity.WorkCell();
workcell.WORKCELL_CODE = orderby;
try
{
dt = this.GetTableByExcel("TJZhuSuPlanImp", fileName, dt);
//格式转换
list = QMFrameWork.Common.Util.BindHelper.ConvertToList<TJZhuSuPlan>(dt).ToList();
serviceResult = wcfAgent.InvokeServiceFunction<DataResult<ImportMessage>>("TJZhuSuPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell);
if (serviceResult.Ex != null)
{
throw serviceResult.Ex;
}
if (serviceResult.Result.failureNum != 0)
{
foreach (RowError error in serviceResult.Result.Errors)
{
dt.Rows[error.Key - 1]["InfoError"] = error.Value;
}
ImportMessageModel model = new ImportMessageModel();
model.InfoName = "TJZhuSuPlanImp";
model.ReturnUrl = "/TJZhuSuPlan/List?callBack=true";
model.Message = serviceResult.Result;
model.ErrorDt = dt;
return new MessageOutputController().OutputImportMessage(model);
}
else
{
SetMessage(serviceResult.Msg + ",如下:<br/>"
+ "插入" + serviceResult.Result.insertNum + "条,"
+ "更新" + serviceResult.Result.updateNum + "条"
);
return List(true);
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
System.IO.File.Delete(MvcApplication.TempPath + fileName);
}
}
#endregion
#region 下载模板
/// <summary>
/// 下载导入模板
/// </summary>
/// <returns>结果</returns>
[HttpPost]
public ActionResult GetTemplate()
{
try
{
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/";
string fileName = "TJZhuSuPlanImp.xlsx";
return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板发运导入模板.xlsx"));
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
//#region 整车添加物料信息
///// <summary>
///// 编辑载入
///// </summary>
///// <returns>处理结果</returns>
//[HandleException]
//public ActionResult AddMaterial()
//{
// TJZhuSuPlanModel model = new TJZhuSuPlanModel();
// string ID = Request.Params["PID"];
// string TYPE = Request.Params["ORDER_TYPE"];
// TJZhuSuPlan Entity = new TJZhuSuPlan();
// ServiceAgent wcfAgent = this.GetServiceAgent();
// DataResult<TJZhuSuPlan> result = new DataResult<TJZhuSuPlan>();
// try
// {
// model.ORDER_TYPE = TYPE;
// return View("AddMaterialEdit", model);
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
///// <summary>
///// 保存
///// </summary>
///// <param name="model"></param>
///// <returns>处理结果</returns>
//[HttpPost]
//[HandleException]
//[ValidateInput(false)]
//public ActionResult SaveMaterial(TJZhuSuPlanModel saveModel)
//{
// Material condition = new Material();
// ServiceAgent wcfAgent = this.GetServiceAgent();
// condition.MATERIAL_CODE = saveModel.MATERIAL_CODE;
// Material material = wcfAgent.InvokeServiceFunction<Material>("MaterialBLL_GetMaterialInfo", condition);
// if (!string.IsNullOrEmpty(material.PID))
// {
// saveModel.MATERIAL_NAME = material.MATERIAL_NAME;
// saveModel.COLOR = material.COLOR;
// saveModel.HBTYPE = material.HBTYPE;
// return View("AddWholeDoorEdit", saveModel);
// }
// return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
//}
//#endregion
#region 整车添加物料信息
//[HandleException]
//public ActionResult AddSendDetail(bool? callBack)
//{
// //实例化服务
// ServiceAgent wcfAgent = this.GetServiceAgent();
// QMAPP.MD.Web.Models.MaterialModel seachModel = null;
// DataResult<DataPage> pageResult = new DataResult<DataPage>();
// DataPage page = new DataPage();
// string Fisid = Request["MATERIAL_CODE"].ToString();
// FISAssembly MaterialAssInfo = wcfAgent.InvokeServiceFunction<FISAssembly>("TJZhuSuPlanBLL_GetFISMaterialInfoCD", Fisid);
// string materials = "('" + MaterialAssInfo.MESModulFL + "','" + MaterialAssInfo.MESModulFR + "','" + MaterialAssInfo.MESModulRL + "','" + MaterialAssInfo.MESModulRR + "')";
// //物料发货明细实体
// Material detail = new Material()
// {
// MaterialCodes = materials,
// };
// try
// {
// //获取查询对象
// seachModel = GetModel<QMAPP.MD.Web.Models.MaterialModel>();
// #region 获取缓存值
// if (callBack != null)
// {
// TryGetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(out seachModel);
// }
// else
// {
// //保存搜索条件
// SetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(seachModel);
// }
// #endregion
// //获取前台分页设置信息
// page = this.GetDataPage(seachModel);
// pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("MaterialBLL_GetList", detail, page);
// if (pageResult.IsSuccess == false)
// {
// SetMessage(pageResult.Msg);
// return List(true);
// }
// DateGridResult<Material> result = new DateGridResult<Material>();
// result.Total = pageResult.Result.RecordCount;
// result.Rows = JsonConvertHelper.GetDeserialize<List<Material>>(pageResult.Result.Result.ToString());
// for (var i = 0; i < result.Total; i++)
// {
// result.Rows[i].AsmSetCode = MaterialAssInfo.AsmSetCode;
// }
// return Content(result.GetJsonSource());
// }
// catch (Exception ex)
// {
// throw ex;
// }
//}
#endregion
#region 门板顺序号编辑
/// <summary>
/// 门板顺序号编辑
/// </summary>
/// <returns></returns>
public ActionResult DoorPlankEditSeq()
{
TJZhuSuPlanModel model = new TJZhuSuPlanModel();
TJZhuSuPlan Entity = new TJZhuSuPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<TJZhuSuPlan> result = new DataResult<TJZhuSuPlan>();
try
{
model = GetModel<TJZhuSuPlanModel>();
return View("DoorPlankEditSeq", model);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取编辑系列号列表
/// <summary>
/// 获取编辑系列号列表
/// </summary>
/// <param name="callBack"></param>
/// <returns></returns>
[HandleException]
public ActionResult GetTJZhuSuPlanList(bool? callBack)
{
TJZhuSuPlanModel seachModel = null;
DataResult<DataPage> pageResult = new DataResult<DataPage>();
DataPage page = new DataPage();
ServiceAgent wcfAgent = this.GetServiceAgent();
TJZhuSuPlan condition = new TJZhuSuPlan();
try
{
//获取查询对象
seachModel = GetModel<TJZhuSuPlanModel>();
//condition.PIDList =seachModel.PIDList;
//condition.ORDER_TYPE = seachModel.ORDER_TYPE;
#region 获取缓存值
if (callBack != null)
{
TryGetSelectBuffer<TJZhuSuPlanModel>(out seachModel);
}
else
{
//保存搜索条件
SetSelectBuffer<TJZhuSuPlanModel>(seachModel);
}
#endregion
//获取前台分页设置信息
page = this.GetDataPage(seachModel);
condition = CopyToModel<TJZhuSuPlan, TJZhuSuPlanModel>(seachModel);
#region wcf服务统一接口
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("TJZhuSuPlanBLL_GetTJZhuSuPlanList", condition, page);
if (pageResult.IsSuccess == false)
{
SetMessage(pageResult.Msg);
return List(true);
}
DateGridResult<TJZhuSuPlan> result = new DateGridResult<TJZhuSuPlan>();
result.Total = pageResult.Result.RecordCount;
result.Rows = JsonConvertHelper.GetDeserialize<List<TJZhuSuPlan>>(pageResult.Result.Result.ToString());
#endregion
return Content(result.GetJsonSource());
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 保存顺序号修改
/// <summary>
///
/// </summary>
/// <param name="model"></param>
/// <returns>处理结果</returns>
[HttpPost]
[HandleException]
[ValidateInput(false)]
public ActionResult TJZhuSuPlanSeqSave(TJZhuSuPlanModel saveModel)
{
TJZhuSuPlan entity = new TJZhuSuPlan();
ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>();
entity.PLAN_SEQ = saveModel.PLAN_SEQ;
//entity.PIDList = saveModel.PIDList;
entity = CopyToModel<TJZhuSuPlan, TJZhuSuPlanModel>(saveModel);
//修改
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("TJZhuSuPlanBLL_UpdateTJZhuSuPlanSeq", entity);
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
}
#endregion
}
}

80
APPQ5/QMAPP.FJC.Web/Models/Bucket/RawMaterialModel.cs

@ -22,33 +22,6 @@ namespace QMAPP.FJC.Web.Models.Bucket
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)]
[DGColumn(Hidden = true, PrimaryKey = true)] [DGColumn(Hidden = true, PrimaryKey = true)]
public string PID { get; set; } public string PID { get; set; }
///// <summary>
///// 设备
///// </summary>
//[Description("设备")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
//[InputType(inputType.combotree)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string MachineCode { get; set; }
///// <summary>
///// 产品
///// </summary>
//[Description("产品")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
//[InputType(inputType.combotree)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string ProductLine { get; set; }
///// <summary>
///// 零件类型
///// </summary>
//[Description("零件类型")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
//[InputType(inputType.combotree)]
//[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
//public string MaterialType { get; set; }
/// <summary> /// <summary>
/// 料筒编号 /// 料筒编号
@ -67,11 +40,20 @@ namespace QMAPP.FJC.Web.Models.Bucket
[InputType(inputType.text)] [InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string PartCode { get; set; } public string PartCode { get; set; }
/// <summary> /// <summary>
/// 批次 /// 投料批次
/// </summary> /// </summary>
[Description("批次号")] [Description("投料批次")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 230, DataAlign = DataAlign.center)]
public string planNumber { get; set; }
/// <summary>
/// 原料批次
/// </summary>
[Description("原料批次")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)] [InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
@ -86,6 +68,15 @@ 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 SerialCode { get; set; } public string SerialCode { 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)]
public string weight { get; set; }
/// <summary> /// <summary>
/// 是否可用 /// 是否可用
/// </summary> /// </summary>
@ -96,9 +87,21 @@ namespace QMAPP.FJC.Web.Models.Bucket
public string IsCheck { get; set; } public string IsCheck { get; set; }
/// <summary> /// <summary>
/// 创建人 /// 供应商编码
/// </summary>
[Description("供应商编码")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string SupplierCode { get; set; }
/// <summary>
/// 创建用户
/// </summary> /// </summary>
[Description("创建用户")] [Description("创建用户")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string CREATEUSER { get; set; } public string CREATEUSER { get; set; }
/// <summary> /// <summary>
@ -110,19 +113,6 @@ 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 CREATEDATE { get; set; } public DateTime CREATEDATE { get; set; }
/// <summary>
/// 更新人
/// </summary>
[Description("更新用户")]
public string UPDATEUSER { get; set; }
/// <summary>
/// 更新日期
/// </summary>
[Description("更新时间")]
[HTMLInput(UpdateRead = true, MaxLength = 20)]
[InputType(inputType.hidden)]
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")]
public DateTime UPDATEDATE { get; set; }
} }
} }

6
APPQ5/QMAPP.FJC.Web/Models/Bucket/RawMaterialRecordModel.cs

@ -29,7 +29,7 @@ namespace QMAPP.FJC.Web.Models.Bucket
[Description("注塑条码")] [Description("注塑条码")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)] [InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 150, DataAlign = DataAlign.center)] [DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)]
public string ProductCode { get; set; } public string ProductCode { get; set; }
@ -61,9 +61,9 @@ namespace QMAPP.FJC.Web.Models.Bucket
public string BucketCode { get; set; } public string BucketCode { get; set; }
/// <summary> /// <summary>
/// 零件号 /// 原料
/// </summary> /// </summary>
[Description("零件号")] [Description("原料")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)]
[InputType(inputType.text)] [InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]

35
APPQ5/QMAPP.FJC.Web/Models/TestEChartModel.cs

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace QMAPP.FJC.Web.Models
{
public class TestEChartModel
{
public string Cate { set; get; }
public string SubCate { set; get; }
public string Week { set; get; }
public string Max { set; get; }
public string Min { set; get; }
public string TypeValue { set; get; }
public string Value { set; get; }
public string StackValue { set; get; }
public string Name { set; get; }
public double PersonHeight { set; get; }
public double PersonWeight { set; get; }
public double Diameter { set; get; }
}
}

76
APPQ5/QMAPP.FJC.Web/Models/TianJin/InjectionCountModelModel.cs

@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using QMFrameWork.WebUI.Attribute;
using QMFrameWork.WebUI;
namespace QMAPP.FJC.Web.Models.TianJin
{
/// <summary>
/// 注塑投入产出统计
/// 张松男
/// 2024-7-6
/// </summary>
public class InjectionCountModel : QDGModel
{
///<summary>
///批次号
///</summary>
[Description("批次号")]
[HTMLInput(UpdateRead = true, required = true, MaxLength = 20, Width = 150)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string RawMaterialPID { get; set; }
///<summary>
///零件号
///</summary>
[Description("零件号")]
[HTMLInput(UpdateRead = true, required = true, MaxLength = 20, Width = 150)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string MaterialCode { get; set; }
/// <summary>
/// 起始日期
/// </summary>
[Description("起始日期")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20, Width = 120)]
[InputType(inputType.dateTimeBox)]
public string START_DATE { get; set; }
/// <summary>
/// 结束日期
/// </summary>
[Description("结束日期")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 20, Width = 120)]
[InputType(inputType.dateTimeBox)]
public string END_DATE { get; set; }
///<summary>
///产品条码
///</summary>
[Description("产品条码")]
[HTMLInput(UpdateRead = true, required = true, MaxLength = 20, Width = 150)]
[InputType(inputType.combobox)]
[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)]
public string ProductCode { get; set; }
///<summary>
///统计类型
///</summary>
[Description("统计类型")]
[HTMLInput(UpdateRead = true, required = true, JsonUtl = "/Dict/GetTJList", MaxLength = 20, Width = 110)]
[InputType(inputType.combobox)]
public string TYPE_COUNT { get; set; }
public string MaterialValue { get; set; }
}
}

153
APPQ5/QMAPP.FJC.Web/Models/TianJin/TJPaoMoPlanModel.cs

@ -0,0 +1,153 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc.Html;
using QMFrameWork.WebUI.Attribute;
using QMFrameWork.WebUI;
namespace QMAPP.FJC.Web.Models.TianJin
{
public class TJPaoMoPlanModel : QDGModel
{
///<summary>
///主键
///</summary>
[Description("主键")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)]
[InputType(inputType.text)]
[DGColumn(Hidden = true, PrimaryKey = true)]
public string PID { get; set; }
///<summary>
///计划单号
///</summary>
[Description("计划单号")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30,Width = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string PLAN_NO { get; set; }
///<summary>
///计划顺序号
///</summary>
[Description("计划顺序号")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string PLAN_SEQ { get; set; }
///<summary>
///车型
///</summary>
[Description("车型")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center,Hidden = true)]
public string LINENO { get; set; } = "770";
///<summary>
///计划状态
///</summary>
[Description("计划状态")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30, Width = 180, JsonUtl = "/Dict/GetFixedComboxSource?kind=PLAN_STATE")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)]
[InputType(inputType.combobox)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string PLAN_STATE { get; set; }
///<summary>
///物料号
///</summary>
[Description("物料号")]
[HTMLInput(UpdateRead = false, required = true, Width = 200, MaxLength = 30)]
[InputType(inputType.combotree)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 130, DataAlign = DataAlign.center)]
public string MATERIAL_CODE { get; set; }
///<summary>
///物料名称
///</summary>
[Description("物料名称")]
[DGColumn(frozenColumns = false, Sortable = true, Width = 240, DataAlign = DataAlign.center)]
public string MATERIAL_NAME { get; set; }
///<summary>
///计划数量
///</summary>
[Description("计划数量")]
[HTMLInput(UpdateRead = false, Width = 196, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string QTY { get; set; }
///<summary>
//完成数量
///</summary>
[Description("完成数量")]
[HTMLInput(UpdateRead = false, Width = 196, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string COMPLETE_QTY { get; set; }
///<summary>
///备注
///</summary>
[Description("备注")]
[HTMLInput(UpdateRead = false, Width = 196, MaxLength = 30)]
[InputType(inputType.textArea)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 120, DataAlign = DataAlign.center)]
public string REMARK { get; set; }
///<summary>
///计划日期
///</summary>
[Description("计划日期")]
[HTMLInput(UpdateRead = true, required = true, Width = 200, MaxLength = 30)]
[InputType(inputType.datebox)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 150, DataAlign = DataAlign.center)]
public DateTime PLAN_DATE { get; set; }
[Description("计划日期")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 7, Width = 200, FormatDate = "yyyy-MM-dd HH:mm:ss")]
[InputType(inputType.dateTimeBox)]
public string PLANTIMESTART { get; set; }
[Description("至")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 7, Width = 200, FormatDate = "yyyy-MM-dd HH:mm:ss")]
[InputType(inputType.dateTimeBox)]
public string PLANTIMEEND { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Description("创建用户")]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center, Hidden = true)]
public string CREATEUSER { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Description("创建用户")]
[DGColumn(Sortable = true, Width = 100, DataAlign = DataAlign.left,Hidden = true)]
public string CREATEUSERNAME { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Description("创建时间")]
[HTMLInput(UpdateRead = true, MaxLength = 20)]
[InputType(inputType.hidden)]
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")]
public DateTime CREATEDATE { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Description("物料号")]
public string MaterialCodes { get; set; }
}
}

153
APPQ5/QMAPP.FJC.Web/Models/TianJin/TJZhuSuPlanModel.cs

@ -0,0 +1,153 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc.Html;
using QMFrameWork.WebUI.Attribute;
using QMFrameWork.WebUI;
namespace QMAPP.FJC.Web.Models.TianJin
{
public class TJZhuSuPlanModel : QDGModel
{
///<summary>
///主键
///</summary>
[Description("主键")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 36)]
[InputType(inputType.text)]
[DGColumn(Hidden = true, PrimaryKey = true)]
public string PID { get; set; }
///<summary>
///计划单号
///</summary>
[Description("计划单号")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30,Width = 200)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string PLAN_NO { get; set; }
///<summary>
///计划顺序号
///</summary>
[Description("计划顺序号")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string PLAN_SEQ { get; set; }
///<summary>
///车型
///</summary>
[Description("车型")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center,Hidden = true)]
public string LINENO { get; set; } = "770";
///<summary>
///计划状态
///</summary>
[Description("计划状态")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 30, Width = 180, JsonUtl = "/Dict/GetFixedComboxSource?kind=PLAN_STATE")]
//[HTMLInput(UpdateRead = false, required = true, MaxLength = 30)]
[InputType(inputType.combobox)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string PLAN_STATE { get; set; }
///<summary>
///物料号
///</summary>
[Description("物料号")]
[HTMLInput(UpdateRead = false, required = true, Width = 200, MaxLength = 30)]
[InputType(inputType.combotree)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 130, DataAlign = DataAlign.center)]
public string MATERIAL_CODE { get; set; }
///<summary>
///物料名称
///</summary>
[Description("物料名称")]
[DGColumn(frozenColumns = false, Sortable = true, Width = 240, DataAlign = DataAlign.center)]
public string MATERIAL_NAME { get; set; }
///<summary>
///计划数量
///</summary>
[Description("计划数量")]
[HTMLInput(UpdateRead = false, Width = 196, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string QTY { get; set; }
///<summary>
//完成数量
///</summary>
[Description("完成数量")]
[HTMLInput(UpdateRead = false, Width = 196, required = true, MaxLength = 30)]
[InputType(inputType.text)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center)]
public string COMPLETE_QTY { get; set; }
///<summary>
///备注
///</summary>
[Description("备注")]
[HTMLInput(UpdateRead = false, Width = 196, MaxLength = 30)]
[InputType(inputType.textArea)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 120, DataAlign = DataAlign.center)]
public string REMARK { get; set; }
///<summary>
///计划日期
///</summary>
[Description("计划日期")]
[HTMLInput(UpdateRead = true, required = true, Width = 200, MaxLength = 30)]
[InputType(inputType.datebox)]
[DGColumn(frozenColumns = false, Sortable = true, Width = 150, DataAlign = DataAlign.center)]
public DateTime PLAN_DATE { get; set; }
[Description("计划日期")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 7, Width = 200, FormatDate = "yyyy-MM-dd HH:mm:ss")]
[InputType(inputType.dateTimeBox)]
public string PLANTIMESTART { get; set; }
[Description("至")]
[HTMLInput(UpdateRead = false, required = true, MaxLength = 7, Width = 200, FormatDate = "yyyy-MM-dd HH:mm:ss")]
[InputType(inputType.dateTimeBox)]
public string PLANTIMEEND { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Description("创建用户")]
[DGColumn(frozenColumns = false, Sortable = true, Width = 80, DataAlign = DataAlign.center, Hidden = true)]
public string CREATEUSER { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Description("创建用户")]
[DGColumn(Sortable = true, Width = 100, DataAlign = DataAlign.left,Hidden = true)]
public string CREATEUSERNAME { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Description("创建时间")]
[HTMLInput(UpdateRead = true, MaxLength = 20)]
[InputType(inputType.hidden)]
[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")]
public DateTime CREATEDATE { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Description("物料号")]
public string MaterialCodes { get; set; }
}
}

13
APPQ5/QMAPP.FJC.Web/QMAPP.FJC.Web.csproj

@ -172,8 +172,11 @@
<Compile Include="Controllers\BomHdrController.cs" /> <Compile Include="Controllers\BomHdrController.cs" />
<Compile Include="Controllers\BarCodeReplacementController.cs" /> <Compile Include="Controllers\BarCodeReplacementController.cs" />
<Compile Include="Controllers\APPConfigController.cs" /> <Compile Include="Controllers\APPConfigController.cs" />
<Compile Include="Controllers\InjectionCountController.cs" />
<Compile Include="Controllers\SignInfoController.cs" /> <Compile Include="Controllers\SignInfoController.cs" />
<Compile Include="Controllers\PaomoPlanPrintController.cs" /> <Compile Include="Controllers\PaomoPlanPrintController.cs" />
<Compile Include="Controllers\TJZhuSuPlanController.cs" />
<Compile Include="Controllers\TJPaoMoPlanController.cs" />
<Compile Include="Controllers\TJDoorPlankPlanPrintController.cs" /> <Compile Include="Controllers\TJDoorPlankPlanPrintController.cs" />
<Compile Include="Controllers\StorageLogController.cs" /> <Compile Include="Controllers\StorageLogController.cs" />
<Compile Include="Controllers\StorageController.cs" /> <Compile Include="Controllers\StorageController.cs" />
@ -386,8 +389,12 @@
<Compile Include="Models\Stocktaking\CountResultModel.cs" /> <Compile Include="Models\Stocktaking\CountResultModel.cs" />
<Compile Include="Models\Stocktaking\CountSheetModel.cs" /> <Compile Include="Models\Stocktaking\CountSheetModel.cs" />
<Compile Include="Models\Stocktaking\StocktakingSearchModel.cs" /> <Compile Include="Models\Stocktaking\StocktakingSearchModel.cs" />
<Compile Include="Models\TestEChartModel.cs" />
<Compile Include="Models\TianJin\InjectionCountModelModel.cs" />
<Compile Include="Models\TianJin\StorageLogModel.cs" /> <Compile Include="Models\TianJin\StorageLogModel.cs" />
<Compile Include="Models\TianJin\StorageModel.cs" /> <Compile Include="Models\TianJin\StorageModel.cs" />
<Compile Include="Models\TianJin\TJZhuSuPlanModel.cs" />
<Compile Include="Models\TianJin\TJPaoMoPlanModel.cs" />
<Compile Include="Models\TianJin\TJDoorPlankPlanModel.cs" /> <Compile Include="Models\TianJin\TJDoorPlankPlanModel.cs" />
<Compile Include="Models\WarnManage\EquipMentAlarmModel.cs" /> <Compile Include="Models\WarnManage\EquipMentAlarmModel.cs" />
<Compile Include="Models\WarnManage\EquipMentMaintainModel.cs"> <Compile Include="Models\WarnManage\EquipMentMaintainModel.cs">
@ -949,6 +956,7 @@
<Content Include="Views\AppConfig\AppConfigList.aspx" /> <Content Include="Views\AppConfig\AppConfigList.aspx" />
<Content Include="Views\BarCodeReplace\BarCodeReplaceEdit.aspx" /> <Content Include="Views\BarCodeReplace\BarCodeReplaceEdit.aspx" />
<Content Include="Views\BarCodeReplace\BarCodeReplaceList.aspx" /> <Content Include="Views\BarCodeReplace\BarCodeReplaceList.aspx" />
<Content Include="Views\InjectionCount\QTYInjectionCount.aspx" />
<Content Include="Views\InOutPutBeginShift\InOutPutBeginShiftList.aspx" /> <Content Include="Views\InOutPutBeginShift\InOutPutBeginShiftList.aspx" />
<Content Include="Views\InOutPutInventoryLog\InOutPutInventoryLogList.aspx" /> <Content Include="Views\InOutPutInventoryLog\InOutPutInventoryLogList.aspx" />
<Content Include="Views\InOutPutInventory\InOutPutInventoryList.aspx" /> <Content Include="Views\InOutPutInventory\InOutPutInventoryList.aspx" />
@ -960,10 +968,15 @@
<Content Include="Views\PutMachineClass\PutMachineClassList.aspx" /> <Content Include="Views\PutMachineClass\PutMachineClassList.aspx" />
<Content Include="Views\ProductTime\ProductTimeEdit.aspx" /> <Content Include="Views\ProductTime\ProductTimeEdit.aspx" />
<Content Include="Views\ProductTime\ProductTimeList.aspx" /> <Content Include="Views\ProductTime\ProductTimeList.aspx" />
<Content Include="Views\RawMaterialRecordCount\QTYRawMaterialRecordCount.aspx" />
<Content Include="Views\SignInfo\SignInfoEdit.aspx" /> <Content Include="Views\SignInfo\SignInfoEdit.aspx" />
<Content Include="Views\SignInfo\SignInfoList.aspx" /> <Content Include="Views\SignInfo\SignInfoList.aspx" />
<Content Include="Views\BucketMaterialClass\BucketMaterialClassEdit.aspx" /> <Content Include="Views\BucketMaterialClass\BucketMaterialClassEdit.aspx" />
<Content Include="Views\BucketMaterialClass\BucketMaterialClassList.aspx" /> <Content Include="Views\BucketMaterialClass\BucketMaterialClassList.aspx" />
<Content Include="Views\TJZhuSuPlan\TJZhuSuPlanEdit.aspx" />
<Content Include="Views\TJZhuSuPlan\TJZhuSuPlanList.aspx" />
<Content Include="Views\TJPaoMoPlan\TJPaoMoPlanEdit.aspx" />
<Content Include="Views\TJPaoMoPlan\TJPaoMoPlanList.aspx" />
<Content Include="Views\TJDoorPlankPlanPrint\AddWholeDoorEdit.aspx" /> <Content Include="Views\TJDoorPlankPlanPrint\AddWholeDoorEdit.aspx" />
<Content Include="Views\TJDoorPlankPlanPrint\DoorPlankEditSeq.aspx" /> <Content Include="Views\TJDoorPlankPlanPrint\DoorPlankEditSeq.aspx" />
<Content Include="Views\TJDoorPlankPlanPrint\DoorPlankPlanEdit.aspx" /> <Content Include="Views\TJDoorPlankPlanPrint\DoorPlankPlanEdit.aspx" />

143
APPQ5/QMAPP.FJC.Web/Views/InjectionCount/QTYInjectionCount.aspx

@ -0,0 +1,143 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.TianJin.InjectionCountModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
生产发运统计
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(80,true) %>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.MaterialCode)%>
</th>
<td>
<%=Html.QC(p => p.MaterialCode)%>
</td>
<th align="right">
投料日期
</th>
<td>
<%=Html.QC(p => p.START_DATE)%>
</td>
<th align="right">
</th>
<td>
<%=Html.QC(p => p.END_DATE)%>
</td>
</tr>
</table>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<!--图表配置-->
<%=QMAPP.Common.Web.AppConfig.QMEChartPageConfig()%>
<%--异步获取数据生成图表--%>
<div style="overflow: auto; height: 99%;background:url(../../Content/Img/dise.jpg);">
<div style="width: 100%;text-align: center;">
<table id="maintb" class="mtbtt" style="width: 90%; margin: 0px auto;">
</table>
</div>
</div>
<script type="text/javascript">
function GetTable() {
$.ajax({
type: "POST",
url: "/InjectionCount/GetTable?TYPE_COUNT=" + $("input[name='TYPE_COUNT']").val() + "&START_DATE=" + $("input[name='START_DATE']").val() + "&END_DATE=" + $("input[name='END_DATE']").val(),
dataType: "json",
data: {},
success: function (data) {
$("#maintb").html(data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
//setTimeout("RefreshFisTable()", 10000);
alert(errorThrown);
}
});
}
function refreshEChartbar2() {
var endtime = document.getElementById("END_DATE").value;
if (parseDate($("#START_DATE").val()) > parseDate($("#END_DATE").val()) && endtime != "") {
alert("开始时间不能大于结束时间!");
return;
}
GetTable();
var ps = [];
var TYPE_COUNT = {};
TYPE_COUNT.key = "TYPE_COUNT";
TYPE_COUNT.value = $("input[name='TYPE_COUNT']").val();
ps.push(TYPE_COUNT);
var START_DATE = {};
START_DATE.key = "START_DATE";
START_DATE.value = $("input[name='START_DATE']").val();
ps.push(START_DATE);
var END_DATE = {};
END_DATE.key = "END_DATE";
END_DATE.value = $("input[name='END_DATE']").val();
ps.push(END_DATE);
GetEchartData("/InjectionCount/GetEchartDataBar2", myEChart, ps);
//GetTable();
}
//导出
// function Export() {
// var img = myEChart.getDataURL("png");
// $("#hiChartImg").val(img);
// submitByButton("ExportBanCi");
// }
//导出
//function Export() {
// document.getElementById("selectKey").value = getSelectKey();
// submitByButton("ExportExcel");
//}
function Export() {
var ids = document.getElementById("selectKey").value;
$.get("/InjectionCount/ExportExcel?Trend=0", $("form").serializeArray(), function (data) {
submitByButton("/InjectionCount/ExportFile?Trend=0&FileName=" + data);
});
}
</script>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("PID")%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<style type="text/css">
.mtbtt
{
border-collapse: collapse;
}
.mtbtt tr td
{
border: 1px solid grey;
}
.L1cos
{
width: 160px;
}
</style>
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%-- <%=Html.QTButtonSearch("InjectionCount", "QTYShipmentCount", "refreshEChartbar2()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
<%=Html.QTButton("InjectionCount", "QTYInjectionCount", QMFrameWork.WebUI.IconCls.redo, "refreshEChartbar2()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("export", "ExportBanCi", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
</td>
</tr>
</table>
</asp:Content>

106
APPQ5/QMAPP.FJC.Web/Views/TJPaoMoPlan/TJPaoMoPlanEdit.aspx

@ -0,0 +1,106 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.TianJin.TJPaoMoPlanModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
门板订单计划信息编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<%
var editable = false;
if (string.IsNullOrEmpty(Model.PLAN_STATE) || string.Equals(Model.PLAN_STATE, "0"))
{
editable = true;
}
%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p => p.PLAN_DATE)%>
</th>
<td>
<input id="PLAN_DATE" name="PLAN_DATE" value="<%=string.IsNullOrEmpty(Model.PID)?DateTime.Now.ToString("yyyy-MM-dd"):Model.PLAN_DATE.ToString("yyyy-MM-dd HH:mm:ss") %>"
style=" width:200px" type="text" class="easyui-datebox" required="required" <%=editable?"":"readonly =\"readonly\"" %> />
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MATERIAL_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MATERIAL_CODE, editable ? null : new { Readonly = "readonly" })%>
<script type="text/javascript" language="javascript">
</script>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.QTY)%>
</th>
<td>
<%=Html.QC(p => p.QTY)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.COMPLETE_QTY)%>
</th>
<td>
<%=Html.QC(p => p.COMPLETE_QTY)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.REMARK)%>
</th>
<td>
<%=Html.QC(p => p.REMARK)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p=>p.PID) %>
<%=Html.HiddenFor(p=>p.CREATEDATE) %>
<%=Html.HiddenFor(p=>p.CREATEUSER) %>
<%=Html.HiddenFor(p => p.PLAN_STATE)%>
<%=Html.HiddenFor(p => p.PLAN_NO)%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "DashBoardPlanList", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
//获取物料下拉数据源
$('#MATERIAL_CODE').combotree({
url: "/Dict/GetFisMaterialTree?ordertype=",
panelHeight: '230',
panelWidth: '470',
});
});
function Save() {
var reg = /^[0-9]+$/;
var netId = $("#QTY").val();
if (!reg.test(netId)) {
MSI("提示", "计划数量只能输入数字。");
return;
}
submitByButton("Save");
}
</script>
</asp:Content>

198
APPQ5/QMAPP.FJC.Web/Views/TJPaoMoPlan/TJPaoMoPlanList.aspx

@ -0,0 +1,198 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.TianJin.TJPaoMoPlanModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
订单生产计划列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(80, true)%>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.PLAN_NO)%>
</th>
<td>
<%=Html.QC(p => p.PLAN_NO)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLAN_STATE)%>
</th>
<td>
<%=Html.QC(p => p.PLAN_STATE)%>
</td>
<th align="right">
<%=Html.QV(p => p.MATERIAL_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MATERIAL_CODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLANTIMESTART)%>
</th>
<td>
<%=Html.QC(p => p.PLANTIMESTART)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLANTIMEEND)%>
</th>
<td>
<%=Html.QC(p => p.PLANTIMEEND)%>
</td>
</tr>
</table>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.TianJin.TJPaoMoPlanModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("fileName")%>
<%=Html.Hidden("ORDER_TYPE")%>
<script language="javascript" type="text/javascript">
$(function () {
var type = document.getElementById("ORDER_TYPE").value;
//获取物料下拉数据源
$('#MATERIAL_CODE').combotree({
url: "/Dict/GetFisMaterialTree?ordertype=" + type,
panelHeight: '250',
panelWidth: '500',
});
List(1);
});
//添加
function Add() {
openAppWindow1('信息添加', 'Edit', '500', '400');
}
//整车添加
function AddWholeDoor() {
var type = document.getElementById("ORDER_TYPE").value;
openAppWindow1('整车添加门板', 'AddWholeDoor?ORDER_TYPE=' + type, '650', '380');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
openAppWindow1('修改', 'Edit?PID=' + ids, '500', '400');
}
//插单
function Insert() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择一条FIS计划作为插单位置。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "只能选择一条FIS计划作为插单位置。");
return;
}
document.getElementById("selectKey").value = ids;
var type = document.getElementById("ORDER_TYPE").value;
openAppWindow1('插单', 'Insert?PID=' + ids + "&ORDER_TYPE=" + type, '650', '380');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要删除选中的记录吗?", function () {
submitByButton("Delete");
})
}
}
//导入
function Import() {
var fileName = window.showModalDialog("/File/UploadFile", "", "dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: Yes;status: Yes;");
if (fileName == null)
return;
document.getElementById("fileName").value = fileName;
//处理等待
submitByButton("ImportExcel");
}
//导出
function Export() {
document.getElementById("selectKey").value = getSelectKey();
submitByButton("ExportExcel");
}
//下载模板
function getTemplate() {
submitByButton("GetTemplate");
}
//查询
function Search() {
var endtime = document.getElementById("PLANTIMEEND").value;
if (parseDate($("#PLANTIMESTART").val()) > parseDate($("#PLANTIMEEND").val()) && endtime != "") {
alert("开始时间不能大于结束时间!");
return;
}
List(1)
}
//发布
function Publish() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要发布选中的记录吗?", function () {
submitByButton("PutOut");
})
}
}
//修改计划顺序
function EditDoorPlankPlanSeq() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
return;
}
document.getElementById("selectKey").value = ids;
var type = document.getElementById("ORDER_TYPE").value;
openAppWindow1('修改门板计划顺序号', 'DoorPlankEditSeq?PIDList=' + ids+ "&ORDER_TYPE=" + type, '690', '400');
}
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("TJPaoMoPlan", "List", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("TJPaoMoPlan", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("AddWholeDoor", "AddWholeDoor", QMFrameWork.WebUI.IconCls.add, "AddWholeDoor()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
<%=Html.QTButtonUpdate("TJPaoMoPlan", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("EditSeq", "EditDoorPlankPlanSeq", QMFrameWork.WebUI.IconCls.edit, "EditDoorPlankPlanSeq()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("insertorder","Insert",QMFrameWork.WebUI.IconCls.add,"Insert()", QMAPP.Common.Web.SystemLimit.isLimt)%> --%>
<%=Html.QTButtonDelete("TJPaoMoPlan", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("publish", "PutOut", "detail", "Publish()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
<%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>

106
APPQ5/QMAPP.FJC.Web/Views/TJZhuSuPlan/TJZhuSuPlanEdit.aspx

@ -0,0 +1,106 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.TianJin.TJZhuSuPlanModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
门板订单计划信息编辑
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<%
var editable = false;
if (string.IsNullOrEmpty(Model.PLAN_STATE) || string.Equals(Model.PLAN_STATE, "0"))
{
editable = true;
}
%>
<table id="editTable" cellpadding="0" cellspacing="0">
<tr>
<td>
<table>
<tr>
<th align="right">
<%=Html.QV(p => p.PLAN_DATE)%>
</th>
<td>
<input id="PLAN_DATE" name="PLAN_DATE" value="<%=string.IsNullOrEmpty(Model.PID)?DateTime.Now.ToString("yyyy-MM-dd"):Model.PLAN_DATE.ToString("yyyy-MM-dd HH:mm:ss") %>"
style=" width:200px" type="text" class="easyui-datebox" required="required" <%=editable?"":"readonly =\"readonly\"" %> />
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.MATERIAL_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MATERIAL_CODE, editable ? null : new { Readonly = "readonly" })%>
<script type="text/javascript" language="javascript">
</script>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.QTY)%>
</th>
<td>
<%=Html.QC(p => p.QTY)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.COMPLETE_QTY)%>
</th>
<td>
<%=Html.QC(p => p.COMPLETE_QTY)%>
</td>
</tr>
<tr>
<th align="right">
<%=Html.QV(p => p.REMARK)%>
</th>
<td>
<%=Html.QC(p => p.REMARK)%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%=Html.HiddenFor(p=>p.PID) %>
<%=Html.HiddenFor(p=>p.CREATEDATE) %>
<%=Html.HiddenFor(p=>p.CREATEUSER) %>
<%=Html.HiddenFor(p => p.PLAN_STATE)%>
<%=Html.HiddenFor(p => p.PLAN_NO)%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<%=Html.QTButtonSave("User", "Save", "return Save();")%>
<%=Html.QTButtonBack("close", "DashBoardPlanList", "parent.closeAppWindow1();return false;")%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
//获取物料下拉数据源
$('#MATERIAL_CODE').combotree({
url: "/Dict/GetFisMaterialTree?ordertype=",
panelHeight: '230',
panelWidth: '470',
});
});
function Save() {
var reg = /^[0-9]+$/;
var netId = $("#QTY").val();
if (!reg.test(netId)) {
MSI("提示", "计划数量只能输入数字。");
return;
}
submitByButton("Save");
}
</script>
</asp:Content>

198
APPQ5/QMAPP.FJC.Web/Views/TJZhuSuPlan/TJZhuSuPlanList.aspx

@ -0,0 +1,198 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master"
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.TianJin.TJZhuSuPlanModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
订单生产计划列表
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPSeach(80, true)%>
<table id="condiTable">
<tr>
<th align="right">
<%=Html.QV(p => p.PLAN_NO)%>
</th>
<td>
<%=Html.QC(p => p.PLAN_NO)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLAN_STATE)%>
</th>
<td>
<%=Html.QC(p => p.PLAN_STATE)%>
</td>
<th align="right">
<%=Html.QV(p => p.MATERIAL_CODE)%>
</th>
<td>
<%=Html.QC(p => p.MATERIAL_CODE)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLANTIMESTART)%>
</th>
<td>
<%=Html.QC(p => p.PLANTIMESTART)%>
</td>
<th align="right">
<%=Html.QV(p => p.PLANTIMEEND)%>
</th>
<td>
<%=Html.QC(p => p.PLANTIMEEND)%>
</td>
</tr>
</table>
<%=Html.QPEnd()%>
<%=Html.QPList() %>
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.TianJin.TJZhuSuPlanModel>(Model)%>
<%=Html.QPEnd() %>
<%=Html.Hidden("selectKey")%>
<%=Html.Hidden("fileName")%>
<%=Html.Hidden("ORDER_TYPE")%>
<script language="javascript" type="text/javascript">
$(function () {
var type = document.getElementById("ORDER_TYPE").value;
//获取物料下拉数据源
$('#MATERIAL_CODE').combotree({
url: "/Dict/GetFisMaterialTree?ordertype=" + type,
panelHeight: '250',
panelWidth: '500',
});
List(1);
});
//添加
function Add() {
openAppWindow1('信息添加', 'Edit', '500', '400');
}
//整车添加
function AddWholeDoor() {
var type = document.getElementById("ORDER_TYPE").value;
openAppWindow1('整车添加门板', 'AddWholeDoor?ORDER_TYPE=' + type, '650', '380');
}
//修改
function Update() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择修改记录。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "每次只能修改一条记录。");
return;
}
openAppWindow1('修改', 'Edit?PID=' + ids, '500', '400');
}
//插单
function Insert() {
var ids = getSelectKey();
if (ids == "") {
MSI("提示", "请选择一条FIS计划作为插单位置。");
return;
}
if (ids.indexOf(":") > 0) {
MSI("提示", "只能选择一条FIS计划作为插单位置。");
return;
}
document.getElementById("selectKey").value = ids;
var type = document.getElementById("ORDER_TYPE").value;
openAppWindow1('插单', 'Insert?PID=' + ids + "&ORDER_TYPE=" + type, '650', '380');
}
//删除
function Delete() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要删除选中的记录吗?", function () {
submitByButton("Delete");
})
}
}
//导入
function Import() {
var fileName = window.showModalDialog("/File/UploadFile", "", "dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: Yes;status: Yes;");
if (fileName == null)
return;
document.getElementById("fileName").value = fileName;
//处理等待
submitByButton("ImportExcel");
}
//导出
function Export() {
document.getElementById("selectKey").value = getSelectKey();
submitByButton("ExportExcel");
}
//下载模板
function getTemplate() {
submitByButton("GetTemplate");
}
//查询
function Search() {
var endtime = document.getElementById("PLANTIMEEND").value;
if (parseDate($("#PLANTIMESTART").val()) > parseDate($("#PLANTIMEEND").val()) && endtime != "") {
alert("开始时间不能大于结束时间!");
return;
}
List(1)
}
//发布
function Publish() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
}
else {
document.getElementById("selectKey").value = ids;
MSQ("提示", "确定要发布选中的记录吗?", function () {
submitByButton("PutOut");
})
}
}
//修改计划顺序
function EditDoorPlankPlanSeq() {
var ids = getSelectKey();
if (ids == "") {
MSI("错误", "至少选择一条记录");
return;
}
document.getElementById("selectKey").value = ids;
var type = document.getElementById("ORDER_TYPE").value;
openAppWindow1('修改门板计划顺序号', 'DoorPlankEditSeq?PIDList=' + ids+ "&ORDER_TYPE=" + type, '690', '400');
}
$(function () {
$('#FACTORY_CODE').combobox({
panelWidth: '350'
});
});
</script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<%=Html.QTButtonSearch("TJZhuSuPlan", "List", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButtonAdd("TJZhuSuPlan", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("AddWholeDoor", "AddWholeDoor", QMFrameWork.WebUI.IconCls.add, "AddWholeDoor()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
<%=Html.QTButtonUpdate("TJZhuSuPlan", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("EditSeq", "EditDoorPlankPlanSeq", QMFrameWork.WebUI.IconCls.edit, "EditDoorPlankPlanSeq()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("insertorder","Insert",QMFrameWork.WebUI.IconCls.add,"Insert()", QMAPP.Common.Web.SystemLimit.isLimt)%> --%>
<%=Html.QTButtonDelete("TJZhuSuPlan", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("publish", "PutOut", "detail", "Publish()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%>
<%-- <%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%>
<%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%>
</td>
</tr>
</table>
</asp:Content>

5
APPQ5/QMAPP.FJC.Web/Web.config

@ -43,11 +43,12 @@
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<!--
<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" /> <add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
@ -72,7 +73,7 @@
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>--> <add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.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"/>
</connectionStrings> </connectionStrings>

10
APPQ5/QMAPP.WinForm/App.config

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

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

@ -18,6 +18,7 @@ using QMAPP.FJC.Entity.Basic;
using QMAPP.FJC.Entity.TianJin; using QMAPP.FJC.Entity.TianJin;
using QMAPP.ServicesAgent; using QMAPP.ServicesAgent;
using QMAPP.MD.Entity.TianJin; using QMAPP.MD.Entity.TianJin;
using QMAPP.FJC.Entity.CompleteStatistics;
namespace QMAPP.WinForm.Forms.TianJin namespace QMAPP.WinForm.Forms.TianJin
{ {
@ -2148,17 +2149,27 @@ namespace QMAPP.WinForm.Forms.TianJin
dt.Columns.Add("MbConfig"); dt.Columns.Add("MbConfig");
dt.Columns.Add("MbOrientation"); dt.Columns.Add("MbOrientation");
dt.Columns.Add("CreateTime"); dt.Columns.Add("CreateTime");
dt.Columns.Add("PLAN_NO");
int index = 1; int index = 1;
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
//DataTable tbl = agent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_GetPastecardDeatis.ToString()); //DataTable tbl = agent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.FrmPlaceManage.FrmPlaceBLL_GetPastecardDeatis.ToString());
DataTable tbl = agent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_GetPascardDetailsByPid.ToString(), nfpastecard.PASTE_CARD_KEY); DataTable tbl = agent.InvokeServiceFunction<DataTable>(QMAPP.ServicesAgent.FrmPlaceManage.TJFrmPlaceBLL_GetPascardDetailsByPid.ToString(), nfpastecard.PASTE_CARD_KEY);
//index = Convert.ToInt32(tbl.Rows[0][0].ToString()); //index = Convert.ToInt32(tbl.Rows[0][0].ToString());
//var TYPE1 = dgvMATChange.Rows[0].Cells[PLAN_NO.Name].Value.ToString();
//var TYPE2 = dgvMATChange.Rows[12].Cells[PLAN_NO.Name].Value.ToString();
//int defaultNum = Convert.ToInt32(QMAPP.WinForm.Common.LocalSetting.Settings["ShowDataCount"]);
//var materialcode1 = dgvNF.Rows[0].Cells[PRODNO_NF.Name].Value.ToString();
//var materialcode2 = dgvNF.Rows[12].Cells[PRODNO_NF.Name].Value.ToString();
//var count = defaultNum / 2;
for (var i = 0; i < tbl.Rows.Count; i++) for (var i = 0; i < tbl.Rows.Count; i++)
{ {
DataRow ncsdr = dt.NewRow(); DataRow ncsdr = dt.NewRow();
ncsdr["ROWINDEX"] = index.ToString(); ; ncsdr["ROWINDEX"] = index.ToString();
ncsdr["VWSEQ"] = tbl.Rows[i]["VWSEQ"].ToString(); ncsdr["VWSEQ"] = tbl.Rows[i]["VWSEQ"].ToString();
ncsdr["VIN"] = tbl.Rows[i]["VIN"].ToString(); ncsdr["VIN"] = tbl.Rows[i]["VIN"].ToString();
ncsdr["PRODNO"] = tbl.Rows[i]["PRODNO"].ToString(); ncsdr["PRODNO"] = tbl.Rows[i]["PRODNO"].ToString();
@ -2202,21 +2213,27 @@ namespace QMAPP.WinForm.Forms.TianJin
lberror.Text = "贴车单已打印;"; lberror.Text = "贴车单已打印;";
} }
#region 针对贴车单上的条码进行出库操作 #region 针对贴车单上的条码进行出库操作
var nor = string.Empty; var nor = string.Empty;
for (var i = 0; i < tbl.Rows.Count; i++) for (var i = 0; i < tbl.Rows.Count; i++)
{ {
#region 发运数据回冲
SaveCOMPLETE(tbl.Rows[i]["PRODNO"].ToString(), tbl.Rows[i]["VIN"].ToString());
#endregion
if (string.IsNullOrEmpty(nor)) if (string.IsNullOrEmpty(nor))
nor += tbl.Rows[i]["VIN"].ToString() + ","; nor += tbl.Rows[i]["VIN"].ToString() + ",";
else else
{ {
if (!nor.Contains(tbl.Rows[i]["VIN"].ToString())) if (!nor.Contains(tbl.Rows[i]["VIN"].ToString()))
{ {
var count = agent.InvokeServiceFunction<DataResult<int>>("StorageBLL_SelectCount", tbl.Rows[i]["VIN"].ToString()); var DataResult = agent.InvokeServiceFunction<DataResult<int>>("StorageBLL_SelectCount", tbl.Rows[i]["VIN"].ToString());
//如果条码未入库,先进行入库操作 //如果条码未入库,先进行入库操作
if (count.Result <= 0) if (DataResult.Result <= 0)
{ {
Storage pi = new Storage(); Storage pi = new Storage();
pi.ProductCode = tbl.Rows[i]["VIN"].ToString(); pi.ProductCode = tbl.Rows[i]["VIN"].ToString();
@ -2535,7 +2552,31 @@ namespace QMAPP.WinForm.Forms.TianJin
window.Owner = this; window.Owner = this;
window.Show(); window.Show();
} }
#endregion #endregion
#region 回冲
/// <summary>
/// 处理回冲数据
/// </summary>
public void SaveCOMPLETE(string MaterialCode,string ORDERNO)
{
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
CompleteStatisticsEntity model = new CompleteStatisticsEntity();
model.MATERIALNO = MaterialCode;
model.SYSCOMPLETECOUNT = 1;
model.COMPLETECOUNT = 1;
model.STARTTIME = DateTime.Now;
model.ENDTIME = DateTime.Now;
model.ORDERNO = ORDERNO;
var ss = agent.InvokeServiceFunction<DataResult<int>>("CompleteStatisticsBLL_Insert", model);
}
#endregion
/// <summary> /// <summary>
/// ///

452
APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.designer.cs

@ -29,8 +29,8 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.FlowLayoutPanel(); this.panel1 = new System.Windows.Forms.FlowLayoutPanel();
@ -45,15 +45,6 @@
this.ra_hx = new System.Windows.Forms.RadioButton(); this.ra_hx = new System.Windows.Forms.RadioButton();
this.ra_dx = new System.Windows.Forms.RadioButton(); this.ra_dx = new System.Windows.Forms.RadioButton();
this.dgvMATChange = new System.Windows.Forms.DataGridView(); this.dgvMATChange = new System.Windows.Forms.DataGridView();
this.PLAN_DATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.REQUESTID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MATERIAL_CODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MATERIAL_NAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LINENO = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MOULD_CODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clscanstate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.STATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel6 = new System.Windows.Forms.Panel(); this.panel6 = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.panel4 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel();
@ -90,6 +81,16 @@
this.timeRefew = new System.Windows.Forms.Timer(this.components); this.timeRefew = new System.Windows.Forms.Timer(this.components);
this.panel7 = new System.Windows.Forms.Panel(); this.panel7 = new System.Windows.Forms.Panel();
this.panel8 = new System.Windows.Forms.Panel(); this.panel8 = new System.Windows.Forms.Panel();
this.PLAN_DATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.REQUESTID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MATERIAL_CODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MATERIAL_NAME = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.LINENO = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MOULD_CODE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clscanstate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.STATE = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PLAN_NO = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
@ -114,8 +115,10 @@
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Font = new System.Drawing.Font("宋体", 9F); this.groupBox2.Font = new System.Drawing.Font("宋体", 9F);
this.groupBox2.Location = new System.Drawing.Point(0, 0); this.groupBox2.Location = new System.Drawing.Point(0, 0);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(770, 692); this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox2.Size = new System.Drawing.Size(1155, 1038);
this.groupBox2.TabIndex = 10; this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "FIS数据"; this.groupBox2.Text = "FIS数据";
@ -123,7 +126,8 @@
// splitContainer1 // splitContainer1
// //
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(3, 17); this.splitContainer1.Location = new System.Drawing.Point(4, 25);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
@ -134,8 +138,9 @@
// splitContainer1.Panel2 // splitContainer1.Panel2
// //
this.splitContainer1.Panel2.Controls.Add(this.dgvMATChange); this.splitContainer1.Panel2.Controls.Add(this.dgvMATChange);
this.splitContainer1.Size = new System.Drawing.Size(764, 672); this.splitContainer1.Size = new System.Drawing.Size(1147, 1009);
this.splitContainer1.SplitterDistance = 70; this.splitContainer1.SplitterDistance = 105;
this.splitContainer1.SplitterWidth = 6;
this.splitContainer1.TabIndex = 8; this.splitContainer1.TabIndex = 8;
// //
// panel1 // panel1
@ -152,16 +157,18 @@
this.panel1.Controls.Add(this.ra_dx); this.panel1.Controls.Add(this.ra_dx);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(764, 70); this.panel1.Size = new System.Drawing.Size(1147, 105);
this.panel1.TabIndex = 7; this.panel1.TabIndex = 7;
// //
// btnLineSetting // btnLineSetting
// //
this.btnLineSetting.AutoSize = true; this.btnLineSetting.AutoSize = true;
this.btnLineSetting.Location = new System.Drawing.Point(3, 3); this.btnLineSetting.Location = new System.Drawing.Point(4, 4);
this.btnLineSetting.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnLineSetting.Name = "btnLineSetting"; this.btnLineSetting.Name = "btnLineSetting";
this.btnLineSetting.Size = new System.Drawing.Size(91, 23); this.btnLineSetting.Size = new System.Drawing.Size(136, 42);
this.btnLineSetting.TabIndex = 11; this.btnLineSetting.TabIndex = 11;
this.btnLineSetting.Text = "发运设置"; this.btnLineSetting.Text = "发运设置";
this.btnLineSetting.UseVisualStyleBackColor = true; this.btnLineSetting.UseVisualStyleBackColor = true;
@ -170,9 +177,10 @@
// btnSetDatagroupType // btnSetDatagroupType
// //
this.btnSetDatagroupType.AutoSize = true; this.btnSetDatagroupType.AutoSize = true;
this.btnSetDatagroupType.Location = new System.Drawing.Point(100, 3); this.btnSetDatagroupType.Location = new System.Drawing.Point(148, 4);
this.btnSetDatagroupType.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnSetDatagroupType.Name = "btnSetDatagroupType"; this.btnSetDatagroupType.Name = "btnSetDatagroupType";
this.btnSetDatagroupType.Size = new System.Drawing.Size(107, 23); this.btnSetDatagroupType.Size = new System.Drawing.Size(189, 42);
this.btnSetDatagroupType.TabIndex = 13; this.btnSetDatagroupType.TabIndex = 13;
this.btnSetDatagroupType.Text = "设置器具容量"; this.btnSetDatagroupType.Text = "设置器具容量";
this.btnSetDatagroupType.UseVisualStyleBackColor = true; this.btnSetDatagroupType.UseVisualStyleBackColor = true;
@ -181,9 +189,10 @@
// btnSearch // btnSearch
// //
this.btnSearch.AutoSize = true; this.btnSearch.AutoSize = true;
this.btnSearch.Location = new System.Drawing.Point(213, 3); this.btnSearch.Location = new System.Drawing.Point(345, 4);
this.btnSearch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnSearch.Name = "btnSearch"; this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(75, 23); this.btnSearch.Size = new System.Drawing.Size(162, 42);
this.btnSearch.TabIndex = 8; this.btnSearch.TabIndex = 8;
this.btnSearch.Text = "贴车单查询"; this.btnSearch.Text = "贴车单查询";
this.btnSearch.UseVisualStyleBackColor = true; this.btnSearch.UseVisualStyleBackColor = true;
@ -192,9 +201,10 @@
// btnJZ // btnJZ
// //
this.btnJZ.AutoSize = true; this.btnJZ.AutoSize = true;
this.btnJZ.Location = new System.Drawing.Point(294, 3); this.btnJZ.Location = new System.Drawing.Point(515, 4);
this.btnJZ.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnJZ.Name = "btnJZ"; this.btnJZ.Name = "btnJZ";
this.btnJZ.Size = new System.Drawing.Size(96, 23); this.btnJZ.Size = new System.Drawing.Size(144, 42);
this.btnJZ.TabIndex = 9; this.btnJZ.TabIndex = 9;
this.btnJZ.Text = "计划挂起"; this.btnJZ.Text = "计划挂起";
this.btnJZ.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.btnJZ.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@ -204,9 +214,10 @@
// btnRef // btnRef
// //
this.btnRef.AutoSize = true; this.btnRef.AutoSize = true;
this.btnRef.Location = new System.Drawing.Point(396, 3); this.btnRef.Location = new System.Drawing.Point(667, 4);
this.btnRef.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnRef.Name = "btnRef"; this.btnRef.Name = "btnRef";
this.btnRef.Size = new System.Drawing.Size(105, 23); this.btnRef.Size = new System.Drawing.Size(176, 42);
this.btnRef.TabIndex = 9; this.btnRef.TabIndex = 9;
this.btnRef.Text = "刷新FIS数据"; this.btnRef.Text = "刷新FIS数据";
this.btnRef.UseVisualStyleBackColor = true; this.btnRef.UseVisualStyleBackColor = true;
@ -216,9 +227,10 @@
// //
this.rb_hx.AutoSize = true; this.rb_hx.AutoSize = true;
this.rb_hx.Checked = true; this.rb_hx.Checked = true;
this.rb_hx.Location = new System.Drawing.Point(507, 3); this.rb_hx.Location = new System.Drawing.Point(851, 4);
this.rb_hx.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rb_hx.Name = "rb_hx"; this.rb_hx.Name = "rb_hx";
this.rb_hx.Size = new System.Drawing.Size(71, 16); this.rb_hx.Size = new System.Drawing.Size(105, 22);
this.rb_hx.TabIndex = 7; this.rb_hx.TabIndex = 7;
this.rb_hx.TabStop = true; this.rb_hx.TabStop = true;
this.rb_hx.Text = "左侧门板"; this.rb_hx.Text = "左侧门板";
@ -228,9 +240,10 @@
// rb_dx // rb_dx
// //
this.rb_dx.AutoSize = true; this.rb_dx.AutoSize = true;
this.rb_dx.Location = new System.Drawing.Point(584, 3); this.rb_dx.Location = new System.Drawing.Point(964, 4);
this.rb_dx.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.rb_dx.Name = "rb_dx"; this.rb_dx.Name = "rb_dx";
this.rb_dx.Size = new System.Drawing.Size(71, 16); this.rb_dx.Size = new System.Drawing.Size(105, 22);
this.rb_dx.TabIndex = 6; this.rb_dx.TabIndex = 6;
this.rb_dx.Text = "右侧门板"; this.rb_dx.Text = "右侧门板";
this.rb_dx.UseVisualStyleBackColor = true; this.rb_dx.UseVisualStyleBackColor = true;
@ -241,19 +254,20 @@
this.lblCount.AutoSize = true; this.lblCount.AutoSize = true;
this.lblCount.Dock = System.Windows.Forms.DockStyle.Left; this.lblCount.Dock = System.Windows.Forms.DockStyle.Left;
this.lblCount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblCount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCount.Location = new System.Drawing.Point(663, 0); this.lblCount.Location = new System.Drawing.Point(1081, 0);
this.lblCount.Margin = new System.Windows.Forms.Padding(5, 0, 0, 0); this.lblCount.Margin = new System.Windows.Forms.Padding(8, 0, 0, 0);
this.lblCount.Name = "lblCount"; this.lblCount.Name = "lblCount";
this.lblCount.Size = new System.Drawing.Size(0, 29); this.lblCount.Size = new System.Drawing.Size(0, 50);
this.lblCount.TabIndex = 21; this.lblCount.TabIndex = 21;
this.lblCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblCount.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// ra_hx // ra_hx
// //
this.ra_hx.AutoSize = true; this.ra_hx.AutoSize = true;
this.ra_hx.Location = new System.Drawing.Point(666, 3); this.ra_hx.Location = new System.Drawing.Point(4, 54);
this.ra_hx.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ra_hx.Name = "ra_hx"; this.ra_hx.Name = "ra_hx";
this.ra_hx.Size = new System.Drawing.Size(77, 16); this.ra_hx.Size = new System.Drawing.Size(114, 22);
this.ra_hx.TabIndex = 22; this.ra_hx.TabIndex = 22;
this.ra_hx.Text = "018前门板"; this.ra_hx.Text = "018前门板";
this.ra_hx.UseVisualStyleBackColor = true; this.ra_hx.UseVisualStyleBackColor = true;
@ -262,9 +276,10 @@
// ra_dx // ra_dx
// //
this.ra_dx.AutoSize = true; this.ra_dx.AutoSize = true;
this.ra_dx.Location = new System.Drawing.Point(3, 32); this.ra_dx.Location = new System.Drawing.Point(126, 54);
this.ra_dx.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ra_dx.Name = "ra_dx"; this.ra_dx.Name = "ra_dx";
this.ra_dx.Size = new System.Drawing.Size(77, 16); this.ra_dx.Size = new System.Drawing.Size(114, 22);
this.ra_dx.TabIndex = 23; this.ra_dx.TabIndex = 23;
this.ra_dx.Text = "018后门板"; this.ra_dx.Text = "018后门板";
this.ra_dx.UseVisualStyleBackColor = true; this.ra_dx.UseVisualStyleBackColor = true;
@ -287,18 +302,20 @@
this.MOULD_CODE, this.MOULD_CODE,
this.PID, this.PID,
this.clscanstate, this.clscanstate,
this.STATE}); this.STATE,
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; this.PLAN_NO});
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 9F); dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F);
dataGridViewCellStyle5.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle1.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0);
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.dgvMATChange.DefaultCellStyle = dataGridViewCellStyle5; dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvMATChange.DefaultCellStyle = dataGridViewCellStyle1;
this.dgvMATChange.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvMATChange.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvMATChange.Location = new System.Drawing.Point(0, 0); this.dgvMATChange.Location = new System.Drawing.Point(0, 0);
this.dgvMATChange.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dgvMATChange.Name = "dgvMATChange"; this.dgvMATChange.Name = "dgvMATChange";
this.dgvMATChange.ReadOnly = true; this.dgvMATChange.ReadOnly = true;
this.dgvMATChange.RowHeadersWidth = 40; this.dgvMATChange.RowHeadersWidth = 40;
@ -306,102 +323,19 @@
this.dgvMATChange.RowTemplate.DefaultCellStyle.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); this.dgvMATChange.RowTemplate.DefaultCellStyle.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0);
this.dgvMATChange.RowTemplate.Height = 23; this.dgvMATChange.RowTemplate.Height = 23;
this.dgvMATChange.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvMATChange.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvMATChange.Size = new System.Drawing.Size(764, 598); this.dgvMATChange.Size = new System.Drawing.Size(1147, 898);
this.dgvMATChange.TabIndex = 5; this.dgvMATChange.TabIndex = 5;
this.dgvMATChange.TabStop = false; this.dgvMATChange.TabStop = false;
this.dgvMATChange.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvMATChange_RowPostPaint); this.dgvMATChange.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvMATChange_RowPostPaint);
// //
// PLAN_DATE
//
this.PLAN_DATE.DataPropertyName = "PLAN_DATE";
this.PLAN_DATE.HeaderText = "计划时间";
this.PLAN_DATE.Name = "PLAN_DATE";
this.PLAN_DATE.ReadOnly = true;
this.PLAN_DATE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PLAN_DATE.Width = 74;
//
// REQUESTID
//
this.REQUESTID.DataPropertyName = "SEQ";
this.REQUESTID.HeaderText = "顺序号";
this.REQUESTID.Name = "REQUESTID";
this.REQUESTID.ReadOnly = true;
this.REQUESTID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.REQUESTID.Width = 62;
//
// MATERIAL_CODE
//
this.MATERIAL_CODE.DataPropertyName = "MATERIAL_CODE";
this.MATERIAL_CODE.HeaderText = "零件号";
this.MATERIAL_CODE.Name = "MATERIAL_CODE";
this.MATERIAL_CODE.ReadOnly = true;
this.MATERIAL_CODE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MATERIAL_CODE.Width = 62;
//
// MATERIAL_NAME
//
this.MATERIAL_NAME.DataPropertyName = "MATERIAL_NAME";
this.MATERIAL_NAME.HeaderText = "总成描述";
this.MATERIAL_NAME.Name = "MATERIAL_NAME";
this.MATERIAL_NAME.ReadOnly = true;
this.MATERIAL_NAME.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MATERIAL_NAME.Width = 74;
//
// LINENO
//
this.LINENO.DataPropertyName = "LINENO";
this.LINENO.HeaderText = "车型";
this.LINENO.Name = "LINENO";
this.LINENO.ReadOnly = true;
this.LINENO.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.LINENO.Width = 50;
//
// MOULD_CODE
//
this.MOULD_CODE.DataPropertyName = "MOULD_CODE";
this.MOULD_CODE.HeaderText = "位置";
this.MOULD_CODE.Name = "MOULD_CODE";
this.MOULD_CODE.ReadOnly = true;
this.MOULD_CODE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MOULD_CODE.Width = 50;
//
// PID
//
this.PID.DataPropertyName = "PID";
this.PID.HeaderText = "PID";
this.PID.Name = "PID";
this.PID.ReadOnly = true;
this.PID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PID.Visible = false;
this.PID.Width = 44;
//
// clscanstate
//
this.clscanstate.DataPropertyName = "SCANSTATE";
this.clscanstate.HeaderText = "扫描状态";
this.clscanstate.Name = "clscanstate";
this.clscanstate.ReadOnly = true;
this.clscanstate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.clscanstate.Visible = false;
this.clscanstate.Width = 74;
//
// STATE
//
this.STATE.DataPropertyName = "STATE";
this.STATE.HeaderText = "STATE";
this.STATE.Name = "STATE";
this.STATE.ReadOnly = true;
this.STATE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.STATE.Visible = false;
this.STATE.Width = 56;
//
// panel6 // panel6
// //
this.panel6.Controls.Add(this.groupBox1); this.panel6.Controls.Add(this.groupBox1);
this.panel6.Dock = System.Windows.Forms.DockStyle.Right; this.panel6.Dock = System.Windows.Forms.DockStyle.Right;
this.panel6.Location = new System.Drawing.Point(773, 0); this.panel6.Location = new System.Drawing.Point(1159, 0);
this.panel6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel6.Name = "panel6"; this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(466, 692); this.panel6.Size = new System.Drawing.Size(699, 1038);
this.panel6.TabIndex = 18; this.panel6.TabIndex = 18;
// //
// groupBox1 // groupBox1
@ -410,8 +344,10 @@
this.groupBox1.Controls.Add(this.panel3); this.groupBox1.Controls.Add(this.panel3);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(466, 692); this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.groupBox1.Size = new System.Drawing.Size(699, 1038);
this.groupBox1.TabIndex = 9; this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "已扫描数据"; this.groupBox1.Text = "已扫描数据";
@ -421,9 +357,10 @@
this.panel4.Controls.Add(this.dgvNF); this.panel4.Controls.Add(this.dgvNF);
this.panel4.Controls.Add(this.tpContainer); this.panel4.Controls.Add(this.tpContainer);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 87); this.panel4.Location = new System.Drawing.Point(4, 130);
this.panel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel4.Name = "panel4"; this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(460, 602); this.panel4.Size = new System.Drawing.Size(691, 904);
this.panel4.TabIndex = 15; this.panel4.TabIndex = 15;
// //
// dgvNF // dgvNF
@ -449,24 +386,25 @@
this.Column11, this.Column11,
this.Column13, this.Column13,
this.dgcPRODUCT_PID}); this.dgcPRODUCT_PID});
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle6.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); dataGridViewCellStyle2.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0);
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvNF.DefaultCellStyle = dataGridViewCellStyle6; this.dgvNF.DefaultCellStyle = dataGridViewCellStyle2;
this.dgvNF.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvNF.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvNF.Location = new System.Drawing.Point(0, 0); this.dgvNF.Location = new System.Drawing.Point(0, 0);
this.dgvNF.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dgvNF.Name = "dgvNF"; this.dgvNF.Name = "dgvNF";
this.dgvNF.ReadOnly = true; this.dgvNF.ReadOnly = true;
this.dgvNF.RowHeadersWidth = 50; this.dgvNF.RowHeadersWidth = 50;
this.dgvNF.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; this.dgvNF.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
this.dgvNF.RowTemplate.Height = 27; this.dgvNF.RowTemplate.Height = 27;
this.dgvNF.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvNF.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvNF.Size = new System.Drawing.Size(460, 364); this.dgvNF.Size = new System.Drawing.Size(691, 547);
this.dgvNF.TabIndex = 0; this.dgvNF.TabIndex = 0;
// //
// CODE_NF // CODE_NF
@ -476,7 +414,7 @@
this.CODE_NF.Name = "CODE_NF"; this.CODE_NF.Name = "CODE_NF";
this.CODE_NF.ReadOnly = true; this.CODE_NF.ReadOnly = true;
this.CODE_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.CODE_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.CODE_NF.Width = 57; this.CODE_NF.Width = 78;
// //
// PRODNO_NF // PRODNO_NF
// //
@ -485,7 +423,7 @@
this.PRODNO_NF.Name = "PRODNO_NF"; this.PRODNO_NF.Name = "PRODNO_NF";
this.PRODNO_NF.ReadOnly = true; this.PRODNO_NF.ReadOnly = true;
this.PRODNO_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.PRODNO_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PRODNO_NF.Width = 57; this.PRODNO_NF.Width = 78;
// //
// CARSETDESC_CN_NF // CARSETDESC_CN_NF
// //
@ -494,7 +432,7 @@
this.CARSETDESC_CN_NF.Name = "CARSETDESC_CN_NF"; this.CARSETDESC_CN_NF.Name = "CARSETDESC_CN_NF";
this.CARSETDESC_CN_NF.ReadOnly = true; this.CARSETDESC_CN_NF.ReadOnly = true;
this.CARSETDESC_CN_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.CARSETDESC_CN_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.CARSETDESC_CN_NF.Width = 69; this.CARSETDESC_CN_NF.Width = 96;
// //
// MOULDCODE // MOULDCODE
// //
@ -503,7 +441,7 @@
this.MOULDCODE.Name = "MOULDCODE"; this.MOULDCODE.Name = "MOULDCODE";
this.MOULDCODE.ReadOnly = true; this.MOULDCODE.ReadOnly = true;
this.MOULDCODE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.MOULDCODE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MOULDCODE.Width = 45; this.MOULDCODE.Width = 60;
// //
// CREATEDATE_NF // CREATEDATE_NF
// //
@ -512,7 +450,7 @@
this.CREATEDATE_NF.Name = "CREATEDATE_NF"; this.CREATEDATE_NF.Name = "CREATEDATE_NF";
this.CREATEDATE_NF.ReadOnly = true; this.CREATEDATE_NF.ReadOnly = true;
this.CREATEDATE_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.CREATEDATE_NF.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.CREATEDATE_NF.Width = 69; this.CREATEDATE_NF.Width = 96;
// //
// Column1 // Column1
// //
@ -593,14 +531,15 @@
this.tpContainer.ColumnCount = 1; this.tpContainer.ColumnCount = 1;
this.tpContainer.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tpContainer.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tpContainer.Dock = System.Windows.Forms.DockStyle.Bottom; this.tpContainer.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tpContainer.Location = new System.Drawing.Point(0, 364); this.tpContainer.Location = new System.Drawing.Point(0, 547);
this.tpContainer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tpContainer.Name = "tpContainer"; this.tpContainer.Name = "tpContainer";
this.tpContainer.RowCount = 1; this.tpContainer.RowCount = 1;
this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 235F)); this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 352F));
this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 235F)); this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 352F));
this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 235F)); this.tpContainer.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 352F));
this.tpContainer.Size = new System.Drawing.Size(460, 238); this.tpContainer.Size = new System.Drawing.Size(691, 357);
this.tpContainer.TabIndex = 0; this.tpContainer.TabIndex = 0;
// //
// panel3 // panel3
@ -614,16 +553,18 @@
this.panel3.Controls.Add(this.lblLastPastNO); this.panel3.Controls.Add(this.lblLastPastNO);
this.panel3.Controls.Add(this.pbPastNoConfirmed); this.panel3.Controls.Add(this.pbPastNoConfirmed);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top; this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(3, 17); this.panel3.Location = new System.Drawing.Point(4, 25);
this.panel3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(460, 70); this.panel3.Size = new System.Drawing.Size(691, 105);
this.panel3.TabIndex = 14; this.panel3.TabIndex = 14;
// //
// btnPrint_NF // btnPrint_NF
// //
this.btnPrint_NF.Location = new System.Drawing.Point(3, 3); this.btnPrint_NF.Location = new System.Drawing.Point(4, 4);
this.btnPrint_NF.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnPrint_NF.Name = "btnPrint_NF"; this.btnPrint_NF.Name = "btnPrint_NF";
this.btnPrint_NF.Size = new System.Drawing.Size(75, 26); this.btnPrint_NF.Size = new System.Drawing.Size(112, 39);
this.btnPrint_NF.TabIndex = 11; this.btnPrint_NF.TabIndex = 11;
this.btnPrint_NF.Text = "贴车单打印"; this.btnPrint_NF.Text = "贴车单打印";
this.btnPrint_NF.UseVisualStyleBackColor = true; this.btnPrint_NF.UseVisualStyleBackColor = true;
@ -632,9 +573,10 @@
// //
// btnResetIndex // btnResetIndex
// //
this.btnResetIndex.Location = new System.Drawing.Point(84, 3); this.btnResetIndex.Location = new System.Drawing.Point(124, 4);
this.btnResetIndex.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnResetIndex.Name = "btnResetIndex"; this.btnResetIndex.Name = "btnResetIndex";
this.btnResetIndex.Size = new System.Drawing.Size(102, 26); this.btnResetIndex.Size = new System.Drawing.Size(153, 39);
this.btnResetIndex.TabIndex = 15; this.btnResetIndex.TabIndex = 15;
this.btnResetIndex.Text = "贴车单顺序校正"; this.btnResetIndex.Text = "贴车单顺序校正";
this.btnResetIndex.UseVisualStyleBackColor = true; this.btnResetIndex.UseVisualStyleBackColor = true;
@ -642,9 +584,10 @@
// //
// btnResetCart // btnResetCart
// //
this.btnResetCart.Location = new System.Drawing.Point(192, 3); this.btnResetCart.Location = new System.Drawing.Point(285, 4);
this.btnResetCart.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnResetCart.Name = "btnResetCart"; this.btnResetCart.Name = "btnResetCart";
this.btnResetCart.Size = new System.Drawing.Size(95, 26); this.btnResetCart.Size = new System.Drawing.Size(142, 39);
this.btnResetCart.TabIndex = 18; this.btnResetCart.TabIndex = 18;
this.btnResetCart.Text = "重扫当前器具"; this.btnResetCart.Text = "重扫当前器具";
this.btnResetCart.UseVisualStyleBackColor = true; this.btnResetCart.UseVisualStyleBackColor = true;
@ -652,9 +595,10 @@
// //
// btnCloseCart // btnCloseCart
// //
this.btnCloseCart.Location = new System.Drawing.Point(293, 3); this.btnCloseCart.Location = new System.Drawing.Point(435, 4);
this.btnCloseCart.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnCloseCart.Name = "btnCloseCart"; this.btnCloseCart.Name = "btnCloseCart";
this.btnCloseCart.Size = new System.Drawing.Size(95, 26); this.btnCloseCart.Size = new System.Drawing.Size(142, 39);
this.btnCloseCart.TabIndex = 19; this.btnCloseCart.TabIndex = 19;
this.btnCloseCart.Text = "强制提交"; this.btnCloseCart.Text = "强制提交";
this.btnCloseCart.UseVisualStyleBackColor = true; this.btnCloseCart.UseVisualStyleBackColor = true;
@ -662,9 +606,10 @@
// //
// btnFirstPlace // btnFirstPlace
// //
this.btnFirstPlace.Location = new System.Drawing.Point(3, 35); this.btnFirstPlace.Location = new System.Drawing.Point(4, 51);
this.btnFirstPlace.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnFirstPlace.Name = "btnFirstPlace"; this.btnFirstPlace.Name = "btnFirstPlace";
this.btnFirstPlace.Size = new System.Drawing.Size(75, 26); this.btnFirstPlace.Size = new System.Drawing.Size(112, 39);
this.btnFirstPlace.TabIndex = 17; this.btnFirstPlace.TabIndex = 17;
this.btnFirstPlace.Text = "1号位打印"; this.btnFirstPlace.Text = "1号位打印";
this.btnFirstPlace.UseVisualStyleBackColor = true; this.btnFirstPlace.UseVisualStyleBackColor = true;
@ -675,10 +620,10 @@
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Right; this.label1.Dock = System.Windows.Forms.DockStyle.Right;
this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(85, 32); this.label1.Location = new System.Drawing.Point(126, 47);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 3, 0); this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(94, 34); this.label1.Size = new System.Drawing.Size(140, 50);
this.label1.TabIndex = 20; this.label1.TabIndex = 20;
this.label1.Text = "前车贴车单:"; this.label1.Text = "前车贴车单:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@ -688,18 +633,20 @@
this.lblLastPastNO.AutoSize = true; this.lblLastPastNO.AutoSize = true;
this.lblLastPastNO.Dock = System.Windows.Forms.DockStyle.Left; this.lblLastPastNO.Dock = System.Windows.Forms.DockStyle.Left;
this.lblLastPastNO.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblLastPastNO.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLastPastNO.Location = new System.Drawing.Point(185, 32); this.lblLastPastNO.Location = new System.Drawing.Point(274, 47);
this.lblLastPastNO.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblLastPastNO.Name = "lblLastPastNO"; this.lblLastPastNO.Name = "lblLastPastNO";
this.lblLastPastNO.Size = new System.Drawing.Size(0, 34); this.lblLastPastNO.Size = new System.Drawing.Size(0, 50);
this.lblLastPastNO.TabIndex = 23; this.lblLastPastNO.TabIndex = 23;
this.lblLastPastNO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblLastPastNO.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// pbPastNoConfirmed // pbPastNoConfirmed
// //
this.pbPastNoConfirmed.Image = global::QMAPP.WinForm.Resource1.help; this.pbPastNoConfirmed.Image = global::QMAPP.WinForm.Resource1.help;
this.pbPastNoConfirmed.Location = new System.Drawing.Point(191, 35); this.pbPastNoConfirmed.Location = new System.Drawing.Point(282, 51);
this.pbPastNoConfirmed.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pbPastNoConfirmed.Name = "pbPastNoConfirmed"; this.pbPastNoConfirmed.Name = "pbPastNoConfirmed";
this.pbPastNoConfirmed.Size = new System.Drawing.Size(28, 28); this.pbPastNoConfirmed.Size = new System.Drawing.Size(42, 42);
this.pbPastNoConfirmed.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.pbPastNoConfirmed.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pbPastNoConfirmed.TabIndex = 22; this.pbPastNoConfirmed.TabIndex = 22;
this.pbPastNoConfirmed.TabStop = false; this.pbPastNoConfirmed.TabStop = false;
@ -710,9 +657,10 @@
this.lberror.BackColor = System.Drawing.Color.Red; this.lberror.BackColor = System.Drawing.Color.Red;
this.lberror.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lberror.Font = new System.Drawing.Font("微软雅黑", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lberror.ForeColor = System.Drawing.Color.White; this.lberror.ForeColor = System.Drawing.Color.White;
this.lberror.Location = new System.Drawing.Point(476, 6); this.lberror.Location = new System.Drawing.Point(714, 9);
this.lberror.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lberror.Name = "lberror"; this.lberror.Name = "lberror";
this.lberror.Size = new System.Drawing.Size(0, 36); this.lberror.Size = new System.Drawing.Size(0, 52);
this.lberror.TabIndex = 13; this.lberror.TabIndex = 13;
// //
// label2 // label2
@ -720,9 +668,10 @@
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.Red; this.label2.ForeColor = System.Drawing.Color.Red;
this.label2.Location = new System.Drawing.Point(378, 17); this.label2.Location = new System.Drawing.Point(567, 26);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(114, 20); this.label2.Size = new System.Drawing.Size(168, 30);
this.label2.TabIndex = 14; this.label2.TabIndex = 14;
this.label2.Text = "消息区域:"; this.label2.Text = "消息区域:";
// //
@ -730,9 +679,10 @@
// //
this.txtCode.Font = new System.Drawing.Font("宋体", 20F); this.txtCode.Font = new System.Drawing.Font("宋体", 20F);
this.txtCode.ImeMode = System.Windows.Forms.ImeMode.Disable; this.txtCode.ImeMode = System.Windows.Forms.ImeMode.Disable;
this.txtCode.Location = new System.Drawing.Point(108, 6); this.txtCode.Location = new System.Drawing.Point(162, 9);
this.txtCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.txtCode.Name = "txtCode"; this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(264, 38); this.txtCode.Size = new System.Drawing.Size(394, 53);
this.txtCode.TabIndex = 1; this.txtCode.TabIndex = 1;
this.txtCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCode_KeyDown); this.txtCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtCode_KeyDown);
this.txtCode.Leave += new System.EventHandler(this.txtCode_Leave); this.txtCode.Leave += new System.EventHandler(this.txtCode_Leave);
@ -741,18 +691,20 @@
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label4.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(9, 17); this.label4.Location = new System.Drawing.Point(14, 26);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(93, 20); this.label4.Size = new System.Drawing.Size(137, 30);
this.label4.TabIndex = 12; this.label4.TabIndex = 12;
this.label4.Text = "扫描条码"; this.label4.Text = "扫描条码";
// //
// splitter1 // splitter1
// //
this.splitter1.Dock = System.Windows.Forms.DockStyle.Right; this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter1.Location = new System.Drawing.Point(770, 0); this.splitter1.Location = new System.Drawing.Point(1155, 0);
this.splitter1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.splitter1.Name = "splitter1"; this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(3, 692); this.splitter1.Size = new System.Drawing.Size(4, 1038);
this.splitter1.TabIndex = 17; this.splitter1.TabIndex = 17;
this.splitter1.TabStop = false; this.splitter1.TabStop = false;
// //
@ -761,8 +713,9 @@
this.panel5.Controls.Add(this.groupBox2); this.panel5.Controls.Add(this.groupBox2);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill; this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(0, 0); this.panel5.Location = new System.Drawing.Point(0, 0);
this.panel5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel5.Name = "panel5"; this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(770, 692); this.panel5.Size = new System.Drawing.Size(1155, 1038);
this.panel5.TabIndex = 16; this.panel5.TabIndex = 16;
// //
// timeRefew // timeRefew
@ -776,9 +729,10 @@
this.panel7.Controls.Add(this.splitter1); this.panel7.Controls.Add(this.splitter1);
this.panel7.Controls.Add(this.panel6); this.panel7.Controls.Add(this.panel6);
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Location = new System.Drawing.Point(0, 50); this.panel7.Location = new System.Drawing.Point(0, 75);
this.panel7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel7.Name = "panel7"; this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(1239, 692); this.panel7.Size = new System.Drawing.Size(1858, 1038);
this.panel7.TabIndex = 9; this.panel7.TabIndex = 9;
// //
// panel8 // panel8
@ -789,17 +743,112 @@
this.panel8.Controls.Add(this.txtCode); this.panel8.Controls.Add(this.txtCode);
this.panel8.Dock = System.Windows.Forms.DockStyle.Top; this.panel8.Dock = System.Windows.Forms.DockStyle.Top;
this.panel8.Location = new System.Drawing.Point(0, 0); this.panel8.Location = new System.Drawing.Point(0, 0);
this.panel8.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.panel8.Name = "panel8"; this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(1239, 50); this.panel8.Size = new System.Drawing.Size(1858, 75);
this.panel8.TabIndex = 19; this.panel8.TabIndex = 19;
// //
// PLAN_DATE
//
this.PLAN_DATE.DataPropertyName = "PLAN_DATE";
this.PLAN_DATE.HeaderText = "计划时间";
this.PLAN_DATE.Name = "PLAN_DATE";
this.PLAN_DATE.ReadOnly = true;
this.PLAN_DATE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PLAN_DATE.Width = 101;
//
// REQUESTID
//
this.REQUESTID.DataPropertyName = "SEQ";
this.REQUESTID.HeaderText = "顺序号";
this.REQUESTID.Name = "REQUESTID";
this.REQUESTID.ReadOnly = true;
this.REQUESTID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.REQUESTID.Width = 83;
//
// MATERIAL_CODE
//
this.MATERIAL_CODE.DataPropertyName = "MATERIAL_CODE";
this.MATERIAL_CODE.HeaderText = "零件号";
this.MATERIAL_CODE.Name = "MATERIAL_CODE";
this.MATERIAL_CODE.ReadOnly = true;
this.MATERIAL_CODE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MATERIAL_CODE.Width = 83;
//
// MATERIAL_NAME
//
this.MATERIAL_NAME.DataPropertyName = "MATERIAL_NAME";
this.MATERIAL_NAME.HeaderText = "总成描述";
this.MATERIAL_NAME.Name = "MATERIAL_NAME";
this.MATERIAL_NAME.ReadOnly = true;
this.MATERIAL_NAME.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MATERIAL_NAME.Width = 101;
//
// LINENO
//
this.LINENO.DataPropertyName = "LINENO";
this.LINENO.HeaderText = "车型";
this.LINENO.Name = "LINENO";
this.LINENO.ReadOnly = true;
this.LINENO.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.LINENO.Width = 65;
//
// MOULD_CODE
//
this.MOULD_CODE.DataPropertyName = "MOULD_CODE";
this.MOULD_CODE.HeaderText = "位置";
this.MOULD_CODE.Name = "MOULD_CODE";
this.MOULD_CODE.ReadOnly = true;
this.MOULD_CODE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.MOULD_CODE.Width = 65;
//
// PID
//
this.PID.DataPropertyName = "PID";
this.PID.HeaderText = "PID";
this.PID.Name = "PID";
this.PID.ReadOnly = true;
this.PID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.PID.Visible = false;
this.PID.Width = 56;
//
// clscanstate
//
this.clscanstate.DataPropertyName = "SCANSTATE";
this.clscanstate.HeaderText = "扫描状态";
this.clscanstate.Name = "clscanstate";
this.clscanstate.ReadOnly = true;
this.clscanstate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.clscanstate.Visible = false;
this.clscanstate.Width = 101;
//
// STATE
//
this.STATE.DataPropertyName = "STATE";
this.STATE.HeaderText = "STATE";
this.STATE.Name = "STATE";
this.STATE.ReadOnly = true;
this.STATE.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.STATE.Visible = false;
this.STATE.Width = 74;
//
// PLAN_NO
//
this.PLAN_NO.DataPropertyName = "PLAN_NO";
this.PLAN_NO.HeaderText = "PLAN_NO";
this.PLAN_NO.Name = "PLAN_NO";
this.PLAN_NO.ReadOnly = true;
this.PLAN_NO.Visible = false;
this.PLAN_NO.Width = 122;
//
// TJFrmPlace // TJFrmPlace
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1239, 742); this.ClientSize = new System.Drawing.Size(1858, 1113);
this.Controls.Add(this.panel7); this.Controls.Add(this.panel7);
this.Controls.Add(this.panel8); this.Controls.Add(this.panel8);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "TJFrmPlace"; this.Name = "TJFrmPlace";
this.Text = "发运终端"; this.Text = "发运终端";
this.Activated += new System.EventHandler(this.FrmPlace_Activated); this.Activated += new System.EventHandler(this.FrmPlace_Activated);
@ -864,15 +913,6 @@
private System.Windows.Forms.Panel panel7; private System.Windows.Forms.Panel panel7;
private System.Windows.Forms.Panel panel8; private System.Windows.Forms.Panel panel8;
private System.Windows.Forms.Label lblCount; private System.Windows.Forms.Label lblCount;
private System.Windows.Forms.DataGridViewTextBoxColumn PLAN_DATE;
private System.Windows.Forms.DataGridViewTextBoxColumn REQUESTID;
private System.Windows.Forms.DataGridViewTextBoxColumn MATERIAL_CODE;
private System.Windows.Forms.DataGridViewTextBoxColumn MATERIAL_NAME;
private System.Windows.Forms.DataGridViewTextBoxColumn LINENO;
private System.Windows.Forms.DataGridViewTextBoxColumn MOULD_CODE;
private System.Windows.Forms.DataGridViewTextBoxColumn PID;
private System.Windows.Forms.DataGridViewTextBoxColumn clscanstate;
private System.Windows.Forms.DataGridViewTextBoxColumn STATE;
private System.Windows.Forms.DataGridViewTextBoxColumn CODE_NF; private System.Windows.Forms.DataGridViewTextBoxColumn CODE_NF;
private System.Windows.Forms.DataGridViewTextBoxColumn PRODNO_NF; private System.Windows.Forms.DataGridViewTextBoxColumn PRODNO_NF;
private System.Windows.Forms.DataGridViewTextBoxColumn CARSETDESC_CN_NF; private System.Windows.Forms.DataGridViewTextBoxColumn CARSETDESC_CN_NF;
@ -888,5 +928,15 @@
private System.Windows.Forms.DataGridViewTextBoxColumn dgcPRODUCT_PID; private System.Windows.Forms.DataGridViewTextBoxColumn dgcPRODUCT_PID;
private System.Windows.Forms.RadioButton ra_hx; private System.Windows.Forms.RadioButton ra_hx;
private System.Windows.Forms.RadioButton ra_dx; private System.Windows.Forms.RadioButton ra_dx;
private System.Windows.Forms.DataGridViewTextBoxColumn PLAN_DATE;
private System.Windows.Forms.DataGridViewTextBoxColumn REQUESTID;
private System.Windows.Forms.DataGridViewTextBoxColumn MATERIAL_CODE;
private System.Windows.Forms.DataGridViewTextBoxColumn MATERIAL_NAME;
private System.Windows.Forms.DataGridViewTextBoxColumn LINENO;
private System.Windows.Forms.DataGridViewTextBoxColumn MOULD_CODE;
private System.Windows.Forms.DataGridViewTextBoxColumn PID;
private System.Windows.Forms.DataGridViewTextBoxColumn clscanstate;
private System.Windows.Forms.DataGridViewTextBoxColumn STATE;
private System.Windows.Forms.DataGridViewTextBoxColumn PLAN_NO;
} }
} }

3
APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.resx

@ -144,6 +144,9 @@
<metadata name="STATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="STATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="PLAN_NO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CODE_NF.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="CODE_NF.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>

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

@ -702,6 +702,8 @@ namespace QMAPP.WinForm.Forms.TianJin
else else
count = dgvPlan.Rows.Count; count = dgvPlan.Rows.Count;
List<LabelData> labels = new List<LabelData>();
for (var i = 0; i < count; i++) for (var i = 0; i < count; i++)
{ {
System.Threading.Thread.Sleep(1000); System.Threading.Thread.Sleep(1000);
@ -723,9 +725,7 @@ namespace QMAPP.WinForm.Forms.TianJin
} }
toolStripButton1.Enabled = false; toolStripButton1.Enabled = false;
List<LabelData> labels = new List<LabelData>();
var data = DateTime.Now.ToString("yyyyMMddHHmmssfff"); var data = DateTime.Now.ToString("yyyyMMddHHmmssfff");
data = data.Substring(2, data.Length - 2); data = data.Substring(2, data.Length - 2);
@ -763,25 +763,23 @@ namespace QMAPP.WinForm.Forms.TianJin
labeldata.CarModel = material.PROJECTCODE; labeldata.CarModel = material.PROJECTCODE;
} }
labels.Add(labeldata); labels.Add(labeldata);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始打印" + labeldata.OrderNo);
PrintLabel(labels);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始变成打印状态" + labeldata.OrderNo);
//变更打印状态 0=>1 //变更打印状态 0=>1
_agent.InvokeServiceFunction<int>("WorkOrderBLL_SetOrderPrinted", orders[0].PID); _agent.InvokeServiceFunction<int>("WorkOrderBLL_SetOrderPrinted", orders[0].PID);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始插入记录" + labeldata.OrderNo);
InsertProduct(labeldata.OrderNo, orders[0].MATERIAL_CODE, comboBox1.SelectedValue.ToString()); InsertProduct(labeldata.OrderNo, orders[0].MATERIAL_CODE, comboBox1.SelectedValue.ToString());
if (orders[0].MATERIAL_NAME.Contains("前")) if (orders[0].MATERIAL_NAME.Contains("前"))
FR = "后"; FR = "后";
else if (orders[0].MATERIAL_NAME.Contains("后")) else if (orders[0].MATERIAL_NAME.Contains("后"))
FR = "前"; FR = "前";
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 插入结束" + labeldata.OrderNo);
} }
PrintLabel(labels);
BindPlanView(); BindPlanView();
labels = new List<LabelData>();
toolStripButton1.Enabled = true; toolStripButton1.Enabled = true;
} }

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

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

12
ServicesCenter/Task/QMTask.Host/App.config

@ -6,10 +6,16 @@
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<!--主数据库连接--> <!--主数据库连接-->
<add name="maindb" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/> <!--<add name="maindb" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/>
<add name="maindbYBB" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_QD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/> <add name="maindbYBB" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_QD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/> <add name="maindbNCSYBB" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_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="maindbYBB" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
</connectionStrings> </connectionStrings>
<appSettings> <appSettings>
<!--任务调度服务凭据--> <!--任务调度服务凭据-->

2
ServicesCenter/Task/QMTask.Host/PlanConfig.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Plan> <Plan>
<PlanDetail PlanID="d53029818e5e4c69abf0d39b91c6a9db" PlanName="测试计划01" TaskID="task3" Period="1" PeriodType="d" ExecuteDay="" OnceTime="" Interval="10" IntervalType="m" DayStartTime="" DayEndTime="" PlanStartDate="2014/11/21 9:51:55" PlanEndDate="0001/1/1 0:00:00" IsUse="true" Remark="eqwewqewq"> <PlanDetail PlanID="d53029818e5e4c69abf0d39b91c6a9db" PlanName="MFG自动回冲" TaskID="task12" Period="1" PeriodType="d" ExecuteDay="" OnceTime="" Interval="10" IntervalType="m" DayStartTime="" DayEndTime="" PlanStartDate="2014/11/21 9:51:55" PlanEndDate="0001/1/1 0:00:00" IsUse="true" Remark="eqwewqewq">
</PlanDetail> </PlanDetail>
</Plan> </Plan>

22
ServicesCenter/Task/QMTask.Host/QMTask.Host.csproj

@ -18,6 +18,21 @@
<SccLocalPath>Svn</SccLocalPath> <SccLocalPath>Svn</SccLocalPath>
<SccAuxPath>Svn</SccAuxPath> <SccAuxPath>Svn</SccAuxPath>
<SccProvider>SubversionScc</SccProvider> <SccProvider>SubversionScc</SccProvider>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -125,6 +140,13 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

8
ServicesCenter/Task/QMTask.Host/TaskConfig.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Task> <Task>
<!--<TaskDetail TaskID ="task1" TaskName="支持交互处理超时提醒" TaskType="QMTask.DataDeal.OverTimeRemindJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />--> <!--<TaskDetail TaskID ="task1" TaskName="支持交互处理超时提醒" TaskType="QMTask.DataDeal.OverTimeRemindJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />-->
<TaskDetail TaskID ="task1" TaskName="定时查制品库存" TaskType="QMTask.DataDeal.CheckWipBLL_WPC" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <!--<TaskDetail TaskID ="task1" TaskName="定时查制品库存" TaskType="QMTask.DataDeal.CheckWipBLL_WPC" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task2" TaskName="FISM100接口" TaskType="QMTask.DataDeal.FisBLL_GetLastOnLineTime" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task2" TaskName="FISM100接口" TaskType="QMTask.DataDeal.FisBLL_GetLastOnLineTime" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task3" TaskName="仪表板FIS数据获取任务" TaskType="QMTask.DataDeal.SelectQdFisYBBInsertPPtableJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task3" TaskName="仪表板FIS数据获取任务" TaskType="QMTask.DataDeal.SelectQdFisYBBInsertPPtableJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task4" TaskName="门板FIS数据获取任务" TaskType="QMTask.DataDeal.SelectQdFisMBInsertPPtableJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task4" TaskName="门板FIS数据获取任务" TaskType="QMTask.DataDeal.SelectQdFisMBInsertPPtableJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
@ -11,9 +11,9 @@
<TaskDetail TaskID ="task8" TaskName="读取模具资料" TaskType="QMTask.DataDeal.TempProductInsertProductJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task8" TaskName="读取模具资料" TaskType="QMTask.DataDeal.TempProductInsertProductJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task9" TaskName="设备合模次数同步服务" TaskType="QMTask.DataDeal.selectMesMouldIntoMaximoMouldCounterJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task9" TaskName="设备合模次数同步服务" TaskType="QMTask.DataDeal.selectMesMouldIntoMaximoMouldCounterJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task10" TaskName="电表抄表任务" TaskType="QMTask.DataDeal.MeterReadingJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task10" TaskName="电表抄表任务" TaskType="QMTask.DataDeal.MeterReadingJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task11" TaskName="设备模具新增服务" TaskType="QMTask.DataDeal.SelectEquipmentInfoInsertMouldMachineJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task11" TaskName="设备模具新增服务" TaskType="QMTask.DataDeal.SelectEquipmentInfoInsertMouldMachineJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />-->
<TaskDetail TaskID ="task12" TaskName="MFG自动回冲服务" TaskType="QMTask.DataDeal.GenericCompleteStatisticsJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task12" TaskName="MFG自动回冲服务" TaskType="QMTask.DataDeal.GenericCompleteStatisticsJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task13" TaskName="报警数据插入服务" TaskType="QMTask.DataDeal.TempAlarmInsertTableJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <!--<TaskDetail TaskID ="task13" TaskName="报警数据插入服务" TaskType="QMTask.DataDeal.TempAlarmInsertTableJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />
<TaskDetail TaskID ="task14" TaskName="复制文件服务" TaskType="QMTask.DataDeal.TempCopyFileJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" /> <TaskDetail TaskID ="task14" TaskName="复制文件服务" TaskType="QMTask.DataDeal.TempCopyFileJob" AssemblyFile="QMTask.DataDeal.dll" IsUse="false" />-->
<!--<TaskDetail TaskID ="task2" TaskName="测试任务2" TaskType="QMTask.DataDeal.SimpleJob2" AssemblyFile="QMTask.DataDeal.dll" IsUse="true" />--> <!--<TaskDetail TaskID ="task2" TaskName="测试任务2" TaskType="QMTask.DataDeal.SimpleJob2" AssemblyFile="QMTask.DataDeal.dll" IsUse="true" />-->
</Task> </Task>

22
ServicesCenter/Task/QMTask.WindowService/QMTask.WindowService.csproj

@ -18,6 +18,21 @@
<SccLocalPath>Svn</SccLocalPath> <SccLocalPath>Svn</SccLocalPath>
<SccAuxPath>Svn</SccAuxPath> <SccAuxPath>Svn</SccAuxPath>
<SccProvider>SubversionScc</SccProvider> <SccProvider>SubversionScc</SccProvider>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -116,6 +131,13 @@
<Content Include="PlanConfig.xml" /> <Content Include="PlanConfig.xml" />
<Content Include="TaskConfig.xml" /> <Content Include="TaskConfig.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

14
ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

@ -1050,5 +1050,19 @@
<FullLogicClassName>QMAPP.FJC.BLL.Dianjian.InOutPutBeginShiftBLL</FullLogicClassName> <FullLogicClassName>QMAPP.FJC.BLL.Dianjian.InOutPutBeginShiftBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile> <AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition> </ServiceDefinition>
<ServiceDefinition>
<ServiceName>TJPaoMoPlanBLL</ServiceName>
<ServiceDes>泡沫计划</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.TianJin.TJPaoMoPlanBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>TJZhuSuPlanBLL</ServiceName>
<ServiceDes>注塑计划</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.TianJin.TJZhuSuPlanBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
</BusinessDllList> </BusinessDllList>

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

@ -76,11 +76,15 @@
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/> <add name="maindbBZD" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=BZD;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient"/>
-->
<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<add name="maindbYBB" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
<!-- <!--

105
WebAPI/Controllers/InventoryController.cs

@ -17,17 +17,46 @@ namespace WebAPI.Controllers
public class InventoryController : ApiController public class InventoryController : ApiController
{ {
public Response<List<OrderPlan_PaoMo>> GetPlanList(string state) public Response<List<OrderPlan_PaoMo>> GetPlanList(string state,string Type)
{ {
//state = ok //state = ok 合格品
//state = nok //state = nok 不良品
var result = new Response<List<OrderPlan_PaoMo>>(); var result = new Response<List<OrderPlan_PaoMo>>();
List<OrderPlan_PaoMo> List_plan = new List<OrderPlan_PaoMo>(); List<OrderPlan_PaoMo> List_plan = new List<OrderPlan_PaoMo>();
var sqlScript = ""; var sqlScript = "";
sqlScript = $"select top 10 * from T_PP_ORDERPLAN_PAOMO order by PLAN_DATE desc";
if (Type == "1")
{
if (state == "ok")
{
sqlScript = $"select p.*,m.MATERIAL_NAME from T_PP_ORDERPLAN_PAOMO p left join T_MD_MATERIAL m on m.MATERIAL_CODE = p.MATERIAL_CODE where p.PLAN_STATE = '0' order by p.PLAN_DATE desc,p.PLAN_NO";
}
else
{
sqlScript = $"select top 20 p.*,m.MATERIAL_NAME from T_PP_ORDERPLAN_PAOMO p left join T_MD_MATERIAL m on m.MATERIAL_CODE = p.MATERIAL_CODE order by p.PLAN_DATE desc,p.PLAN_NO";
}
}
else
{
if (state == "ok")
{
sqlScript = $"select p.*,m.MATERIAL_NAME from T_PP_ORDERPLAN_ZHUSU p left join T_MD_MATERIAL m on m.MATERIAL_CODE = p.MATERIAL_CODE where p.PLAN_STATE = '0' order by p.PLAN_DATE desc,p.PLAN_NO";
}
else
{
sqlScript = $"select top 20 p.*,m.MATERIAL_NAME from T_PP_ORDERPLAN_ZHUSU p left join T_MD_MATERIAL m on m.MATERIAL_CODE = p.MATERIAL_CODE order by p.PLAN_DATE desc,p.PLAN_NO";
}
}
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript);
@ -37,7 +66,7 @@ namespace WebAPI.Controllers
{ {
OrderPlan_PaoMo OrderPlan = new OrderPlan_PaoMo(); OrderPlan_PaoMo OrderPlan = new OrderPlan_PaoMo();
OrderPlan.PID = row["PID"].ToString(); OrderPlan.PID = row["PID"].ToString();
OrderPlan.PLAN_NO = row["PLAN_NO"].ToString(); OrderPlan.PLAN_NO = row["PLAN_NO"].ToString()+"\n"+ row["MATERIAL_NAME"].ToString();
OrderPlan.PLAN_SEQ = row["PLAN_SEQ"].ToString(); OrderPlan.PLAN_SEQ = row["PLAN_SEQ"].ToString();
OrderPlan.PLAN_STATE = row["PLAN_STATE"].ToString(); OrderPlan.PLAN_STATE = row["PLAN_STATE"].ToString();
OrderPlan.MATERIAL_CODE = row["MATERIAL_CODE"].ToString(); OrderPlan.MATERIAL_CODE = row["MATERIAL_CODE"].ToString();
@ -56,7 +85,7 @@ namespace WebAPI.Controllers
else else
{ {
result.Code = 201; result.Code = 201;
result.Message = "用户信息不存在"; result.Message = "没有生产计划了";
} }
return result; return result;
@ -120,7 +149,7 @@ namespace WebAPI.Controllers
SqlData.InsertWare(sql2); SqlData.InsertWare(sql2);
var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " + var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '1', '2', '{resObj.User}', '{DateTime.Now}');"; $"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '2', '{resObj.User}', '{DateTime.Now}');";
SqlData.InsertWare(sql_log); SqlData.InsertWare(sql_log);
} }
else else
@ -138,18 +167,72 @@ namespace WebAPI.Controllers
if (dataSet.Tables[0].Rows.Count <= 0) if (dataSet.Tables[0].Rows.Count <= 0)
{ {
var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_Inventory] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate], [UpdateUser], [UpdateDate], [Remark1], [Remark2], [Remark3], [PlanID], [MFGNAME]) VALUES " + var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_Inventory] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate], [UpdateUser], [UpdateDate], [Remark1], [Remark2], [Remark3], [PlanID], [MFGNAME]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '1', '1', '{resObj.User}', '{DateTime.Now}', '{resObj.User}', '{DateTime.Now}', NULL, NULL, NULL, '{resObj.PlanID}', NULL);"; $"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '1', '{resObj.User}', '{DateTime.Now}', '{resObj.User}', '{DateTime.Now}', NULL, NULL, NULL, '{resObj.PlanID.Substring(0,14)}', NULL);";
SqlData.InsertWare(sql2); SqlData.InsertWare(sql2);
//泡沫修改完成数
if (resObj.Type == "1")
{
var sel3 = $"update [dbo].[T_PP_ORDERPLAN_PAOMO] set COMPLETE_QTY = COMPLETE_QTY + 1 where PLAN_NO = '{resObj.PlanID.Substring(0, 14)}'";
SqlData.InsertWare(sel3);
var select_pm = $"select * from T_PP_ORDERPLAN_PAOMO where PLAN_NO = '{resObj.PlanID.Substring(0, 14)}' and QTY <= COMPLETE_QTY";
DataSet select_pmdataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, select_pm);
if (select_pmdataSet.Tables[0].Rows.Count > 0)
{
var QTY = select_pmdataSet.Tables[0].Rows[0]["QTY"].ToString();
var COMPLETE_QTY = select_pmdataSet.Tables[0].Rows[0]["COMPLETE_QTY"].ToString();
if (Convert.ToInt32(QTY) <= Convert.ToInt32(COMPLETE_QTY))
{
var sqlupdate = $"update [dbo].[T_PP_ORDERPLAN_PAOMO] set PLAN_STATE = '3' where PLAN_NO = '{resObj.PlanID.Substring(0, 14)}' and QTY <= COMPLETE_QTY ";
SqlData.InsertWare(sqlupdate);
}
}
}
else
{
var sel3 = $"update [dbo].[T_PP_ORDERPLAN_ZHUSU] set COMPLETE_QTY = COMPLETE_QTY + 1 where PLAN_NO = '{resObj.PlanID.Substring(0, 14)}'";
SqlData.InsertWare(sel3);
var select_pm = $"select * from T_PP_ORDERPLAN_ZHUSU where PLAN_NO = '{resObj.PlanID.Substring(0, 14)}' and QTY <= COMPLETE_QTY";
DataSet select_pmdataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, select_pm);
if (select_pmdataSet.Tables[0].Rows.Count > 0)
{
var QTY = select_pmdataSet.Tables[0].Rows[0]["QTY"].ToString();
var COMPLETE_QTY = select_pmdataSet.Tables[0].Rows[0]["COMPLETE_QTY"].ToString();
if (Convert.ToInt32(QTY) <= Convert.ToInt32(COMPLETE_QTY))
{
var sqlupdate = $"update [dbo].[T_PP_ORDERPLAN_ZHUSU] set PLAN_STATE = '3' where PLAN_NO = '{resObj.PlanID.Substring(0, 14)}' and QTY <= COMPLETE_QTY ";
SqlData.InsertWare(sqlupdate);
}
}
#region 绑定投料最新批次
//查询最新批次
var select_sql = $"select a.*,(select top 1 planNumber from T_MD_RawMaterial where PartCode = a.RawMaterial ORDER BY CREATEDATE desc) as 'planNumber' from T_MD_RawMaterial_change a where a.MaterialCode = '{resObj.ProductCode.Substring(0,13)}';";
DataSet select_RawdataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, select_sql);
if (select_RawdataSet.Tables[0].Rows.Count > 0)
{
//绑定投料记录
var insert_sql = $"INSERT INTO [dbo].[T_MD_RawMaterialRecord] ([PID], [RawMaterialPID], [ProductCode], [MaterialCode], [IsCheck], [CREATEUSER], [CREATEDATE], [UPDATEUSER], [UPDATEDATE], [MaterialName]) VALUES " +
$"(NEWID(), '{select_RawdataSet.Tables[0].Rows[0]["planNumber"].ToString()}', '{resObj.ProductCode}', '{select_RawdataSet.Tables[0].Rows[0]["RawMaterial"].ToString()}', '0', '{resObj.User}',GETDATE(), '{resObj.User}', GETDATE(), '{select_RawdataSet.Tables[0].Rows[0]["MaterialName"].ToString()}');";
SqlData.InsertWare(insert_sql);
}
#endregion
}
var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " + var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '1', '1', '{resObj.User}', '{DateTime.Now}');"; $"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '1', '{resObj.User}', '{DateTime.Now}');";
SqlData.InsertWare(sql_log); SqlData.InsertWare(sql_log);
} }
else else
{ {
var ResponseNOK = new Response(); var ResponseNOK = new Response();
ResponseNOK.Code = 400; ResponseNOK.Code = 400;
ResponseNOK.Message = "零件已在悬链上,禁止重复操作!"; ResponseNOK.Message = "零件已录入,禁止重复操作!";
return Ok(ResponseNOK); return Ok(ResponseNOK);
} }
} }
@ -160,7 +243,7 @@ namespace WebAPI.Controllers
if (dataSet.Tables[0].Rows.Count <= 0) if (dataSet.Tables[0].Rows.Count <= 0)
{ {
var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_Inventory] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate], [UpdateUser], [UpdateDate], [Remark1], [Remark2], [Remark3], [PlanID], [MFGNAME]) VALUES " + var sql2 = $"INSERT INTO [dbo].[T_PA_InOutPut_Inventory] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate], [UpdateUser], [UpdateDate], [Remark1], [Remark2], [Remark3], [PlanID], [MFGNAME]) VALUES " +
$"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '{resObj.State}', '{resObj.User}', '{DateTime.Now}', '{resObj.User}', '{DateTime.Now}', NULL, NULL, NULL, '{resObj.PlanID}', '{resObj.MFGNAME}');"; $"(NEWID(), '{resObj.ProductCode}', '{resObj.Type}', '{resObj.State}', '{resObj.User}', '{DateTime.Now}', '{resObj.User}', '{DateTime.Now}', NULL, NULL, NULL, '{resObj.PlanID.Substring(0, 14)}', '{resObj.MFGNAME}');";
SqlData.InsertWare(sql2); SqlData.InsertWare(sql2);
var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " + var sql_log = $"INSERT INTO [dbo].[T_PA_InOutPut_InventoryLog] ([PID], [ProductCode], [Type], [State], [CreateUser], [CreateDate]) VALUES " +

29
WebAPI/Controllers/MachineClassController.cs

@ -13,6 +13,7 @@ namespace WebAPI.Controllers
/// <summary> /// <summary>
/// 泡沫、注塑点检 /// 泡沫、注塑点检
/// </summary> /// </summary>
[RoutePrefix("api/MachineClass")]
public class MachineClassController : ApiController public class MachineClassController : ApiController
{ {
/// <summary> /// <summary>
@ -20,6 +21,7 @@ namespace WebAPI.Controllers
/// </summary> /// </summary>
/// <param name="MachineCode"></param> /// <param name="MachineCode"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet]
public Response<List<MachineClass>> Get(string MachineCode) public Response<List<MachineClass>> Get(string MachineCode)
{ {
var result = new Response<List<MachineClass>>(); var result = new Response<List<MachineClass>>();
@ -203,24 +205,29 @@ namespace WebAPI.Controllers
return Ok(Response); return Ok(Response);
} }
/// <summary> /// <summary>
/// 获取注塑点检项 /// 获取注塑点检项
/// </summary> /// </summary>
/// <param name="MachineCode"></param> /// <param name="MachineCode"></param>
/// <param name="ProductCode"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public Response<List<MachineClass>> GZhuSuItem(string Machine) [Route("GZhuSuItem")]
public Response<List<MachineClass>> GZhuSuItem( string Machine, string ProductCode)
{ {
var result = new Response<List<MachineClass>>(); var result = new Response<List<MachineClass>>();
var sqlScript = $"select a.* from T_MD_PutMachineClass as a where a.MachineCode = '{Machine}' ORDER BY a.SerialNumber "; var sqlScript = $"select a.* from T_MD_PutMachineClass as a where a.MachineCode = '{Machine}' ORDER BY a.SerialNumber ";
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript);
var sqlValue = $"select * from T_MD_PutMachine where MachineCode ='{Machine}' "; var sqlValue = $"select * from T_MD_PutMachine where MachineCode ='{Machine}' ";
DataSet dataSetValue = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlValue); DataSet dataSetValue = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlValue);
var sql_selectProduct = $"select * from monitordata where QrCodeContent = '{ProductCode}'";
//HoldEndPos
DataSet sql_selectSetValue = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sql_selectProduct);
var list_PutMachine = new List<PutMachine>(); var list_PutMachine = new List<PutMachine>();
foreach (DataRow R in dataSetValue.Tables[0].Rows) foreach (DataRow R in dataSetValue.Tables[0].Rows)
{ {
@ -252,9 +259,16 @@ namespace WebAPI.Controllers
var m = list_PutMachine.Where(p => p.MachinePID == t.PID).OrderBy(o => o.SerialNumber).ToList(); var m = list_PutMachine.Where(p => p.MachinePID == t.PID).OrderBy(o => o.SerialNumber).ToList();
t.putMachine = m; t.putMachine = m;
if (sql_selectSetValue.Tables[0].Rows.Count > 0)
t.SelectName = "51"; {
t.SelectValue = "51"; t.SelectName = sql_selectSetValue.Tables[0].Rows[0]["HoldEndPos"].ToString();
t.SelectValue = sql_selectSetValue.Tables[0].Rows[0]["HoldEndPos"].ToString();
}
else
{
t.SelectName = "0";
t.SelectValue = "0";
}
list_MachineClass.Add(t); list_MachineClass.Add(t);
} }
@ -269,6 +283,5 @@ namespace WebAPI.Controllers
return result; return result;
} }
} }
} }

6
WebAPI/Controllers/MachineController.cs

@ -6,19 +6,21 @@ using System.Threading.Tasks;
using System.Web.Http; using System.Web.Http;
using WebAPI.App_Start; using WebAPI.App_Start;
using WebAPI.Models; using WebAPI.Models;
using Newtonsoft.Json.Converters;
namespace WebAPI.Controllers namespace WebAPI.Controllers
{ {
/// <summary> /// <summary>
/// 泡沫、注塑点检 /// 泡沫、注塑点检
/// </summary> /// </summary>
[RoutePrefix("api/Machine")]
public class MachineController : ApiController public class MachineController : ApiController
{ {
/// <summary> /// <summary>
/// 点检录入 /// 点检录入
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public async Task<IHttpActionResult> InsertZhusu() public async Task<IHttpActionResult> InsertZhusu()
{ {
var request = await this.Request.Content.ReadAsStringAsync(); var request = await this.Request.Content.ReadAsStringAsync();
@ -96,7 +98,7 @@ namespace WebAPI.Controllers
} }
var sqlScript = $"INSERT INTO [dbo].[T_MD_PutMachineValueZhusu] ([PID], [MachineCode], [Name], [Type], [MValue], [Group], [UserName], [CreateData], [Remark1], [Remark2], [Remark3], [PValue]) VALUES (" + var sqlScript = $"INSERT INTO [dbo].[T_MD_PutMachineValueZhusu] ([PID], [MachineCode], [Name], [Type], [MValue], [Group], [UserName], [CreateData], [Remark1], [Remark2], [Remark3], [PValue]) VALUES (" +
$"N'{Guid.NewGuid()}', N'{t.MachineCode}', N'{t.Name}', N'{t.Type}', N'{t.MValue}', N'{t.Group}', N'{t.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")}', NULL, NULL, NULL, N'{t.PValue}');"; $"N'{Guid.NewGuid()}', N'{t.MachineCode}', N'{t.Name}', N'{t.Type}', N'{t.MValue}', N'{t.Group}', N'{t.UserName}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")}', {t.ProductCode}, NULL, NULL, N'{t.PValue}');";
SqlData.InsertWare(sqlScript); SqlData.InsertWare(sqlScript);

14
WebAPI/Controllers/PlanController.cs

@ -26,10 +26,15 @@ namespace WebAPI.Controllers
if (Type == "paomo") if (Type == "paomo")
{ {
sqlScript = $"select top 10 * from T_PP_ORDERPLAN_PAOMO order by PLAN_DATE desc"; //sqlScript = $"select top 10 * from T_PP_ORDERPLAN_PAOMO order by PLAN_DATE desc";
sqlScript = $"select p.*,m.MATERIAL_NAME from T_PP_ORDERPLAN_PAOMO p left join T_MD_MATERIAL m on m.MATERIAL_CODE = p.MATERIAL_CODE where p.PLAN_STATE = '0' order by p.PLAN_DATE desc,p.PLAN_NO";
} }
else if(Type == "zhusu") else if (Type == "zhusu")
sqlScript = $"select top 10 * from T_PP_ORDERPLAN_ZHUSU order by PLAN_DATE desc"; {
sqlScript = $"select p.*,m.MATERIAL_NAME from T_PP_ORDERPLAN_ZHUSU p left join T_MD_MATERIAL m on m.MATERIAL_CODE = p.MATERIAL_CODE where p.PLAN_STATE = '0' order by p.PLAN_DATE desc,p.PLAN_NO";
//sqlScript = $"select top 10 * from T_PP_ORDERPLAN_ZHUSU order by PLAN_DATE desc";
}
DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript);
@ -39,7 +44,8 @@ namespace WebAPI.Controllers
{ {
OrderPlan_PaoMo OrderPlan = new OrderPlan_PaoMo(); OrderPlan_PaoMo OrderPlan = new OrderPlan_PaoMo();
OrderPlan.PID = row["PID"].ToString(); OrderPlan.PID = row["PID"].ToString();
OrderPlan.PLAN_NO = row["PLAN_NO"].ToString(); //OrderPlan.PLAN_NO = row["PLAN_NO"].ToString();
OrderPlan.PLAN_NO = row["PLAN_NO"].ToString() + "\n" + row["MATERIAL_NAME"].ToString();
OrderPlan.PLAN_SEQ = row["PLAN_SEQ"].ToString(); OrderPlan.PLAN_SEQ = row["PLAN_SEQ"].ToString();
OrderPlan.PLAN_STATE = row["PLAN_STATE"].ToString(); OrderPlan.PLAN_STATE = row["PLAN_STATE"].ToString();
OrderPlan.MATERIAL_CODE = row["MATERIAL_CODE"].ToString(); OrderPlan.MATERIAL_CODE = row["MATERIAL_CODE"].ToString();

2
WebAPI/Controllers/WareController.cs

@ -59,7 +59,7 @@ namespace WebAPI.Controllers
var resObj = JsonHelper.Instance.JsonToObj<ReceiveWare>(requeststr); var resObj = JsonHelper.Instance.JsonToObj<ReceiveWare>(requeststr);
var sql = $"INSERT INTO [dbo].[T_MD_RawMaterialPaomo] ([PID], [planNumber], [materialName], [materialCode], [materialQty], [UserName], [CreateTime], [Remark1], [Remark2], [Remark3]) VALUES" + var sql = $"INSERT INTO [dbo].[T_MD_RawMaterialPaomo] ([PID], [planNumber], [materialName], [materialCode], [materialQty], [UserName], [CreateTime], [Remark1], [Remark2], [Remark3]) VALUES" +
$" (N'{Guid.NewGuid()}', N'{resObj.planNumber}', N'{resObj.materialName}', N'{resObj.materialCode}', N'{resObj.materialQty}', N'{resObj.id}', '{DateTime.Now}', NULL, NULL, NULL);"; $" (N'{Guid.NewGuid()}', N'{resObj.planNumber.Substring(0, 14)}', N'{resObj.materialName}', N'{resObj.materialCode}', N'{resObj.materialQty}', N'{resObj.id}', '{DateTime.Now}', NULL, NULL, NULL);";
SqlData.InsertWare(sql); SqlData.InsertWare(sql);

2
WebAPI/Controllers/WareHouseController.cs

@ -59,7 +59,7 @@ namespace WebAPI.Controllers
var sql = $"INSERT INTO[dbo].[T_MD_RawMaterial] ([PID], [BucketCode], [PartCode], [BatchCode], [SerialCode], [IsCheck], [CREATEUSER], [CREATEDATE], [planNumber], [supplierCode], [weight]) VALUES" + var sql = $"INSERT INTO[dbo].[T_MD_RawMaterial] ([PID], [BucketCode], [PartCode], [BatchCode], [SerialCode], [IsCheck], [CREATEUSER], [CREATEDATE], [planNumber], [supplierCode], [weight]) VALUES" +
$" ('{Guid.NewGuid()}', '{resObj.bucketCode}', '{resObj.itemCode}', '{resObj.batchCode}', '{resObj.referenceCode}', '0', '{resObj.id}', '{DateTime.Now}', '{resObj.planNumber}', '{resObj.supplierCode}', '{resObj.weight}');"; $" ('{Guid.NewGuid()}', '{resObj.bucketCode}', '{resObj.itemCode}', '{resObj.batchCode}', '{resObj.referenceCode}', '0', '{resObj.id}', '{DateTime.Now}', '{resObj.itemCode}-{DateTime.Now.ToString("yyyyMMddHHmmss")}', '{resObj.supplierCode}', '{resObj.weight}');";
SqlData.InsertWare(sql); SqlData.InsertWare(sql);

5
WebAPI/Models/MachineValue.cs

@ -9,6 +9,11 @@ namespace WebAPI.Models
{ {
public string PID { get; set; } public string PID { get; set; }
/// <summary>
/// 产品code
/// </summary>
public string ProductCode { get; set; }
/// <summary> /// <summary>
/// 设备code /// 设备code
/// </summary> /// </summary>

5
WebAPI/Models/OrderPlan_PaoMo.cs

@ -29,6 +29,11 @@ namespace WebAPI.Models
/// </summary> /// </summary>
public string MATERIAL_CODE { get; set; } public string MATERIAL_CODE { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MATERIAL_NAME { get; set; }
/// <summary> /// <summary>
/// 绑定BOM /// 绑定BOM
/// </summary> /// </summary>

3
WebAPI/Web.config

@ -8,7 +8,10 @@
<!--主数据库连接--> <!--主数据库连接-->
<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient" /> <add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient" />
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_QD_MES_4;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient" />--> <!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_QD_MES_4;User Id=sa;Password=Microsoft@2021;" providerName="System.Data.SqlClient" />-->
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
</connectionStrings> </connectionStrings>

Loading…
Cancel
Save