| | |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: item.StationDeviceCode, roadwayNo: responseContent.Data.ToString() ?? ""); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (conveyorLineInfoWrite.Spare2 != 0) |
| | | { |
| | | WriteDebug(device.DeviceName, $"å¯å¨ä¿¡å·å·²åå
¥"); |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | _taskService.UpdateTask(task, taskState, currentAddress: currentAddress, nextAddress: nextAddress, targetAddress: targetAddress, deviceCode: deviceCode); |
| | | } |
| | | else |
| | | { |
| | | WriteInfo(device.DeviceName, $"æªæ¾å°æç{conveyorLineInfoRead.Barcode}对åºçä»»å¡ä¿¡æ¯"); |
| | | } |
| | | #endregion |
| | | } |
| | | else//ç产éåº |
| | |
| | | Dt_StationManger stationManger = _stationMangerRepository.QueryFirst(x => x.StackerCraneStationCode == task.NextAddress); |
| | | if (stationManger == null) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | //_taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | _taskService.UpdateTaskExceptionMessage(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | WriteInfo(deviceCode, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | WriteError(deviceCode, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | return WebResponseContent.Instance.Error($"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | } |
| | | Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode); |
| | | if (router == null) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | //_taskExecuteDetailService.AddTaskExecuteDetail(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | _taskService.UpdateTaskExceptionMessage(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | WriteError(deviceCode, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | } |
| | | |
| | |
| | | stackerCraneTaskCommand.Barcode = task.PalletCode; |
| | | stackerCraneTaskCommand.TaskNum = task.TaskNum; |
| | | stackerCraneTaskCommand.WorkType = 1; |
| | | stackerCraneTaskCommand.TrayType = (Int16)task.PalletType; |
| | | stackerCraneTaskCommand.TrayType = (short)task.PalletType; |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//夿æ¯å¦æ¯å
¥åºä»»å¡ |
| | | { |
| | | string[] startCodes = task.CurrentAddress.Split("-"); |
| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "æ§è¡åºåº", |
| | | icon: '', |
| | | class: '', |
| | | value: 'ExecuteOutbound', |
| | | type: 'success', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | export default buttons |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetailBox" |
| | | :lazy="true" |
| | | width="60%" |
| | | :padding="15" |
| | | title="Mesåºåºå(æ°å»º)" |
| | | > |
| | | <div> |
| | | <el-form :inline="true" :model="formData" ref="formData"> |
| | | <el-form-item |
| | | label="æå±ä»åº:" |
| | | style="width: 30%" |
| | | required |
| | | prop="warehouseId" |
| | | > |
| | | <el-select v-model="formData.warehouseId" placeholder="è¯·éæ©ä»åº"> |
| | | <el-option label="æ¿æä»" value="3"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="ç©æç¼ç :" |
| | | style="width: 30%" |
| | | required |
| | | prop="materialCode" |
| | | > |
| | | <el-input |
| | | v-model="formData.materialCode" |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="åºåºæ°é:" |
| | | style="width: 30%" |
| | | required |
| | | prop="num" |
| | | > |
| | | <el-input-number |
| | | v-model="formData.num" |
| | | :min="1" |
| | | label="请è¾å
¥åºåºæ°é" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="åºåºå°å:" |
| | | style="width: 30%" |
| | | required |
| | | prop="outAddress" |
| | | > |
| | | <el-select |
| | | v-model="formData.outAddress" |
| | | placeholder="è¯·éæ©åºåºå°å" |
| | | > |
| | | <el-option label="ä¸å··éäºå±ä¸æä½" value="1011"></el-option> |
| | | <el-option label="SCUTL-001" value="SCUTL-001"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ä»åº"> |
| | | <el-col :span="8"> |
| | | <el-select v-model="warehouseId" placeholder="è¯·éæ©ä»åº"> |
| | | <el-option label="æ¿æä»" value="3"></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <el-button type="primary" size="small" @click="add">ç¡®å®</el-button> |
| | | <el-button type="danger" size="small" @click="showDetailBox = false" |
| | | >å
³é</el-button |
| | | > |
| | | </template> |
| | | </vol-box> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | return { |
| | | showDetailBox: false, |
| | | formData: { |
| | | warehouseId: "", |
| | | materialCode: "", |
| | | num: 1, |
| | | outAddress: "", |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.showDetailBox = true; |
| | | }, |
| | | add() { |
| | | var params = { |
| | | //warehouseId: this.formData.warehouseId, |
| | | materialCode: this.formData.materialCode, |
| | | requiredQuantity: this.formData.num, |
| | | line: this.formData.outAddress, |
| | | }; |
| | | |
| | | this.http |
| | | .post("/api/mesOutboundOrder/AddMesOrder", params, "æ°æ®å¤çä¸...") |
| | | .then((res) => { |
| | | if (!res.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetailBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.refresh(); |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .less-style { |
| | | color: black; |
| | | } |
| | | |
| | | .equle-style { |
| | | color: green; |
| | | } |
| | | |
| | | .more-style { |
| | | color: red; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .text-button:hover { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: #f0f9eb; |
| | | } |
| | | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | |
| | | .box-head .el-alert__content { |
| | | width: 100%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/addMesOutOrder.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | |
| | | let addButton = this.buttons.find(item => item.value == 'Add'); |
| | | if (addButton) { |
| | | addButton.onClick = () => { |
| | | this.$refs.gridBody.open(); |
| | | } |
| | | } |
| | | |
| | | let executeOutbound = this.buttons.find(item => item.value == 'ExecuteOutbound'); |
| | | if (executeOutbound) { |
| | | executeOutbound.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/HandSubstrateOut?orderId=" + rows[0].id, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('æ°æ®å¤çæå.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/outboundOrderDetail.js"; |
| | | import extend from "@/extension/outbound/mesOutboundOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | |
| | | /// </summary> |
| | | [Description("åºæ¿ä½æéåº")] |
| | | SubstrateBack = 200, |
| | | |
| | | /// <summary> |
| | | /// æå¨åºæ¿åºåº |
| | | /// </summary> |
| | | [Description("æå¨åºæ¿åºåº")] |
| | | HandSubstrateOut = 300, |
| | | |
| | | /// <summary> |
| | | /// æå¨åºæ¿åºåºæ£é |
| | | /// </summary> |
| | | [Description("æå¨åºæ¿åºåºæ£é")] |
| | | HandSubstrateOutPick = 400, |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("MESåºåº")] |
| | | MesOutbound = 200, |
| | | |
| | | /// <summary> |
| | | /// MESæå¨åºåº |
| | | /// </summary> |
| | | [Description("MESæå¨åºåº")] |
| | | MesHandOutbound = 210, |
| | | |
| | | /// <summary> |
| | | /// MESæå¨æ£éåºåº |
| | | /// </summary> |
| | | [Description("MESæå¨æ£éåºåº")] |
| | | MesHandPickOutbound = 220, |
| | | |
| | | /// <summary> |
| | | /// éè´å
¥åº |
| | | /// </summary> |
| | |
| | | /// <param name="tasks"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="substrateOutModel"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent AddMesOrder(SubstrateOutModel substrateOutModel); |
| | | } |
| | | } |
| | |
| | | WebResponseContent AssignRoadway(List<string> roadwayNos); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent HandSubstrateOut(int orderId); |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹ä»»å¡ç¶æ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent UpdateTaskInfo(WCSTaskDTO task); |
| | | |
| | | |
| | | WebResponseContent GeneratePKOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews); |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent AddMesOrder(SubstrateOutModel substrateOutModel) |
| | | { |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA57.ToString()); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"ä»åºåºç¡ä¿¡æ¯æªé
ç½®"); |
| | | } |
| | | |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == substrateOutModel.MaterialCode); |
| | | if (materielInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥ç©æä¿¡æ¯"); |
| | | } |
| | | int orderType = 0; |
| | | if(substrateOutModel.Line == "1011") |
| | | { |
| | | orderType = MesOutboundOrderTypeEnum.HandSubstrateOutPick.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | orderType = MesOutboundOrderTypeEnum.HandSubstrateOut.ObjToInt(); |
| | | } |
| | | |
| | | Dt_MesOutboundOrder mesOutboundOrder = new Dt_MesOutboundOrder() |
| | | { |
| | | CreateType = OrderCreateTypeEnum.CreateInSystem.ObjToInt(), |
| | | Line = substrateOutModel.Line, |
| | | MaterialCode = substrateOutModel.MaterialCode, |
| | | MaterialName = materielInfo.MaterielName, |
| | | OrderQuantity = substrateOutModel.RequiredQuantity, |
| | | TaskNo = DateTime.Now.ToString("yyyyMMddHHmmss"), |
| | | Unit = substrateOutModel.Unit, |
| | | OrderType = orderType, |
| | | OrderStatus = OutOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | WarehouseId = warehouse.WarehouseId |
| | | }; |
| | | |
| | | AddData(mesOutboundOrder); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Common.TaskEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | |
| | | /// <param name="taskNum">ä»»å¡å·</param> |
| | | /// <param name="roadwayNos">å··éå·</param> |
| | | /// <returns></returns> |
| | | public WebResponseContent AssignRoadway(List<string> roadwayNos, int taskNum, int heightType = 0) |
| | | public WebResponseContent AssignRoadway(List<string> roadwayNos, int taskNum, int heightType = 0) |
| | | { |
| | | try |
| | | { |
| | | if(heightType == 0 || heightType > 3) |
| | | if (heightType == 0 || heightType > 3) |
| | | { |
| | | return WebResponseContent.Instance.Error($"é«åº¦é误"); |
| | | } |
| | |
| | | List<LocationCount> locationCounts = Db.Queryable<Dt_LocationInfo>().Where(x => (x.LocationType == task.PalletType || x.LocationType == LocationTypeEnum.Undefined.ObjToInt()) && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && roadwayNos.Contains(x.RoadwayNo)).GroupBy(x => x.RoadwayNo).Select(x => new LocationCount { RoadwayNo = x.RoadwayNo, Count = SqlFunc.AggregateCount(x) }).ToList(); |
| | | |
| | | string roadwayNo = locationCounts.OrderBy(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; |
| | | |
| | | return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo): WebResponseContent.Instance.Error("æªæ¾å°å¯åé
å··é"); |
| | | |
| | | return !string.IsNullOrEmpty(roadwayNo) ? WebResponseContent.Instance.OK(data: roadwayNo) : WebResponseContent.Instance.Error("æªæ¾å°å¯åé
å··é"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public class LocationCount |
| | | public WebResponseContent HandSubstrateOut(int orderId) |
| | | { |
| | | public string RoadwayNo { get; set; } |
| | | try |
| | | { |
| | | Dt_MesOutboundOrder mesOutboundOrder = _outboundService.MesOutboundOrderService.Repository.QueryFirst(x => x.Id == orderId); |
| | | if (mesOutboundOrder == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥è®¢å"); |
| | | } |
| | | |
| | | public int Count { get; set; } |
| | | if (mesOutboundOrder.OrderStatus != OutOrderStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该订åä¸å¯ååºåº"); |
| | | } |
| | | |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | (List<Dt_StockInfo>, Dt_MesOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesOutboundOrderService.AssignStockOutbound(mesOutboundOrder); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound); |
| | | result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | |
| | | stockInfos = result.Item1; |
| | | mesOutboundOrder = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | } |
| | | } |
| | | |
| | | tasks.ForEach(x => |
| | | { |
| | | if (mesOutboundOrder.OrderType == MesOutboundOrderTypeEnum.HandSubstrateOut.ObjToInt()) |
| | | { |
| | | x.TaskType = TaskTypeEnum.MesHandOutbound.ObjToInt(); |
| | | } |
| | | else if (mesOutboundOrder.OrderType == MesOutboundOrderTypeEnum.HandSubstrateOutPick.ObjToInt()) |
| | | { |
| | | x.TaskType = TaskTypeEnum.MesHandPickOutbound.ObjToInt(); |
| | | } |
| | | }); |
| | | |
| | | mesOutboundOrder.OrderStatus = OutOrderStatusEnum.åºåºä¸.ObjToInt(); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | int id = BaseDal.AddData(tasks); |
| | | outStockLockInfos.ForEach(x => |
| | | { |
| | | x.OrderNo = mesOutboundOrder.TaskNo; |
| | | x.OrderDetailId = id; |
| | | }); |
| | | _outboundService.MesOutboundOrderService.Repository.UpdateData(mesOutboundOrder); |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) |
| | | { |
| | | WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(content.Message); |
| | | } |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public class LocationCount |
| | | { |
| | | public string RoadwayNo { get; set; } |
| | | |
| | | public int Count { get; set; } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (task.TaskType == TaskTypeEnum.MesOutbound.ObjToInt()) |
| | | { |
| | | MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, mesOutboundOrders.FirstOrDefault().OrderQuantity); |
| | | MesMaterialLotaAceptModel model = GetMesMaterialLotaAceptModel(stockInfo, stockInfo.Details.FirstOrDefault(), mesOutboundOrders.FirstOrDefault().TaskNo, warehouse.WarehouseCode, stockInfo.Details.Where(x => x.MaterielCode == mesOutboundOrders.FirstOrDefault().MaterialCode).Sum(x => x.StockQuantity)); |
| | | UploadMesMaterialLotaAcept(model); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="substrateOutModel"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("AddMesOrder"), AllowAnonymous] |
| | | public WebResponseContent AddMesOrder([FromBody] SubstrateOutModel substrateOutModel) |
| | | { |
| | | return Service.AddMesOrder(substrateOutModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestOutUpload"), AllowAnonymous] |
| | | public WebResponseContent TestOutUpload(int id) |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="orderId"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("HandSubstrateOut")] |
| | | public WebResponseContent HandSubstrateOut(int orderId) |
| | | { |
| | | return Service.HandSubstrateOut(orderId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹ä»»å¡ç¶æ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | |
| | | let config = { |
| | | baseUrl: 'http://10.30.4.92:9283', |
| | | baseUrl: 'http://localhost:9293', |
| | | urls: [ |
| | | 'http://10.30.4.92:9283', |
| | | 'http://10.30.4.92:9283' |