| | |
| | | *.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 |
| | |
| | | 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 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *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> |
| | |
| | | |
| | | public string stationStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产线 |
| | | /// </summary> |
| | | public string productLine { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEAWCS_Model.Models |
| | | { |
| | | [SugarTable(nameof(dt_needBarcode), "å¨éæ°æ®")] |
| | | |
| | | public class dt_needBarcode : BaseEntity |
| | | { |
| | | [Key] |
| | |
| | | /// </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; } |
| | | } |
| | | } |
| | |
| | | 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) |
| | |
| | | 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); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | 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 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #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> |
| | | { |
| | | |
| | | } |
| | | } |
| | |
| | | public string stationNGLocation { get; set; } |
| | | public string remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产线 |
| | | /// </summary> |
| | | public string productLine { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #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) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using Masuit.Tools; |
| | | using log4net.Core; |
| | | using Masuit.Tools; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_DTO.MOM; |
| | | using WIDESEA_DTO.WMS; |
| | |
| | | |
| | | #region åºä½åé
|
| | | |
| | | #region è·åè´§ä½ |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | /// <returns></returns> |
| | | private async Task<DtLocationInfo> RequestLocation(RequestTaskDto requestTask, bool isCheckRequest = false) |
| | | { |
| | | #region è·åè´§ä½ |
| | | |
| | | try |
| | | { |
| | | List<DtLocationInfo> locations; |
| | |
| | | return null; |
| | | } |
| | | |
| | | #endregion è·åè´§ä½ |
| | | } |
| | | #endregion è·åè´§ä½ |
| | | |
| | | |
| | | #endregion åºä½åé
|
| | | |
| | |
| | | { |
| | | 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对象 |
| | |
| | | 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); |
| | |
| | | ////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" |
| | | }; |
| | |
| | | { |
| | | 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); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |