| | |
| | | <appSettings> |
| | | <!--æ¯å¦æ¯èæä»¿ç模å¼,true:æ¯ï¼falseï¼å¦ãç产ç¯å¢è¦é
置为false ãEditBy shaocx,2022-01-27ã--> |
| | | <add key="IsVirtualMode" value="true"/> |
| | | <!--MESå°å ãEditBy shaocx,2025-08-27ã--> |
| | | <add key="MesUrl" value="http://192.168.6.47:8000/api/Save/"/> |
| | | </appSettings> |
| | | |
| | | <system.serviceModel> |
| | |
| | | <appSettings> |
| | | <!--æ¯å¦æ¯èæä»¿ç模å¼,true:æ¯ï¼falseï¼å¦ãç产ç¯å¢è¦é
置为false ãEditBy shaocx,2022-01-27ã--> |
| | | <add key="IsVirtualMode" value="false"/> |
| | | <!--MESå°å ãEditBy shaocx,2025-08-27ã--> |
| | | <add key="MesUrl" value="http://192.168.6.47:8000/api/Save/"/> |
| | | </appSettings> |
| | | <system.serviceModel> |
| | | |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <startup> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> |
| | | </startup> |
| | | <connectionStrings> |
| | | |
| | | |
| | | <add name="dbmodel" connectionString="data source=.;initial catalog=LA20025;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /> |
| | | <add name="dbmodel" connectionString="data source=.;initial catalog=LA20025;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/> |
| | | </connectionStrings> |
| | | <appSettings> |
| | | <!--æ¯å¦æ¯èæä»¿ç模å¼,true:æ¯ï¼falseï¼å¦ãç产ç¯å¢è¦é
置为false ãEditBy shaocx,2022-01-27ã--> |
| | | <add key="IsVirtualMode" value="true"/> |
| | | <!--MESå°å ãEditBy shaocx,2025-08-27ã--> |
| | | <add key="MesUrl" value="http://192.168.6.47:8000/api/Save/"/> |
| | | </appSettings> |
| | | |
| | | <system.serviceModel> |
| | | |
| | | <bindings> |
| | | <basicHttpBinding> |
| | | <binding name="AutoServiceSoap" /> |
| | | <binding name="AutoServiceSoap"/> |
| | | </basicHttpBinding> |
| | | </bindings> |
| | | <client> |
| | | <endpoint address="http://localhost:8082/AutoService.asmx" binding="basicHttpBinding" bindingConfiguration="AutoServiceSoap" contract="tianyong.AutoServiceSoap" name="AutoServiceSoap" /> |
| | | <endpoint address="http://localhost:8082/AutoService.asmx" binding="basicHttpBinding" bindingConfiguration="AutoServiceSoap" contract="tianyong.AutoServiceSoap" name="AutoServiceSoap"/> |
| | | </client> |
| | | <behaviors> |
| | | <serviceBehaviors> |
| | | <behavior name=""> |
| | | <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> |
| | | <serviceDebug includeExceptionDetailInFaults="false" /> |
| | | <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/> |
| | | <serviceDebug includeExceptionDetailInFaults="false"/> |
| | | </behavior> |
| | | </serviceBehaviors> |
| | | </behaviors> |
| | |
| | | <service name="yunneiWCS.wcf.yunneiWcf"> |
| | | <endpoint address="" binding="basicHttpBinding" contract="yunneiWCS.wcf.IyunneiWcf"> |
| | | <identity> |
| | | <dns value="localhost" /> |
| | | <dns value="localhost"/> |
| | | </identity> |
| | | </endpoint> |
| | | <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> |
| | | <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> |
| | | <host> |
| | | <baseAddresses> |
| | | <add baseAddress="http://localhost:8733/Design_Time_Addresses/yunneiWCS.wcf/yunneiWcf/" /> |
| | | <add baseAddress="http://localhost:8733/Design_Time_Addresses/yunneiWCS.wcf/yunneiWcf/"/> |
| | | </baseAddresses> |
| | | </host> |
| | | </service> |
| | | </services> |
| | | </system.serviceModel> |
| | | </configuration> |
| | | </configuration> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WZ.Useful.Commons.Collections; |
| | | using yunneiWCS.EnumDefine; |
| | | using yunneiWCS.ExtendFunction; |
| | | using yunneiWCS.ORM; |
| | | |
| | | namespace yunneiWCS.DataAccess |
| | | { |
| | | /// <summary> |
| | | /// åºå
¥åºè®°å½(为æ¨éMES) |
| | | /// </summary> |
| | | public class OutInStockRecord_V2_MesHandler |
| | | { |
| | | /// <summary> |
| | | /// 人工å é¤çåºæ¯ |
| | | /// </summary> |
| | | /// <param name="mod"></param> |
| | | /// <param name="_outInFlag"></param> |
| | | /// <param name="sourcePlace"></param> |
| | | /// <param name="toPlace"></param> |
| | | /// <param name="_task"></param> |
| | | /// <param name="remark"></param> |
| | | /// <param name="productStocks"></param> |
| | | /// <param name="currentTaskType"></param> |
| | | public static void AddRecordForPersonDelete(dbmodel mod, OutInFlag _outInFlag, string remark, |
| | | System.Collections.Generic.List<productStockList> productStocks, productStock modfiyStock) |
| | | { |
| | | try |
| | | { |
| | | //var isMaterilStockMove = MyExtend.IsMaterilStockMove(currentTaskType); |
| | | //if (isMaterilStockMove == false) |
| | | //{ |
| | | // return; |
| | | //} |
| | | //if (string.IsNullOrEmpty(modfiyStock.materialCode)) |
| | | //{ |
| | | // return;//认为æ¯ç©ºæ |
| | | //} |
| | | Wms_outInStockRecord_V2_Mes log = new Wms_outInStockRecord_V2_Mes() |
| | | { |
| | | ID = Yitter.IdGenerator.YitIdHelper.NextId(), |
| | | sourcePlace = "", |
| | | toPlace = "", |
| | | containerCode = modfiyStock.containerCode, |
| | | |
| | | LastModifier = modfiyStock.creator, |
| | | LastModifyTime = DateTime.Now, |
| | | |
| | | |
| | | outInFlag = (int)_outInFlag, |
| | | outInFlagName = _outInFlag.ToString(), |
| | | |
| | | CreateTime = DateTime.Now, |
| | | // Creator = _task.creator, |
| | | Remark = remark, |
| | | |
| | | materialCode = productStocks.First().productCode, |
| | | materialName = productStocks.First().productName, |
| | | qty = productStocks.Count(), |
| | | supplier = modfiyStock.supplier, |
| | | |
| | | isSendToMes = 0, |
| | | |
| | | |
| | | //version = modfiyStock.version, |
| | | |
| | | //taskId = _task.taskId.ToString(), |
| | | //taskType = (int)_task.taskType, |
| | | //taskTypeName = _task.taskTypeName, |
| | | //taskName = _task.taskName, |
| | | }; |
| | | mod.Wms_outInStockRecord_V2_Mes.Add(log); |
| | | |
| | | //åæ¶ææç»ä¹æ°å¢è¿å» |
| | | foreach (var item in productStocks) |
| | | { |
| | | var d_id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | Wms_outInStockRecord_Details_V2_Mes wms_OutInStockRecord_Details_V2_Mes = new Wms_outInStockRecord_Details_V2_Mes() |
| | | { |
| | | ID = d_id, |
| | | mainId = log.ID, |
| | | productCode = item.productCode, |
| | | productName = item.productName, |
| | | serialNumber = item.serialNumber |
| | | }; |
| | | mod.Wms_outInStockRecord_Details_V2_Mes.Add(wms_OutInStockRecord_Details_V2_Mes); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | private static void AddRecord(dbmodel mod, OutInFlag _outInFlag, string sourcePlace, string toPlace, task _task, string remark, |
| | | System.Collections.Generic.List<productStockList> productStocks, taskType currentTaskType) |
| | | { |
| | | try |
| | | { |
| | | //var isMaterilStockMove = MyExtend.IsMaterilStockMove(currentTaskType); |
| | | //if (isMaterilStockMove == false) |
| | | //{ |
| | | // return; |
| | | //} |
| | | if (string.IsNullOrEmpty(_task.materialCode)) |
| | | { |
| | | return;//认为æ¯ç©ºæ |
| | | } |
| | | Wms_outInStockRecord_V2_Mes log = new Wms_outInStockRecord_V2_Mes() |
| | | { |
| | | ID = Yitter.IdGenerator.YitIdHelper.NextId(), |
| | | sourcePlace = sourcePlace, |
| | | toPlace = toPlace, |
| | | containerCode = _task.containerCode, |
| | | |
| | | LastModifier = _task.creator, |
| | | LastModifyTime = DateTime.Now, |
| | | |
| | | |
| | | outInFlag = (int)_outInFlag, |
| | | outInFlagName = _outInFlag.ToString(), |
| | | |
| | | CreateTime = DateTime.Now, |
| | | Creator = _task.creator, |
| | | Remark = remark, |
| | | |
| | | materialCode = _task.materialCode, |
| | | materialName = _task.materialName, |
| | | qty = _task.quantity, |
| | | supplier = _task.supplier, |
| | | version = _task.version, |
| | | |
| | | taskId = _task.taskId.ToString(), |
| | | taskType = (int)_task.taskType, |
| | | taskTypeName = _task.taskTypeName, |
| | | taskName = _task.taskName, |
| | | |
| | | isSendToMes = 0, |
| | | }; |
| | | mod.Wms_outInStockRecord_V2_Mes.Add(log); |
| | | |
| | | //åæ¶ææç»ä¹æ°å¢è¿å» |
| | | foreach (var item in productStocks) |
| | | { |
| | | Wms_outInStockRecord_Details_V2_Mes wms_OutInStockRecord_Details_V2_Mes = new Wms_outInStockRecord_Details_V2_Mes() |
| | | { |
| | | ID = Yitter.IdGenerator.YitIdHelper.NextId(), |
| | | mainId = log.ID, |
| | | productCode = item.productCode, |
| | | productName = item.productName, |
| | | serialNumber = item.serialNumber |
| | | }; |
| | | mod.Wms_outInStockRecord_Details_V2_Mes.Add(wms_OutInStockRecord_Details_V2_Mes); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | public static void AddRecord(dbmodel mod, OutInFlag _outInFlag, string sourcePlace, string toPlace, task _task, string remark, |
| | | taskType currentTaskType) |
| | | { |
| | | var stock = mod.productStock.Where(a => a.containerCode == _task.containerCode).FirstOrDefault(); |
| | | if (stock != null) |
| | | { |
| | | System.Collections.Generic.List<productStockList> productStocks = mod.productStockList.Where(a => a.stockId == stock.stockId).ToList(); |
| | | AddRecord(mod, _outInFlag, sourcePlace, toPlace, _task, remark, |
| | | productStocks, currentTaskType); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public class MyExtend |
| | | { |
| | | /// <summary> |
| | | /// æ¯å¦æ¯ ç©æåºåç转移 |
| | | /// </summary> |
| | | /// <param name="taskType"></param> |
| | | /// <returns></returns> |
| | | public static bool IsMaterilStockMove(taskType currentTaskType) |
| | | { |
| | | if (currentTaskType == taskType.空åºä½ |
| | | || currentTaskType == taskType.å¼å«ç©ºæ |
| | | || currentTaskType == taskType.空æååº |
| | | || currentTaskType == taskType.空æä¸çº¿å
¥åº |
| | | || currentTaskType == taskType.空ææå¨å
¥åº |
| | | || currentTaskType == taskType.空æäººå·¥åºåº |
| | | || currentTaskType == taskType.æè·¯å·¥ä½ç¼¸ä½ç©ºæååº |
| | | ) |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public static string HandlerNoIssuedTaskForæè·¯å·¥ä½ç¼¸ä½ç©ºææä½æååº(dbmodel mod, string convPlace, task item, string[] agvSendStatus) |
| | | { |
| | |
| | | throw new Exception("å
¥åºä»»å¡ï¼ç®æ ç«ç¹æ¾ä¸å°ï¼toPlaceï¼" + finishTask.toPlace); |
| | | } |
| | | OutInStockRecordHandler.AddOutInStockRecord(mod, OutInFlag.å
¥åº, finishTask.sourcePlace, finishTask.toPlace, finishTask, "å
¥åºç±»åçä»»å¡"); |
| | | OutInStockRecord_V2_MesHandler.AddRecord(mod, OutInFlag.å
¥åº, finishTask.sourcePlace, finishTask.toPlace, finishTask, "å
¥åºç±»åçä»»å¡", currentTaskType);//å åæºä»»å¡å®æåçå
¥åº |
| | | #endregion |
| | | break; |
| | | case taskType.缸ä½ä¸çº¿: |
| | |
| | | #endregion |
| | | |
| | | OutInStockRecordHandler.AddOutInStockRecord(mod, OutInFlag.å
¥åº, finishTask.sourcePlace, finishTask.toPlace, finishTask, "å
¥åºç±»åçä»»å¡"); |
| | | OutInStockRecord_V2_MesHandler.AddRecord(mod, OutInFlag.å
¥åº, finishTask.sourcePlace, finishTask.toPlace, finishTask, "å
¥åºç±»åçä»»å¡", currentTaskType);//å åæºä»»å¡å®æåçå
¥åº |
| | | } |
| | | else |
| | | { |
| | |
| | | finishTask.remark = "宿"; |
| | | finishTask.finishTime = DateTime.Now; |
| | | |
| | | var result = deleteProduct(false, "sys", mod, finishTask.sourcePlace, finishTask, ref errMsg);//å é¤åºå |
| | | |
| | | |
| | | var result = deleteProduct(false, "sys", mod, finishTask.sourcePlace, finishTask, ref errMsg, "å åæºä»»å¡å®æ-æå¨åºåº");//å é¤åºå |
| | | if (result == false) throw new Exception(errMsg); |
| | | |
| | | OutInStockRecordHandler.AddOutInStockRecord(mod, OutInFlag.åºåº, finishTask.sourcePlace, finishTask.toPlace, finishTask, "åºåºç±»åçä»»å¡"); |
| | |
| | | errMsg = "缸çä¸çº¿/缸ä½ä¸çº¿ä»»å¡ï¼ä¸è½¬ä½ä¸ºç©ºï¼æä¸å¤ç"; |
| | | return false; |
| | | } |
| | | OutInStockRecord_V2_MesHandler.AddRecord(mod, OutInFlag.åºåº, finishTask.sourcePlace, finishTask.toPlace, finishTask, "åºåºç±»åçä»»å¡", currentTaskType);//å åæºä»»å¡å®æåçåºåº |
| | | break; |
| | | default://å
¶ä»ï¼åºåºç¡®è®¤ |
| | | //finishTask.taskStatus = 3; |
| | |
| | | //è®¾ç½®ç®æ ä½æè´§ |
| | | PositionHandler.Free(true, to_positionStation, "å¤ç 缸ä½ä¸çº¿å°æè·¯å·¥ä½çå¤ç çä»»å¡", SysGloble.WCSNAME, item); |
| | | |
| | | OutInStockRecord_V2_MesHandler.AddRecord(mod, OutInFlag.åºåº, item.sourcePlace, item.toPlace, item, "åºåºç±»åçä»»å¡", _taskType);//å åæºä»»å¡å®æåçåºåº |
| | | OutInStockRecordHandler.AddOutInStockRecord(mod, OutInFlag.åºåº, item.sourcePlace, item.toPlace, item, "åºåºç±»åçä»»å¡"); |
| | | |
| | | //éç¥å¤©æ°¸,ç»å¤©æ°¸åä¿¡å· |
| | |
| | | /// <param name="positionName"></param> |
| | | /// <param name="res"></param> |
| | | /// <returns></returns> |
| | | public static bool deleteProduct(bool isPerson, string user, dbmodel mod, string positionName, task _task, ref string res) |
| | | public static bool deleteProduct(bool isPerson, string user, dbmodel mod, string positionName, task _task, ref string res, string preLog) |
| | | { |
| | | res = ""; |
| | | string[] stations = { "GTU1", "GTU2", "GTU3", "GGU1", "GGU2", "GGU3" }; |
| | |
| | | List<productStockList> delteStockDatalist = mod.productStockList.Where(x => x.stockId == delteData.positionId).ToList(); |
| | | if (delteStockDatalist.Count > 0) |
| | | { |
| | | OutInStockRecord_V2_MesHandler.AddRecordForPersonDelete(mod, OutInFlag.åºåº, "å é¤åºå:" + preLog, delteStockDatalist, delteStockData.First());//å åæºä»»å¡å®æåçåºåº |
| | | foreach (var itemList in delteStockDatalist) |
| | | { |
| | | mod.productStockList.Remove(itemList); |
| | |
| | | //var queryTask6 = (int)taskType.使ååº; |
| | | |
| | | var queryStats = (int)taskStatus.宿; |
| | | var allQty = mod.task.Where(x => |
| | | var allQty = mod.task.Where(x => |
| | | //( |
| | | //x.taskType == queryTask1 |
| | | //|| x.taskType == queryTask2 |
| | | //|| x.taskType == queryTask3 |
| | | //|| x.taskType == queryTask4 |
| | | //|| x.taskType == queryTask5 |
| | | //|| x.taskType == queryTask6 |
| | | //x.taskType == queryTask1 |
| | | //|| x.taskType == queryTask2 |
| | | //|| x.taskType == queryTask3 |
| | | //|| x.taskType == queryTask4 |
| | | //|| x.taskType == queryTask5 |
| | | //|| x.taskType == queryTask6 |
| | | //) && |
| | | x.taskStatus == queryStats).Count(); |
| | | |
| | | var nowDateTimeStr_1 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00"); |
| | | var nowDateTimeStr_2 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59"); |
| | | var todayQty = mod.task.Where(x => |
| | | //( |
| | | //x.taskType == queryTask1 |
| | | //|| x.taskType == queryTask2 |
| | | //|| x.taskType == queryTask3 |
| | | //|| x.taskType == queryTask4 |
| | | //|| x.taskType == queryTask5 |
| | | //|| x.taskType == queryTask6 |
| | | var todayQty = mod.task.Where(x => |
| | | //( |
| | | //x.taskType == queryTask1 |
| | | //|| x.taskType == queryTask2 |
| | | //|| x.taskType == queryTask3 |
| | | //|| x.taskType == queryTask4 |
| | | //|| x.taskType == queryTask5 |
| | | //|| x.taskType == queryTask6 |
| | | //) && |
| | | x.taskStatus == queryStats |
| | | && x.finishTime != null && x.finishTime >= nowDateTimeStr_1 && x.finishTime <= nowDateTimeStr_2 |
| | |
| | | |
| | | var nowDateTimeStr_3 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00"); |
| | | var nowDateTimeStr_4 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM") + "-30 23:59:59"); |
| | | var monthQty = mod.task.Where(x => |
| | | var monthQty = mod.task.Where(x => |
| | | // ( |
| | | // x.taskType == queryTask1 |
| | | // || x.taskType == queryTask2 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace yunneiWCS.ORM |
| | | { |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | using System.Data.Entity.Spatial; |
| | | |
| | | [Table("Wms_outInStockRecord_Details_V2_Mes")] |
| | | public partial class Wms_outInStockRecord_Details_V2_Mes |
| | | { |
| | | public long ID { get; set; } |
| | | |
| | | public long? mainId { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string productCode { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string productName { get; set; } |
| | | |
| | | [StringLength(50)] |
| | | public string serialNumber { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace yunneiWCS.ORM |
| | | { |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel.DataAnnotations; |
| | | using System.ComponentModel.DataAnnotations.Schema; |
| | | using System.Data.Entity.Spatial; |
| | | |
| | | public partial class Wms_outInStockRecord_V2_Mes |
| | | { |
| | | public long ID { get; set; } |
| | | |
| | | public int? outInFlag { get; set; } |
| | | |
| | | [StringLength(100)] |
| | | public string outInFlagName { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string taskId { get; set; } |
| | | |
| | | public int? taskType { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string taskTypeName { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string taskName { get; set; } |
| | | |
| | | |
| | | [StringLength(128)] |
| | | public string sourcePlace { get; set; } |
| | | |
| | | |
| | | [StringLength(128)] |
| | | public string toPlace { get; set; } |
| | | |
| | | [StringLength(100)] |
| | | public string materialCode { get; set; } |
| | | |
| | | [StringLength(100)] |
| | | public string materialName { get; set; } |
| | | |
| | | [StringLength(100)] |
| | | public string version { get; set; } |
| | | |
| | | [StringLength(100)] |
| | | public string supplier { get; set; } |
| | | |
| | | [StringLength(100)] |
| | | public string containerCode { get; set; } |
| | | |
| | | public int? qty { get; set; } |
| | | |
| | | public int? isSendToMes { get; set; } |
| | | |
| | | public DateTime? SendToMesTime { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string MesRet { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string Remark { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string Creator { get; set; } |
| | | |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | [StringLength(128)] |
| | | public string LastModifier { get; set; } |
| | | |
| | | public DateTime? LastModifyTime { get; set; } |
| | | } |
| | | } |
| | |
| | | public virtual DbSet<v_outStockList> v_outStockList { get; set; } |
| | | public virtual DbSet<VproductStock> VproductStock { get; set; } |
| | | |
| | | public virtual DbSet<Wms_outInStockRecord_V2_Mes> Wms_outInStockRecord_V2_Mes { get; set; } |
| | | |
| | | public virtual DbSet<Wms_outInStockRecord_Details_V2_Mes> Wms_outInStockRecord_Details_V2_Mes { get; set; } |
| | | |
| | | protected override void OnModelCreating(DbModelBuilder modelBuilder) |
| | | { |
| | | modelBuilder.Entity<BasicDataSet>() |
| | |
| | | { |
| | | Application.EnableVisualStyles(); |
| | | Application.SetCompatibleTextRenderingDefault(false); |
| | | Yitter.IdGenerator.IdGeneratorOptions options = new Yitter.IdGenerator.IdGeneratorOptions(1); |
| | | Yitter.IdGenerator.YitIdHelper.SetIdGenerator(options); |
| | | Application.Run(new Form1()); |
| | | //Application.Run(new TestForm()); |
| | | } |
| | |
| | | // ç±»éè¿ç±»ä¼¼äº ResGen æ Visual Studio çå·¥å
·èªå¨çæçã |
| | | // è¥è¦æ·»å æç§»é¤æåï¼è¯·ç¼è¾ .ResX æä»¶ï¼ç¶åéæ°è¿è¡ ResGen |
| | | // (以 /str ä½ä¸ºå½ä»¤é项)ï¼æéæ°çæ VS 项ç®ã |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] |
| | | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | internal class Resources { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä½¿ç¨æ¤å¼ºç±»åèµæºç±»ï¼ä¸ºææèµæºæ¥æ¾ |
| | | /// éåå½å线ç¨ç CurrentUICulture 屿§ã |
| | | /// éåå½å线ç¨ç CurrentUICulture 屿§ï¼å¯¹ |
| | | /// ä½¿ç¨æ¤å¼ºç±»åèµæºç±»çææèµæºæ¥æ¾æ§è¡éåã |
| | | /// </summary> |
| | | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
| | | internal static global::System.Globalization.CultureInfo Culture { |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <auto-generated> |
| | | // This code was generated by a tool. |
| | | // Runtime Version:4.0.30319.42000 |
| | | // æ¤ä»£ç ç±å·¥å
·çæã |
| | | // è¿è¡æ¶çæ¬:4.0.30319.42000 |
| | | // |
| | | // Changes to this file may cause incorrect behavior and will be lost if |
| | | // the code is regenerated. |
| | | // å¯¹æ¤æä»¶çæ´æ¹å¯è½ä¼å¯¼è´ä¸æ£ç¡®çè¡ä¸ºï¼å¹¶ä¸å¦æ |
| | | // éæ°çæä»£ç ï¼è¿äºæ´æ¹å°ä¼ä¸¢å¤±ã |
| | | // </auto-generated> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace yunneiWCS.Properties |
| | | { |
| | | |
| | | |
| | | namespace yunneiWCS.Properties { |
| | | |
| | | |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] |
| | | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase |
| | | { |
| | | |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] |
| | | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
| | | |
| | | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
| | | |
| | | public static Settings Default |
| | | { |
| | | get |
| | | { |
| | | |
| | | public static Settings Default { |
| | | get { |
| | | return defaultInstance; |
| | | } |
| | | } |
| | |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="EmptyBackResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>yunneiWCS.tianyong.EmptyBackResponse, Service References.tianyong.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | <TypeInfo>yunneiWCS.tianyong.EmptyBackResponse, Service References.tianyong.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
| | |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="GGoutStockResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>yunneiWCS.tianyong.GGoutStockResponse, Service References.tianyong.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | <TypeInfo>yunneiWCS.tianyong.GGoutStockResponse, Service References.tianyong.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
| | |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="GToutStockResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>yunneiWCS.tianyong.GToutStockResponse, Service References.tianyong.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | <TypeInfo>yunneiWCS.tianyong.GToutStockResponse, Service References.tianyong.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
| | |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="MsgData" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>yunneiWCS.tianyong.MsgData, Service References.tianyong.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | <TypeInfo>yunneiWCS.tianyong.MsgData, Service References.tianyong.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
| | |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="OnLowdPartCallResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>yunneiWCS.tianyong.OnLowdPartCallResponse, Service References.tianyong.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | <TypeInfo>yunneiWCS.tianyong.OnLowdPartCallResponse, Service References.tianyong.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
| | |
| | | cause the file to be unrecognizable by the program. |
| | | --> |
| | | <GenericObjectDataSource DisplayName="safetySignalResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> |
| | | <TypeInfo>yunneiWCS.tianyong.safetySignalResponse, Service References.tianyong.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | <TypeInfo>yunneiWCS.tianyong.safetySignalResponse, Service References.tianyong.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> |
| | | </GenericObjectDataSource> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using yunneiWCS.EnumDefine; |
| | | using yunneiWCS.SystemInteraction.mes2.dto; |
| | | |
| | | namespace yunneiWCS.mes |
| | | { |
| | | /// <summary> |
| | | /// MESæ¨éæ¥å£ |
| | | /// </summary> |
| | | public class PushMesHandler |
| | | { |
| | | public static string mes_api_url = ConfigHelper.GetConfigString("MesUrl");//ä¿®æ¹ä¸ºé
ç½®æä»¶ ãEditBy shaocx,2022-01-27ã |
| | | static HTTPService mes_api = new HTTPService(mes_api_url);//mesåºå°å |
| | | |
| | | /// <summary> |
| | | /// ç»MESæ¨éå
¥åºä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="pushData"></param> |
| | | /// <returns></returns> |
| | | public static ApiResponse<object> Mes_InStockSend(List<InboundStockInfoToMes> pushData) |
| | | { |
| | | ApiResponse<object> res = null; |
| | | try |
| | | { |
| | | MesRequest<List<InboundStockInfoToMes>> mesRequest = new MesRequest<List<InboundStockInfoToMes>>(); |
| | | mesRequest.data = pushData; |
| | | |
| | | string paprm = JsonConvert.SerializeObject(mesRequest); |
| | | Guid guid = System.Guid.NewGuid(); |
| | | res = JsonConvert.DeserializeObject<ApiResponse<object>>(mes_api.postContentForString("T_WMS_Inbound_Record", paprm, guid)); |
| | | WZ.Useful.Commons.LogTextHelper.WriteLine("PushMesHandler", "Mes_InStockSend è¿åç¶æç :", res.Code + " è¿åä¿¡æ¯:" + res.Message); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WZ.Useful.Commons.LogTextHelper.WriteLine("PushMesHandler", "Mes_InStockSend ", " åéå¼å¸¸:" + JsonConvert.SerializeObject(ex)); |
| | | res.Message = "åéå¼å¸¸:" + ex.Message; |
| | | } |
| | | return res; |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace yunneiWCS.SystemInteraction.mes2.dto |
| | | { |
| | | /// <summary> |
| | | /// éç¨æ³åæ¥å£ååºæ¨¡å |
| | | /// </summary> |
| | | /// <typeparam name="T">Data åæ®µçç±»åï¼å¯ä»¥æ¯ä»»æç±»åï¼å¦ stringãintãèªå®ä¹ç±»ç</typeparam> |
| | | public class ApiResponse<T> |
| | | { |
| | | /// <summary> |
| | | /// ç¶æç ï¼ä¾å¦ 200 表示æå |
| | | /// </summary> |
| | | public int Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦æåï¼true 表示æåï¼false 表示失败 |
| | | /// </summary> |
| | | public bool Success { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¿åæ¶æ¯ï¼ä¾å¦ï¼"æå" æéè¯¯ä¿¡æ¯ |
| | | /// </summary> |
| | | public string Message { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è¿åçæ°æ®å
容ï¼ç±»å为æ³å T |
| | | /// </summary> |
| | | public T Data { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace yunneiWCS.SystemInteraction.mes2.dto |
| | | { |
| | | /// <summary> |
| | | /// æ¨éå
¥åºæ¥å£ - 请æ±åæ°ä¸çå个å
¥åºè®°å½é¡¹ |
| | | /// </summary> |
| | | public class InboundStockInfoToMes |
| | | { |
| | | /// <summary> |
| | | /// 产ååç§° |
| | | /// </summary> |
| | | public string productName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æµæ°´å· |
| | | /// </summary> |
| | | public string serialNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºä½å· |
| | | /// </summary> |
| | | public string positionName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string materialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string materialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¶é´ |
| | | /// </summary> |
| | | public string createTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æçå· |
| | | /// </summary> |
| | | public string containerCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä¾åºå |
| | | /// </summary> |
| | | public string supplier { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æºå |
| | | /// </summary> |
| | | public string version { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace yunneiWCS.SystemInteraction.mes2.dto |
| | | { |
| | | /// <summary> |
| | | /// æ¨éä¿¡æ¯ |
| | | /// </summary> |
| | | public class MesRequest<T> |
| | | { |
| | | /// <summary> |
| | | /// æ°æ® |
| | | /// </summary> |
| | | public T data { get; set; } |
| | | /// <summary> |
| | | /// æ¨é人 |
| | | /// </summary> |
| | | public string Creator { get; set; } = "wms"; // å建人ï¼å¦ "wms" |
| | | |
| | | /// <summary> |
| | | /// æ¨éæ¶é´ |
| | | /// </summary> |
| | | public string Timestamp { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); // æ¶é´æ³ï¼å¦ "2022-03-15 06:43:15" |
| | | } |
| | | } |
| | |
| | | mod.productStockList.Add(newList); |
| | | |
| | | } |
| | | |
| | | List<productStockList> record_delteList = new List<productStockList>(); |
| | | var realDeleteList = all_serialNumberList.Where(x => !now_serialNumberList.Contains(x)).ToList(); |
| | | foreach (var item in deleteList) |
| | | { |
| | | if (realDeleteList.Contains(item.serialNumber)) |
| | | { |
| | | record_delteList.Add(item); |
| | | //è®°å½æ¥å¿ [EditBy shaocx,2022-03-16] |
| | | StockClearLog _StockClearLog = new StockClearLog() |
| | | { |
| | |
| | | mod.StockClearLog.Add(_StockClearLog); |
| | | } |
| | | } |
| | | |
| | | var preLog = "æ®éå é¤"; |
| | | if (taskId > 0) |
| | | {//è¯´ææ¯ åºåºåæ£ ãEditby shaocx,2022-03-02ã |
| | | var task = mod.task.Where(x => x.taskId == taskId).FirstOrDefault(); |
| | |
| | | return msg; |
| | | } |
| | | task.taskStatus = (int)taskStatus.忣宿; |
| | | preLog = "äººå·¥åæ£"; |
| | | } |
| | | |
| | | OutInStockRecord_V2_MesHandler.AddRecordForPersonDelete(mod, OutInFlag.åºåº, "人工å é¤åºå:" + preLog, record_delteList, modfiyStock);//å åæºä»»å¡å®æåçåºåº |
| | | |
| | | int res = mod.SaveChanges(); |
| | | if (res > 0) |
| | |
| | | { |
| | | using (dbmodel mod = new dbmodel()) |
| | | { |
| | | var b_result = MyExtend.deleteProduct(true, user, mod, positionName, null, ref res); |
| | | var b_result = MyExtend.deleteProduct(true, user, mod, positionName, null, ref res, "äººå·¥ç´æ¥å é¤åºå"); |
| | | if (b_result == false) |
| | | { |
| | | return FunctionReturnEntity<bool>.Fail("å é¤å¤±è´¥:" + res); |
| | |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>yunneiWCS</RootNamespace> |
| | | <AssemblyName>yunneiWCS</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| | | <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled> |
| | | <PublishUrl>åå¸\</PublishUrl> |
| | |
| | | <IsWebBootstrapper>false</IsWebBootstrapper> |
| | | <UseApplicationTrust>false</UseApplicationTrust> |
| | | <BootstrapperEnabled>true</BootstrapperEnabled> |
| | | <TargetFrameworkProfile /> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | |
| | | <Reference Include="WZ.Useful.Commons"> |
| | | <HintPath>..\CommonDll\WZ.Useful.Commons.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Yitter.IdGenerator.Net45"> |
| | | <HintPath>..\CommonDll\Yitter.IdGenerator.Net45.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Common\SysGloble.cs" /> |
| | | <Compile Include="DataAccess\BasicDataSetHandler.cs" /> |
| | | <Compile Include="DataAccess\ClearDataHandler.cs" /> |
| | | <Compile Include="DataAccess\OutInStockRecord_V2_MesHandler.cs" /> |
| | | <Compile Include="DataAccess\PositionHandler.cs" /> |
| | | <Compile Include="DataAccess\OutInStockRecordHandler.cs" /> |
| | | <Compile Include="DataAccess\TianYongLogHandler.cs" /> |
| | |
| | | <Compile Include="ORM\BasicDataSet.cs" /> |
| | | <Compile Include="ORM\dbmodel.cs" /> |
| | | <Compile Include="ORM\inStockOrder.cs" /> |
| | | <Compile Include="ORM\Wms_outInStockRecord_V2_Mes.cs" /> |
| | | <Compile Include="ORM\Wms_outInStockRecord_Details_V2_Mes.cs" /> |
| | | <Compile Include="ORM\inStockOrderList.cs" /> |
| | | <Compile Include="ORM\material.cs" /> |
| | | <Compile Include="ORM\module.cs" /> |
| | |
| | | <Compile Include="PLC\Trans\convDB.cs" /> |
| | | <Compile Include="PLC\Trans\convEntity.cs" /> |
| | | <Compile Include="EnumDefine\Device\TransEnum.cs" /> |
| | | <Compile Include="SystemInteraction\mes2\dto\ApiResponse.cs" /> |
| | | <Compile Include="SystemInteraction\mes2\dto\MesRequest.cs" /> |
| | | <Compile Include="SystemInteraction\mes2\dto\InboundStockInfoToMes.cs" /> |
| | | <Compile Include="SystemInteraction\mes2\PushMesHandler.cs" /> |
| | | <Compile Include="SystemInteraction\tianyong\TianYongSystem.cs" /> |
| | | <Compile Include="TestForm.cs"> |
| | | <SubType>Form</SubType> |