肖洋
2024-12-18 84b36c79f37d9d3abad3bba4ff7ea99b2cc17942
合并
已删除1个文件
已修改8个文件
已添加10个文件
719 ■■■■ 文件已修改
.gitignore 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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_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_IStorageBasicRepository/BasicInfo/IDt_needBarcodeRepository.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicInfo/Dt_StationManager.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicInfo/dt_needBarcode.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/BasicInfo/Dt_needBarcodeRepository.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_needBarcodeService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BasicInfo/Dt_StationManagerController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BasicInfo/dt_needBarcodeController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task_HtyController.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -1562,3 +1562,4 @@
*.BuildWithSkipAnalyzers
/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
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_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_IStorageBasicRepository/BasicInfo/IDt_needBarcodeRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
#region << ç‰ˆ æœ¬ æ³¨ é‡Š >>
/*----------------------------------------------------------------
 * å‘½åç©ºé—´ï¼šWIDESEAWCS_ITaskInfoRepository
 * åˆ›å»ºè€…:胡童庆
 * åˆ›å»ºæ—¶é—´ï¼š2024/8/2 16:13:36
 * ç‰ˆæœ¬ï¼šV1.0.0
 * æè¿°ï¼š
 *
 * ----------------------------------------------------------------
 * ä¿®æ”¹äººï¼š
 * ä¿®æ”¹æ—¶é—´ï¼š
 * ç‰ˆæœ¬ï¼šV1.0.1
 * ä¿®æ”¹è¯´æ˜Žï¼š
 *
 *----------------------------------------------------------------*/
#endregion << ç‰ˆ æœ¬ æ³¨ é‡Š >>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_BasicInfoRepository
{
    public interface IDt_needBarcodeRepository : IRepository<dt_needBarcode>
    {
    }
}
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_Model/Models/BasicInfo/dt_needBarcode.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using WIDESEA_Core.DB.Models;
using WIDESEA_Model.Models;
namespace WIDESEAWCS_Model.Models
{
    [SugarTable("dt_needBarcode")]
    public class dt_needBarcode : BaseEntity
    {
        [Key]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int id { get; set; }
        /// <summary>
        /// ç›®æ ‡åº“区
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "目标库区")]
        public string toArea { get; set; }
        /// <summary>
        /// æ¥æºåº“区
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "来源库区")]
        public string fromArea { get; set; }
        /// <summary>
        /// æ‰˜ç›˜ç±»åž‹
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "托盘类型")]
        public string barcodeType { get; set; }
        /// <summary>
        /// äº§çº¿
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "所属产线")]
        public string productLine {  get; set; }
        /// <summary>
        /// åœ¨é€”数量
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "在途数量")]
        public int inLineNum { get; set; }
        /// <summary>
        /// ç›®æ ‡ç¼“存数量
        /// </summary>
        [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "可缓存数量")]
        public int cacheNum { get; set; } = 0;
        /// <summary>
        /// å·²åˆ›å»ºå‡ºåº“任务数量
        /// </summary>
        //[NotMapped]
        //public int haveOutNum { get; set; } = 0;
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/BasicInfo/Dt_needBarcodeRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
#region << ç‰ˆ æœ¬ æ³¨ é‡Š >>
/*----------------------------------------------------------------
 * å‘½åç©ºé—´ï¼šWIDESEAWCS_TaskInfoRepository
 * åˆ›å»ºè€…:胡童庆
 * åˆ›å»ºæ—¶é—´ï¼š2024/8/2 16:13:36
 * ç‰ˆæœ¬ï¼šV1.0.0
 * æè¿°ï¼š
 *
 * ----------------------------------------------------------------
 * ä¿®æ”¹äººï¼š
 * ä¿®æ”¹æ—¶é—´ï¼š
 * ç‰ˆæœ¬ï¼šV1.0.1
 * ä¿®æ”¹è¯´æ˜Žï¼š
 *
 *----------------------------------------------------------------*/
#endregion << ç‰ˆ æœ¬ æ³¨ é‡Š >>
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_BasicInfoRepository
{
    public class Dt_needBarcodeRepository : RepositoryBase<dt_needBarcode>, IDt_needBarcodeRepository
    {
        public Dt_needBarcodeRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
        {
        }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/BasicInfo/Dt_needBarcodeService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using WIDESEA_IServices;
using WIDESEAWCS_BasicInfoRepository;
using WIDESEAWCS_Model.Models;
namespace WIDESEAWCS_BasicInfoService
{
    public partial class dt_needBarcodeService : ServiceBase<dt_needBarcode, IDt_needBarcodeRepository>, Idt_needBarcodeService
    {
        public dt_needBarcodeService(IDt_needBarcodeRepository BaseDal) : base(BaseDal)
        {
        }
    }
}
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 åº“位分配
@@ -493,19 +494,63 @@
    {
        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对象
@@ -513,24 +558,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);
@@ -559,20 +605,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"
            };
@@ -767,7 +826,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);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BasicInfo/Dt_StationManagerController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_BusinessServices;
using WIDESEA_Core.BaseController;
using WIDESEA_IBusinessServices;
using WIDESEA_Model.Models;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_WMSServer.Controllers
{
    [Route("api/Dt_StationManager")]
    [ApiController]
    public class Dt_StationManagerController : ApiBaseController<IDt_StationManagerService, Dt_StationManager>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public Dt_StationManagerController(IDt_StationManagerService service, IHttpContextAccessor httpContextAccessor) : base(service)
        {
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BasicInfo/dt_needBarcodeController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,22 @@
using Microsoft.AspNetCore.Mvc;
using WIDESEA_BusinessServices;
using WIDESEA_Core.BaseController;
using WIDESEA_IBusinessServices;
using WIDESEA_Model.Models;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_WMSServer.Controllers
{
    [Route("api/dt_needBarcode")]
    [ApiController]
    public class dt_needBarcodeController : ApiBaseController<Idt_needBarcodeService, dt_needBarcode>
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public dt_needBarcodeController(Idt_needBarcodeService service, IHttpContextAccessor httpContextAccessor) : base(service)
        {
            _httpContextAccessor = httpContextAccessor;
        }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Task_HtyController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
using WIDESEA_DTO;
using static WIDESEA_DTO.RequestTaskDto;
namespace WIDESEA_WMSServer.Controllers;
/// <summary>
/// ä»»åŠ¡æ“ä½œæŽ¥å£
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class Task_HtyController : ApiBaseController<IDt_Task_HtyService, Dt_Task_Hty>
{
    private readonly IHttpContextAccessor _httpContextAccessor;
    private readonly IDt_Task_HtyService _task_HtyService;
    private readonly ILocationInfoService _locationService;
    public Task_HtyController(IDt_Task_HtyService task_HtyService,
        IHttpContextAccessor httpContextAccessor,
        ILocationInfoService locationService) : base(task_HtyService)
    {
        _httpContextAccessor = httpContextAccessor;
        _task_HtyService = task_HtyService;
        _locationService = locationService;
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
ÎļþÒÑɾ³ý