刘磊
2024-12-18 c1f28a6c63036b7e105f578a47d9348812710dad
合并
已修改9个文件
已添加3个文件
544 ■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Client/src/router/viewGird.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_needBarcode.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManager.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/router/tables.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_StationManager.vue 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_needBarcode.vue 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_StationManager.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 125 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Client/src/router/viewGird.js
@@ -61,6 +61,23 @@
    path: '/router',
    name: 'router',
    component: () => import('@/views/basicinfo/router.vue')
  }]
  },
  // {
  //   path: '/Dt_StationManager',
  //   name: 'Dt_StationManager',
  //   component: () => import('@/views/widesea_wms/basicinfo/Dt_StationManager.vue'),
  //   meta: {
  //     keepAlive: false
  //   }
  // },
  {
    path: '/Dt_needBarcode',
    name: 'Dt_needBarcode',
    component: () => import('@/views/basicinfo/Dt_needBarcode.vue'),
    meta: {
      keepAlive: false
    }
  },
]
export default viewgird
Code Management/WCS/WIDESEAWCS_Client/src/views/basicinfo/Dt_needBarcode.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wms/basicinfo/Dt_AreaInfo.js此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/basicinfo/Dt_needBarcode.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'areaID',
            footer: "Foots",
            cnName: '在途数据',
            name: 'basicinfo/dt_needBarcode',
            url: "/dt_needBarcode/",
            sortName: "AreaCode"
        });
        const editFormFields = ref({
            // "toArea": "",
            // "fromArea": "",
            // "barcodeType": "",
            "productLine": "",
            "inLineNum": "",
            "cacheNum":""
        });
        const editFormOptions = ref([
            // [
            //     { "title": "目标库区", "field": "toArea", type: "text" },
            //     { "title": "来源库区", "field": "fromArea", type: "text" },
            //     { "title": "托盘类型", "field": "barcodeType", type: "text" },
            // ],
            [
                { "title": "所属产线", "field": "productLine", type: "text" },
                { "title": "在途数量", "field": "inLineNum", type: "text" },
                { "title": "可缓存数量", "field": "cacheNum", type: "text" },
            ]
        ]);
        const searchFormFields = ref({});
        const searchFormOptions = ref([
            // [
            //     { "title": "目标库区", "field": "toArea", type: "text" },
            //     { "title": "来源库区", "field": "fromArea", type: "text" },
            //     { "title": "托盘类型", "field": "barcodeType", type: "text" },
            // ],
            [
                { "title": "所属产线", "field": "productLine", type: "text" },
                { "title": "在途数量", "field": "inLineNum", type: "text" },
                { "title": "可缓存数量", "field": "cacheNum", type: "text" },
            ]
        ]);
        const columns = ref([{ field: 'ID', title: '主键', type: 'int', sort: true, hidden: true, width: 110, readonly: true, require: true, align: 'left' },
        //{ field: 'toArea', title: '目标库区', type: 'string', sort: true, width: 110, require: true, align: 'left', sort: true },
        //{ field: 'fromArea', title: '来源库区', type: 'string', sort: true, width: 110, align: 'left' },
        //{ field: 'barcodeType', title: '托盘类型', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'productLine', title: '所属产线', type: 'string', sort: true, width: 110, align: 'left',},
        { field: 'inLineNum', title: '在途数量', type: 'int', sort: true, width: 110, align: 'left' },
        { field: 'cacheNum', title: '可缓存数量', type: 'int', sort: true, width: 100,  align: 'left' },
        { field: 'creater', title: '创建人', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
        { field: 'modifier', title: '修改人', type: 'string', sort: true, width: 100,  align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', sort: true, width: 150,  align: 'left', sort: true },
        ]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManager.cs
@@ -111,5 +111,9 @@
        public string stationStatus { get; set; }
        /// <summary>
        /// äº§çº¿
        /// </summary>
        public string productLine { get; set; }
    }
}
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/dt_needBarcode.cs
@@ -8,6 +8,8 @@
namespace WIDESEAWCS_Model.Models
{
    [SugarTable(nameof(dt_needBarcode), "在途数据")]
    public class dt_needBarcode : BaseEntity
    {
        [Key]
@@ -56,17 +58,5 @@
        /// </summary>
        [NotMapped]
        public int haveOutNum { get; set; } = 0;
        /// <summary>
        /// å¯å…¥æ•°é‡
        /// </summary>
        [NotMapped]
        public int canInNum { get; set; } = 0;
        /// <summary>
        /// å·²åˆ›å»ºå‡ºåº“任务
        /// </summary>
        [NotMapped]
        public List<Dt_Task> haveOutList { get; set; }
    }
}
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,7 +12,8 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True",
  "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_BZ/CommonConveyorLine_BZJob.cs
@@ -193,9 +193,9 @@
        public void RequestOutbound(CommonConveyorLine_BZ conveyorLine, ConveyorLineTaskCommand_After command, Dt_StationManager station)
        {
            //查询对应产线的在途数据
            dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == station.stationRemark);
            dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == station.productLine);
            //needBarcode.haveOutNum
            needBarcode.inLineNum = _taskRepository.QueryData(x => x.TargetAddress == station.stationChildCode).Count();
            //若在途数量小于目标位置的缓存数量 åˆ™å¯»æ‰¾å¯¹åº”常温库存中常温3工序的可出库数据 å¹¶å»ºç«‹å‡ºåº“任务
            if (needBarcode.inLineNum <= needBarcode.cacheNum)
