1
huanghongfeng
2025-03-24 4862490837e93ec1647acc537a4d79afb847be90
1
已修改5个文件
已添加1个文件
51 ■■■■■ 文件已修改
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/IOrderDetailsService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OrderDetailsController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile3.pubxml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/OrderDetailsService.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_ISystemServices/IOrderDetailsService.cs
@@ -35,7 +35,7 @@
    public interface IOrderDetailsService : IService<OrderDetails>
    {
        int GetOrderDetails(string Barcodes);
        bool ToMesBarc(int Barcodes);
        ToMesBarcRes ToMesBarc(int Barcodes);
    }
    public class ToMesBarc
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/OrderDetailsController.cs
@@ -22,7 +22,7 @@
        }
        [HttpPost,Route("ToMesBarc"), AllowAnonymous]
        public bool ToMesBarc(int Barcodes)
        public ToMesBarcRes ToMesBarc(int Barcodes)
        {
            return Service.ToMesBarc(Barcodes);
        }
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Properties/PublishProfiles/FolderProfile3.pubxml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
  <PropertyGroup>
    <DeleteExistingFiles>false</DeleteExistingFiles>
    <ExcludeApp_Data>false</ExcludeApp_Data>
    <LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <PublishProvider>FileSystem</PublishProvider>
    <PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <_TargetId>Folder</_TargetId>
  </PropertyGroup>
</Project>
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -7,7 +7,7 @@
    }
  },
  "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,inOutType,agvStationEnum,agvareaEnum",
  "ToMesScan_sync": "/api/product/batchProcess/scan_sync",
  "ToMesScan_sync": "http://47.110.241.74:3000/mock/164/api/product/batchProcess/scan_sync", //测
  "AllowedHosts": "*",
  "ConnectionStringsEncryption": false,
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/OrderDetailsService.cs
@@ -55,17 +55,19 @@
        {
            
        }
        private static bool toggle = false;
        public int GetOrderDetails(string Barcodes)
        {
            OrderDetails orderDetails = BaseDal.QueryData(x=>x.Orderdetails_outid == Barcodes).FirstOrDefault();
            if(orderDetails != null)
            {
                if (orderDetails.Orderdetails_cutLength <= 800 && orderDetails.Orderdetails_cutLength>=50)
                if (orderDetails.Orderdetails_width <= 800 && orderDetails.Orderdetails_width>=50)
                {
                    Random random = new Random();
                    return random.Next(0, 2) == 0 ? 2 : 3;
                    toggle = !toggle; // åˆ‡æ¢çŠ¶æ€
                    return toggle ? 2 : 3;
                }
                else if (orderDetails.Orderdetails_cutLength >= 800 && orderDetails.Orderdetails_cutLength <= 1220)
                else if (orderDetails.Orderdetails_width >= 800 && orderDetails.Orderdetails_width <= 1220)
                {
                    return 2;
                }
@@ -83,7 +85,7 @@
        
        public string ToMesScan_sync = WIDESEAWCS_Core.Helper.AppSettings.Configuration["ToMesScan_sync"];
        public bool ToMesBarc(int Barcodes)
        public ToMesBarcRes ToMesBarc(int Barcodes)
        {
            ToMesBarc toMes = new ToMesBarc()
            {
@@ -91,14 +93,8 @@
                type = "1",
            };
            ToMesBarcRes toMesBarc=HttpHelper.Post<ToMesBarcRes>($"{ToMesScan_sync}", toMes);
            if (toMesBarc.code == 1)
            {
                return true;
            }
            else
            {
                return false;
            }
            return toMesBarc;
        }
        
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -73,13 +73,15 @@
                                conveyorLine.Communicator.Write("DB7.3022", (int)toplc);   //写入去向
                                conveyorLine.Communicator.Write("DB7.3028.0", (bool)true);    //写入反馈
                                WriteLog.Write_Log("扫码枪", "扫码站台", "成功", new { ä¿¡æ¯ = $"条码:{barcodeNumber},写入去向{toplc}" });
                                if (conveyorLine.Communicator.Read<bool>("DB7.2986"))
                                if (conveyorLine.Communicator.Read<bool>("DB7.3116"))
                                {
                                    conveyorLine.Communicator.Write("DB7.3022", (int)0);   //清除写入去向
                                    conveyorLine.Communicator.Write("DB7.3028.0", (bool)false);   //清除写入反馈
                                    WriteLog.Write_Log("扫码枪", "扫码站台", "成功", new { ä¿¡æ¯ = $"条码:{barcodeNumber},清除输送线反馈成功" });
                                    //调取反馈MES托盘条码
                                    if (_OrderDetailsService.ToMesBarc(int.Parse(barcodeNumber)))
                                   var datast= _OrderDetailsService.ToMesBarc(int.Parse(barcodeNumber));
                                    if (datast.code==1)
                                    {
                                        WriteLog.Write_Log("ToMes", "条码反馈Mes", "成功", new { ä¿¡æ¯ = $"条码:{barcodeNumber},反馈成功" });
                                    }