@@ -221,18 +221,43 @@
            dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.toArea == station.stationChildCode);
            if (needBarcode == null) throw new Exception($"未配置相关{station.stationChildCode}的产线在途数据");
            if (task != null)
            if (task != null) //如任务不为空 åˆ™ä¸ºé€åŒ…装料
            {
                conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, station.stationChildCode);
                _taskRepository.DeleteData(task);
                needBarcode.inLineNum--;
                _needBarcodeRepository.UpdateData(needBarcode);
            }
            else
            {
                var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress);
                var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.MOMIP_BASE)?.ConfigValue;
                var ipAddress = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.TrayCellsStatus)?.ConfigValue;
                if (wmsBase == null || ipAddress == null)
                {
                    throw new InvalidOperationException("MOM IP æœªé…ç½®");
                }
                TrayCellsStatusDto trayCells = new TrayCellsStatusDto()
                {
                    Software = "WMS",
                    TrayBarcode = command.ConveyorLineBarcode,
                    EquipmentCode = station.stationEquipMOM,
                    SessionId = Guid.NewGuid().ToString(),
                    EmployeeNo = "MITest",
                    //SceneType = "1",
                    RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
                };
                var MOMIpAddress = wmsBase + ipAddress;
                var result = HttpHelper.PostAsync(MOMIpAddress, trayCells.ToJsonString()).Result;
                ResultTrayCellsStatus result1 = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(result);
                conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, station.stationNGChildCode, station.stationChildCode);
            }
            needBarcode.inLineNum--;
            _needBarcodeRepository.UpdateData(needBarcode);
        }
    }
}
Code Management/WMS/WIDESEA_WMSClient/src/router/tables.js
@@ -234,6 +234,21 @@
    meta: {
      keepAlive: false
    }
  }
  },
  {
    path: '/Dt_StationManager',
    name: 'Dt_StationManager',
    component: () => import('@/views/widesea_wms/basicinfo/Dt_StationManager.vue'),
    meta: {
      keepAlive: false
    }
  },{
    path: '/Dt_needBarcode',
    name: 'Dt_needBarcode',
    component: () => import('@/views/widesea_wms/basicinfo/Dt_needBarcode.vue'),
    meta: {
      keepAlive: false
    }
  },
]
export default tables
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_StationManager.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,88 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wms/basicinfo/Dt_AreaInfo.js此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/widesea_wms/basicinfo/Dt_StationManager.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'areaID',
            footer: "Foots",
            cnName: '站台信息',
            name: 'basicinfo/Dt_StationManager',
            url: "/Dt_StationManager/",
            sortName: "AreaCode"
        });
        const editFormFields = ref({
        });
        const editFormOptions = ref([
        ]);
        const searchFormFields = ref({});
        const searchFormOptions = ref([
            [
                { "title": "站台类型", "field": "stationType", type: "text" },
                { "title": "所属PLC", "field": "stationPLC", type: "text" },
                { "title": "巷道号", "field": "roadway", type: "text" },
            ],
            [
                { "title": "设备区域", "field": "stationArea", type: "text" },
                { "title": "MOM设备编号", "field": "stationEquipMOM", type: "text" },
                { "title": "NG子设备编号", "field": "stationNGChildCode", type: "text" },
            ],
            [
                { "title": "NG子设备坐标", "field": "remark", type: "text" },
                { "title": "线体编号", "field": "stationChildCode", type: "text" },
                { "title": "产线", "field": "productLine", type: "text" },
            ]
        ]);
        const columns = ref([{ field: 'stationID', title: '主键', type: 'int', sort: true, hidden: true, width: 110, readonly: true, require: true, align: 'left' },
        { field: 'stationType', title: '站台类型', type: 'int', sort: true, width: 110, require: true, align: 'left', sort: true },
        { field: 'stationPLC', title: '所属PLC', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'roadway', title: '巷道号', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'stationChildCode', title: '线体编号(子设备编号)', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'stationArea', title: '设备区域', type: 'int', sort: true, width: 100,  align: 'left' },
        { field: 'stationEquipMOM', title: 'MOM设备编号', type: 'string', sort: true, width: 150,  align: 'left' },
        { field: 'stationNGChildCode', title: 'NG子设备编号', type: 'string', sort: true, width: 110,  align: 'left' },
        { field: 'productLine', title: '产线', type: 'string', sort: true, width: 110,  align: 'left' },
        { field: 'remark', title: 'NG子设备坐标', type: 'string', sort: true, width: 110,  align: 'left' },
        { field: 'stationRemark', title: '备注', type: 'int', sort: true, width: 110, align: 'left',  },
        { field: 'creater', title: '创建人', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
        { field: 'modifier', title: '修改人', type: 'string', sort: true, width: 100,  align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', sort: true, width: 150,  align: 'left', sort: true },
        ]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_needBarcode.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
<!--
*Author:jxx
 *Contact:283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/widesea_wms/basicinfo/Dt_AreaInfo.js此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/widesea_wms/basicinfo/Dt_needBarcode.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'areaID',
            footer: "Foots",
            cnName: '在途数据',
            name: 'basicinfo/dt_needBarcode',
            url: "/dt_needBarcode/",
            sortName: "AreaCode"
        });
        const editFormFields = ref({
            // "toArea": "",
            // "fromArea": "",
            // "barcodeType": "",
            "productLine": "",
            "inLineNum": "",
            "cacheNum":""
        });
        const editFormOptions = ref([
            // [
            //     { "title": "目标库区", "field": "toArea", type: "text" },
            //     { "title": "来源库区", "field": "fromArea", type: "text" },
            //     { "title": "托盘类型", "field": "barcodeType", type: "text" },
            // ],
            [
                { "title": "所属产线", "field": "productLine", type: "text" },
                { "title": "在途数量", "field": "inLineNum", type: "text" },
                { "title": "可缓存数量", "field": "cacheNum", type: "text" },
            ]
        ]);
        const searchFormFields = ref({});
        const searchFormOptions = ref([
            // [
            //     { "title": "目标库区", "field": "toArea", type: "text" },
            //     { "title": "来源库区", "field": "fromArea", type: "text" },
            //     { "title": "托盘类型", "field": "barcodeType", type: "text" },
            // ],
            [
                { "title": "所属产线", "field": "productLine", type: "text" },
                { "title": "在途数量", "field": "inLineNum", type: "text" },
                { "title": "可缓存数量", "field": "cacheNum", type: "text" },
            ]
        ]);
        const columns = ref([{ field: 'ID', title: '主键', type: 'int', sort: true, hidden: true, width: 110, readonly: true, require: true, align: 'left' },
        //{ field: 'toArea', title: '目标库区', type: 'string', sort: true, width: 110, require: true, align: 'left', sort: true },
        //{ field: 'fromArea', title: '来源库区', type: 'string', sort: true, width: 110, align: 'left' },
        //{ field: 'barcodeType', title: '托盘类型', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'productLine', title: '所属产线', type: 'string', sort: true, width: 110, align: 'left',},
        { field: 'inLineNum', title: '在途数量', type: 'int', sort: true, width: 110, align: 'left' },
        { field: 'cacheNum', title: '可缓存数量', type: 'int', sort: true, width: 100,  align: 'left' },
        { field: 'creater', title: '创建人', type: 'string', sort: true, width: 110, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
        { field: 'modifier', title: '修改人', type: 'string', sort: true, width: 100,  align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', sort: true, width: 150,  align: 'left', sort: true },
        ]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_StationManager.cs
@@ -109,5 +109,9 @@
        public string stationNGLocation { get; set; }
        public string remark { get; set; }
        /// <summary>
        /// äº§çº¿
        /// </summary>
        public string productLine { get; set; }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -1,4 +1,5 @@
using Masuit.Tools;
using log4net.Core;
using Masuit.Tools;
using WIDESEA_Core.Const;
using WIDESEA_DTO.MOM;
using WIDESEA_DTO.WMS;
@@ -365,6 +366,7 @@
    #region åº“位分配
    #region èŽ·å–è´§ä½
    /// <summary>
    ///
    /// </summary>
@@ -373,8 +375,6 @@
    /// <returns></returns>
    private async Task<DtLocationInfo> RequestLocation(RequestTaskDto requestTask, bool isCheckRequest = false)
    {
        #region èŽ·å–è´§ä½
        try
        {
            List<DtLocationInfo> locations;
@@ -400,8 +400,9 @@
            return null;
        }
        #endregion èŽ·å–è´§ä½
    }
    #endregion èŽ·å–è´§ä½
    #endregion åº“位分配
@@ -486,25 +487,69 @@
            return content.Error(ex.Message);
        }
    }
    #endregion
    #region å¼‚常口任务检测
    public async Task<Dt_Task> CheckAbnormalTaskAsync(RequestTaskDto input, Dt_StationManager stationManager)
    {
        try
        {
            if (stationManager.stationType == 15) throw new Exception("");
            // åˆ›å»ºä¸€ä¸ªTrayCellsStatusDto对象,并赋值
            TrayCellsStatusDto trayCells = new TrayCellsStatusDto()
            {
                Software = "WMS",
                TrayBarcode = input.PalletCode,
                //EquipmentCode = "EQ_CWJZ01"
                EquipmentCode = input.EquiCodeMOM
                EquipmentCode = input.EquiCodeMOM,
                SceneType = "1",
            };
            // è°ƒç”¨GetTrayCellStatusAsync方法,获取整盘电芯
            WebResponseContent content = await GetTrayCellStatusAsync(trayCells);
            // å¦‚果状态为false,则返回content
            if (!content.Status) throw new Exception(content.Message);
            if (!content.Status)  //先用实框正常获取整盘电芯数据, å¦‚异常 åœ¨æ¬¡ä½¿ç”¨ç©ºæ¡†ç±»åž‹å†æ¬¡èŽ·å– å†æœ‰å¼‚常则抛出
            {
                TrayCellsStatusDto trayCells_Empty = new TrayCellsStatusDto()
                {
                    Software = "WMS",
                    TrayBarcode = input.PalletCode,
                    //EquipmentCode = "EQ_CWJZ01"
                    EquipmentCode = input.EquiCodeMOM,
                    SceneType = "4"
                };
                content = await GetTrayCellStatusAsync(trayCells);
                if (!content.Status) throw new Exception(content.Message);
                if (content.Status)   //当做空框入库
                {
                    DtLocationInfo EmptylocationInfo = await RequestLocation(input);
                    if (EmptylocationInfo == null) throw new Exception("库位已满");
                    var Epmtytask = new Dt_Task
                    {
                        CurrentAddress = input.Position,
                        Grade = 3,  //优先处理异常排出口的任务 é˜²æ­¢æ­£å¸¸éœ€æŽ’出异常口的任务堵线
                        Roadway = input.Roadways,
                        TargetAddress = EmptylocationInfo.LocationCode,
                        Dispatchertime = DateTime.Now,
                        MaterialNo = "",
                        NextAddress = input.Roadways,
                        OrderNo = null,
                        PalletCode = input.PalletCode,
                        SourceAddress = stationManager.stationLocation,
                        TaskState = (int)TaskInStatusEnum.Line_InFinish,
                        TaskType = (int)TaskInboundTypeEnum.Inbound,
                        TaskNum = await BaseDal.GetTaskNo(),
                        Creater = "Systeam"
                    };
                    return Epmtytask;
                }
            }
            // æ·»åŠ ç»„ç›˜ä¿¡æ¯
            // å°†content.Data转换为ResultTrayCellsStatus对象
@@ -512,24 +557,25 @@
            if (result.SerialNos.Count <= 0)
            {
                ConsoleHelper.WriteErrorLine(result.MOMMessage);
                var taskNG = new Dt_Task
                {
                    CurrentAddress = input.Position,
                    Grade = 1,
                    Roadway = input.Roadways,
                    TargetAddress = stationManager.stationNGLocation,
                    Dispatchertime = DateTime.Now,
                    MaterialNo = "",
                    NextAddress = stationManager.stationNGChildCode,
                    OrderNo = null,
                    PalletCode = input.PalletCode,
                    SourceAddress = stationManager.stationLocation,
                    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                    TaskNum = await BaseDal.GetTaskNo(),
                    Creater = "Systeam"
                };
                return taskNG;
                throw new Exception("无电芯数据");
                //var taskNG = new Dt_Task
                //{
                //    CurrentAddress = input.Position,
                //    Grade = 1,
                //    Roadway = input.Roadways,
                //    TargetAddress = stationManager.stationNGLocation,
                //    Dispatchertime = DateTime.Now,
                //    MaterialNo = "",
                //    NextAddress = stationManager.stationNGChildCode,
                //    OrderNo = null,
                //    PalletCode = input.PalletCode,
                //    SourceAddress = stationManager.stationLocation,
                //    TaskState = (int)TaskInStatusEnum.Line_InFinish,
                //    TaskType = (int)TaskOutboundTypeEnum.InToOut,
                //    TaskNum = await BaseDal.GetTaskNo(),
                //    Creater = "Systeam"
                //};
                //return taskNG;
            }
            //Console.WriteLine(result);
@@ -558,20 +604,33 @@
            ////var processResponse = await GetProcessResponseAsync(process, input.Position);
            var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing);
            DtLocationInfo locationInfo = null;
            if (stationManager.Roadway.Contains("FR"))
            {
                locationInfo = await RequestLocation(input, true);
            }
            else
            {
                locationInfo = await RequestLocation(input);
            }
            //DtLocationInfo locationInfo = await RequestLocation(input);
            if (locationInfo == null) throw new Exception("库位已满");
            var task = new Dt_Task
            {
                CurrentAddress = input.Position,
                Grade = 1,
                Grade = 3,  //优先处理异常排出口的任务 é˜²æ­¢æ­£å¸¸éœ€æŽ’出异常口的任务堵线
                Roadway = input.Roadways,
                TargetAddress = stationManager.stationLocation,
                TargetAddress = locationInfo.LocationCode,
                Dispatchertime = DateTime.Now,
                MaterialNo = "",
                NextAddress = input.Roadways,
                OrderNo = null,
                //PalletCode = stockinfo.PalletCode,
                //SourceAddress = stockinfo.LocationCode,
                TaskState = (int)TaskOutStatusEnum.OutNew,
                TaskType = (int)TaskOutboundTypeEnum.OutTray,
                PalletCode = input.PalletCode,
                SourceAddress = stationManager.stationLocation,
                TaskState = (int)TaskInStatusEnum.Line_InFinish,
                TaskType = (int)TaskInboundTypeEnum.Inbound,
                TaskNum = await BaseDal.GetTaskNo(),
                Creater = "Systeam"
            };
@@ -766,7 +825,7 @@
        {
            Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position);
            DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(X => X.IsFull && X.AreaCode == "CWSC3" && X.ProductionLine == "ZJ-7");
            DtStockInfo stockInfo = _stockInfoRepository.QueryFirst(X => X.IsFull && X.AreaCode == "CWSC3" && X.ProductionLine == station.productLine);
            if (stockInfo == null) throw new Exception("库内无满足条件的库存可出库");
            Dt_StationManager OutStation = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1016" && x.stationType == 10);
@@ -801,4 +860,4 @@
            return content.Error($"失败:{ex.Message}");
        }
    }
}
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -1,30 +1,31 @@
{
    "Logging": {
        "LogLevel": {
            "Default": "Information",
            "Microsoft.AspNetCore": "Warning"
        }
    },
    "AllowedHosts": "*",
    "urls": "http://*:5000",
    "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
    //连接字符串
    //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
    //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    //跨域
    "Cors": {
        "PolicyName": "CorsIpAccess", //策略名称
        "EnableAllIPs": true, //当为true时,开放所有IP均可访问。
        // æ”¯æŒå¤šä¸ªåŸŸåç«¯å£ï¼Œæ³¨æ„ç«¯å£å·åŽä¸è¦å¸¦/斜杆:比如localhost:8000/,是错的
        // æ³¨æ„ï¼Œhttp://127.0.0.1:1818 å’Œ http://localhost:1818 æ˜¯ä¸ä¸€æ ·çš„
        "IPs": "http://127.0.0.1:8080,http://localhost:8080,http://127.0.0.1:8081,http://localhost:8081"
    },
    "ApiName": "WIDESEA",
    "ExpMinutes": 120,
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "urls": "http://*:5000",
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
    // éœ€è¦ç§»åº“的行
    "TransfertRows": "1,4,5,8"
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称
    "EnableAllIPs": true, //当为true时,开放所有IP均可访问。
    // æ”¯æŒå¤šä¸ªåŸŸåç«¯å£ï¼Œæ³¨æ„ç«¯å£å·åŽä¸è¦å¸¦/斜杆:比如localhost:8000/,是错的
    // æ³¨æ„ï¼Œhttp://127.0.0.1:1818 å’Œ http://localhost:1818 æ˜¯ä¸ä¸€æ ·çš„
    "IPs": "http://127.0.0.1:8080,http://localhost:8080,http://127.0.0.1:8081,http://localhost:8081"
  },
  "ApiName": "WIDESEA",
  "ExpMinutes": 120,
  // éœ€è¦ç§»åº“的行
  "TransfertRows": "1,4,5,8"
}