| | |
| | | } |
| | | } |
| | | |
| | | #region è¾é线请æ±å
¥åºä¸ä¸å°å |
| | | |
| | | /// <summary> |
| | | /// è¾é线请æ±å
¥åºä¸ä¸å°å |
| | | /// </summary> |
| | | /// <param name="conveyorLine">è¾é线å®ä¾å¯¹è±¡</param> |
| | | /// <param name="command">读åç请æ±ä¿¡æ¯</param> |
| | | /// <param name="childDeviceCode">å设å¤ç¼å·</param> |
| | | public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) |
| | | { |
| | | Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | if (newTask != null) |
| | | { |
| | | ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(newTask); |
| | | taskCommand.InteractiveSignal = command.InteractiveSignal; |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | } |
| | | } |
| | | } |
| | | //public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) |
| | | //{ |
| | | // Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode); |
| | | // if (task != null) |
| | | // { |
| | | // Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | // if (newTask != null) |
| | | // { |
| | | // ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(newTask); |
| | | // taskCommand.InteractiveSignal = command.InteractiveSignal; |
| | | // conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// è¾é线å
¥åºå®æ |
| | |
| | | //conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, 0, childDeviceCode); |
| | | WebResponseContent content = _taskService.UpdateTaskStatusToNext(task); |
| | | |
| | | Console.Out.WriteLine(content.Serialize()); |
| | | //Console.Out.WriteLine(content.Serialize()); |
| | | } |
| | | } |
| | | |
| | |
| | | taskCommand.TargetAddress = 0; |
| | | } |
| | | |
| | | |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | | content = _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// çæµç©ºæçå®çåºåº |
| | |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | if (tasks.Count < index) |
| | | { |
| | | #region è°ç¨WMSè·ååºåºä»»å¡ |
| | | |
| | | WMSTaskDTO taskDTO = new WMSTaskDTO(); |
| | | object dynamic = new |
| | | { |
| | |
| | | return; |
| | | |
| | | taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString()); |
| | | |
| | | #endregion |
| | | |
| | | CreateAndSendTask(taskDTO); |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¾é线交äºå®æ |
| | | /// </summary> |
| | |
| | | CommonStackerCrane commonStackerCrane = (CommonStackerCrane)context.JobDetail.JobDataMap.Get("JobParams"); |
| | | if (commonStackerCrane != null) |
| | | { |
| | | //EqptRun(commonStackerCrane); |
| | | //EqptAlive(commonStackerCrane); |
| | | //EqptStatus(commonStackerCrane); |
| | | //Console.Out.WriteLine(commonStackerCrane.DeviceName); |
| | | if (!commonStackerCrane.IsEventSubscribed) |
| | | { |
| | |
| | | return stackerCraneTaskCommand; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设å¤ä¸MOMç³»ç»å¯¹æ¥ï¼è®¾å¤ä¸çº¿ |
| | | /// </summary> |
| | | /// <param name="commonStackerCrane"></param> |
| | | public async void EqptRun(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | if (!commonStackerCrane.StackerOnline) |
| | | { |
| | | RequestEqptRunDto request = new RequestEqptRunDto() |
| | | { |
| | | EmployeeNo = "T00001", |
| | | EquipmentCode = commonStackerCrane.DeviceCode, |
| | | RequestTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), |
| | | SessionId = Guid.NewGuid().ToString(), |
| | | Software = commonStackerCrane.DeviceName, |
| | | Password = "12345", |
| | | EquipmentModel = "1" |
| | | }; |
| | | var respone = await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptRun", request.ToJsonString()); |
| | | if (respone != null) |
| | | { |
| | | var result = JsonConvert.DeserializeObject<ResponseEqptRunDto>(respone); |
| | | if (result != null && result.Success) |
| | | { |
| | | var process = _processRepository.QueryData(x => x.EquipmentName == commonStackerCrane.DeviceCode).FirstOrDefault(); |
| | | if (process == null) |
| | | { |
| | | ResponeRunDto runDto = JsonConvert.DeserializeObject<ResponeRunDto>(respone); |
| | | process = new Dt_EquipmentProcess() |
| | | { |
| | | EquipmentName = commonStackerCrane.DeviceCode, |
| | | EquipmentType = new string(commonStackerCrane.DeviceName.TakeWhile(c => !char.IsDigit(c)).ToArray()), |
| | | WipOrderNo = runDto.WipOrderNo, |
| | | ProductDesc = runDto.ProductDesc, |
| | | ProcessValue = JsonConvert.SerializeObject(result) |
| | | }; |
| | | var isResult = await _processRepository.AddDataAsync(process) > 0; |
| | | } |
| | | else |
| | | { |
| | | process.ProcessValue = JsonConvert.SerializeObject(result); |
| | | var isResult = await _processRepository.UpdateDataAsync(process); |
| | | } |
| | | commonStackerCrane.StackerOnline = true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设å¤å¿è·³ |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设å¤ç¶æ |
| | | /// </summary> |
| | | /// <param name="commonStackerCrane"></param> |
| | | public async void EqptStatus(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | string code = string.Empty; |
| | | RequestAlertDto requestAlert = new RequestAlertDto() |
| | | { |
| | | EmployeeNo = "T00001", |
| | | EquipmentCode = commonStackerCrane.DeviceCode, |
| | | RequestTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), |
| | | SessionId = Guid.NewGuid().ToString(), |
| | | Software = commonStackerCrane.DeviceName, |
| | | AlertInfo = new List<AlertInfoDto>() |
| | | }; |
| | | switch (commonStackerCrane.Status) |
| | | { |
| | | case DeviceStatus.Idle: |
| | | code = "Waiting"; |
| | | break; |
| | | |
| | | case DeviceStatus.Working: |
| | | code = "Running"; |
| | | break; |
| | | |
| | | case DeviceStatus.Fault: |
| | | code = "Alerting"; |
| | | var alert = new AlertInfoDto() |
| | | { |
| | | AlertCode = "1001", |
| | | AlertDescription = commonStackerCrane.StackerCraneStatusDes, |
| | | AlertReset = "1" |
| | | }; |
| | | requestAlert.AlertInfo.Add(alert); |
| | | |
| | | await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptAlive", requestAlert.ToJsonString()); |
| | | |
| | | break; |
| | | |
| | | case DeviceStatus.Unkonw: |
| | | code = "Down"; |
| | | break; |
| | | |
| | | case DeviceStatus.Offline: |
| | | code = "Maintenance"; |
| | | break; |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | if (code != "Alerting") |
| | | { |
| | | requestAlert.AlertInfo = new List<AlertInfoDto>(); |
| | | var alert = new AlertInfoDto() |
| | | { |
| | | AlertCode = "1001", |
| | | AlertDescription = commonStackerCrane.StackerCraneStatusDes, |
| | | AlertReset = "0" |
| | | }; |
| | | var S= await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptAlive", requestAlert.ToJsonString()); |
| | | WriteInfo("EqptAlive", S); |
| | | } |
| | | RequestEqptStatusDto requestEqptStatus = new RequestEqptStatusDto() |
| | | { |
| | | EmployeeNo = "T00001", |
| | | EquipmentCode = "ECH001-B", |
| | | RequestTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), |
| | | SessionId = Guid.NewGuid().ToString(), |
| | | Software = commonStackerCrane.DeviceName, |
| | | ChangeTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), |
| | | Description = commonStackerCrane.StackerCraneStatusDes, |
| | | LocationID = "NA", |
| | | ReasonCode = "123", |
| | | StatusCode = code |
| | | }; |
| | | var respone = await HttpHelper.PostAsync("http://ts-momapp01:12020/api/MachineIntegration/EqptStatus", requestEqptStatus.ToJsonString()); |
| | | WriteInfo("EqptStatus", respone); |
| | | } |
| | | } |
| | | } |
| | |
| | | meta: { |
| | | keepAlive: false |
| | | } |
| | | }, |
| | | { |
| | | path: '/ProductionModel', |
| | | name: 'ProductionModel', |
| | | component: () => import('@/views/widesea_wms/MOM/ProductionModel.vue'), |
| | | meta: { |
| | | keepAlive: false |
| | | } |
| | | } |
| | | ] |
| | | export default tables |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box v-model="showDetialBox" :lazy="true" :height="350" :width="600" :padding="15" title="ææ¡å±æ§ç»´æ¤"> |
| | | <el-form :inline="true" :model="TrayBarcodePropertys" label-width="auto" class="demo-form-inline"> |
| | | <el-form-item label="ææ¡å±æ§:"> |
| | | <el-input v-model="TrayBarcodePropertys.TrayBarcodeProperty" placeholder="ææ¡å±æ§" /> |
| | | </el-form-item> |
| | | <el-form-item label="æç容é:"> |
| | | <el-input v-model="TrayBarcodePropertys.Capacity" placeholder="æç容é" /> |
| | | </el-form-item> |
| | | <el-button @click="addProductType" type="primary">æ·»å 产åå·¥åº</el-button> |
| | | <el-button @click="save" type="success">æäº¤æ°æ®</el-button> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å·¥åº:" v-for="(input, index) in TrayBarcodePropertys.ProcessCodes" |
| | | :key="index"> |
| | | <el-input v-model="input.ProcessCode" placeholder="å·¥åº" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="产åç±»å:" v-for="(input, index) in TrayBarcodePropertys.ProductTypes" |
| | | :key="index"> |
| | | <el-input v-model="input.ProductType" placeholder="产åç±»å" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </vol-box> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import http from "@/../src/api/http.js"; |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | | return { |
| | | showDetialBox: false, |
| | | TrayBarcodePropertys: { |
| | | TrayBarcodeProperty: '', |
| | | Capacity: 0, |
| | | ProcessCodes: [{ ProcessCode: '', }], |
| | | ProductTypes: [{ ProductType: '', }] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | addProductType() { |
| | | this.TrayBarcodePropertys.ProductTypes.push({ ProductType: '' }) |
| | | this.TrayBarcodePropertys.ProcessCodes.push({ ProcessCode: '' }) |
| | | }, |
| | | open() { |
| | | this.showDetialBox = true |
| | | }, |
| | | save() { |
| | | console.log(this.TrayBarcodePropertys) |
| | | let data = ({...this.TrayBarcodePropertys, ProcessCodes:JSON.stringify(this.TrayBarcodePropertys.ProcessCodes) , ProductTypes:JSON.stringify(this.TrayBarcodePropertys.ProductTypes)}); |
| | | |
| | | debugger; |
| | | http.post('api/Production/AddData', data).then(res => { |
| | | if (res.code == 200) { |
| | | // ElMessage.success(res.msg) |
| | | this.$message.success('æ·»å æå') |
| | | this.$parent.load(); |
| | | } else { |
| | | // ElMessage.error(res.msg) |
| | | this.$message.error(x.message) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /***************************************************************************************** |
| | | ** Author:jxx 2022 |
| | | ** QQ:283591387 |
| | | **宿´ææ¡£è§ï¼http://v2.volcore.xyz/document/api ã代ç çæé¡µé¢ViewGridã |
| | | **常ç¨ç¤ºä¾è§ï¼http://v2.volcore.xyz/document/vueDev |
| | | **åå°æä½è§ï¼http://v2.volcore.xyz/document/netCoreDev |
| | | *****************************************************************************************/ |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from "./Extend/Add.vue"; //èªå®ä¹æ©å±æ¥è¯¢çé¢ä¸è¡¨æ ¼ä½ç»ä»¶ |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { //æ¡æ¶åå§åé
ç½®åï¼ |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | this.buttons.unshift({ //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |
| | | name: 'æé®', //æé®åç§° |
| | | icon: 'el-icon-document', //æé®å¾æ vue2çæ¬è§iviewææ¡£iconï¼vue3çæ¬è§element uiææ¡£icon(注æä¸æ¯element pulsææ¡£) |
| | | type: 'primary', //æé®æ ·å¼vue2çæ¬è§iviewææ¡£buttonï¼vue3çæ¬è§element uiææ¡£button |
| | | onClick: function () { |
| | | console.log("ð ~ onInit ~ gridBody:", gridBody) |
| | | this.$refs.gridBody.open(); |
| | | } |
| | | }); |
| | | |
| | | //示ä¾ï¼è®¾ç½®ä¿®æ¹æ°å»ºãç¼è¾å¼¹åºæ¡å段æ ç¾çé¿åº¦ |
| | | this.boxOptions.labelWidth = 150; |
| | | }, |
| | | 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; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *Authorï¼jxx |
| | | *Contactï¼283591387@qq.com |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wms/material/Dt_MaterielInfo.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 "./ProductionModel.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'materielID', |
| | | footer: "Foots", |
| | | cnName: 'ææ¡å±æ§', |
| | | name: 'ProductionModel', |
| | | url: "/Production/", |
| | | sortName: "MaterielID" |
| | | }); |
| | | const editFormFields = ref({ |
| | | "TrayBarcodeProperty": "", |
| | | "Capacity": "", |
| | | |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { "title": "ææ¡å±æ§", "field": "TrayBarcodeProperty", type: "text" }, |
| | | { "title": "æç容é", "field": "Capacity", type: "text" }, |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({}); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { "title": "ææ¡å±æ§", "field": "TrayBarcodeProperty", type: "text" }, |
| | | { "title": "æç容é", "field": "Capacity", type: "text" }, |
| | | ] |
| | | ]); |
| | | const columns = ref([{ field: 'id', title: 'ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' }, |
| | | { field: 'trayBarcodeProperty', title: 'ææ¡å±æ§', type: 'string', width: 110, align: 'left', sort: true }, |
| | | { field: 'processCodes', title: 'å·¥åºéå', type: 'string', width: 120, align: 'left' }, |
| | | { field: 'productTypes', title: 'ç©æç¼ç /å·¥èºåå·éå', type: 'string', width: 110, align: 'left' }, |
| | | { field: 'capacity', title: 'æç容é', type: 'string', width: 110, align: 'left' }]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "#detailTable", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "" |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | { |
| | | // ä½¿ç¨ myScopedService æ§è¡ä»»å¡ |
| | | |
| | | //await DBSeed.SeedAsync(_dbContext, _webRootPath); |
| | | await DBSeed.SeedAsync(_dbContext, _webRootPath); |
| | | |
| | | //å¤ç§æ· 忥 |
| | | //await DBSeed.TenantSeedAsync(_dbContext); |
ÎļþÃû´Ó Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/ResultTrayCellsStatus.cs ÐÞ¸Ä |
| | |
| | | namespace WIDESEA_DTO.MOM |
| | | { |
| | | /// <summary> |
| | | /// æççµè¯ç¶æ |
| | | /// </summary> |
| | | public class ResultTrayCellsStatus : BasicResult |
| | | { |
| | | /// <summary> |
| | |
| | | /// çµè¯å表 |
| | | /// </summary> |
| | | public List<SerialNoDto> SerialNos { get; set; } = new List<SerialNoDto>(); |
| | | |
| | | /// <summary> |
| | | /// ç»å®ä»£ç |
| | | /// </summary> |
| | | public string BindCode { get; set; } |
| | | |
| | | public string TrayStatus { get; set; } |
| | | /// <summary> |
| | | /// ç产产线 |
| | | /// </summary> |
| | | public string ProductionLine { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å½åå·¥èºå·¥åºä»£ç |
| | | /// </summary> |
| | | public string ProcessCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææ¡å±æ§å表 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public int PositionNo { get; set; } |
| | | |
| | | public string BindCode { get; set; } |
| | | //public string BindCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çµè¯ç¶æ |
| | |
| | | /// </summary> |
| | | public List<ProcessCodes> ProcessCodes { get; set; } = new List<ProcessCodes>(); |
| | | |
| | | /// <summary> |
| | | /// æç容é |
| | | /// </summary> |
| | | public double Capacity { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éç¨ç©æç¼ç /å·¥èºåå· |
| | |
| | | |
| | | public class ProcessCodes |
| | | { |
| | | |
| | | /// <summary> |
| | | /// å·¥åº |
| | | /// </summary> |
| | |
| | | |
| | | public class ProductTypes |
| | | { |
| | | |
| | | /// <summary> |
| | | /// éç¨ç©æç¼ç /å·¥èºåå· |
| | | /// </summary> |
| | | public string ProductType { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | namespace WIDESEA_DTO.MOM |
| | | { |
| | | /// <summary> |
| | | /// å
¥åº |
| | | /// </summary> |
| | | public class ResponeAgingInputDto : BasicResult |
| | | { |
| | | /// <summary> |
| | |
| | | public string BindCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç产产线 |
| | | /// </summary> |
| | | public string ProductionLine { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
³èå·¥åºè¿åæ¶é´ï¼è®°å½æ³¨æ¶²æéç½®æ¶é¿ã |
| | | /// </summary> |
| | | public string LinedProcessFeedbackTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ°çæ¬ä¿¡æ¯ |
| | | /// </summary> |
| | | public string ParamVersion { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦éè¦è¯»ååæ° |
| | | /// </summary> |
| | | public bool ParamRefreshFlag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ°ä¿¡æ¯æ°ç» |
| | | /// </summary> |
| | | public List<ParameterInfoDto> ParameterInfo { get; set; } = new List<ParameterInfoDto>(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
³èå·¥åºè¿åæ¶é´ï¼æ³¨æ¶²\éç½®æ¶é¿ï¼ |
| | | /// </summary> |
| | | public string LinedProcessFeedbackTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
³èå·¥åºè¿åæ¶é´ï¼æ³¨æ¶²\éç½®æ¶é¿ï¼ |
| | | /// </summary> |
| | | public string LinedProcessFeedbackTimes { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåç¼ç |
| | |
| | | /// è´§ä½æ°æ® |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LocationInfo")] |
| | | [Navigate(NavigateType.OneToOne,nameof(LocationCode), nameof(DtLocationInfo.LocationCode))] |
| | | [Navigate(NavigateType.OneToOne, nameof(LocationCode), nameof(DtLocationInfo.LocationCode))] |
| | | public DtLocationInfo? LocationInfo { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Newtonsoft.Json; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// 表示ç产è¿ç¨ä¸çææ¡å±æ§åç¸å
³å·¥åºä¿¡æ¯ç模åã |
| | | /// </summary> |
| | | [SugarTable("ProductionModel", "ææ¡å±æ§")] |
| | | public class ProductionModel : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// å¤ æ³¨:主é®ï¼èªå¨å¢é¿ |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®ï¼èªå¨å¢é¿")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ææ¡å±æ§ï¼ç¨äºæ è¯ææ¡çå¯ä¸å±æ§ã |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "TrayBarcodeProperty", ColumnDescription = "ææ¡å±æ§", IsNullable = false)] |
| | | public string TrayBarcodeProperty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·¥åºéåï¼å
嫿æç¸å
³çå·¥åºä»£ç ã |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ProcessCodes", ColumnDescription = "å·¥åºéå", IsNullable = false, Length = int.MaxValue)] |
| | | public string ProcessCodes { get; set; } |
| | | |
| | | /// <summary> |
| | | /// éç¨ç©æç¼ç /å·¥èºåå·éåï¼å
嫿æç¸å
³çç©æç¼ç æå·¥èºåå·ã |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ProductTypes", ColumnDescription = "éç¨ç©æç¼ç ", IsNullable = false, Length = int.MaxValue)] |
| | | public string ProductTypes { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æç容éï¼è¡¨ç¤ºææ¡å¯ä»¥æ¿è½½çæå¤§ç©åæ°éã |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Capacity", ColumnDescription = "æç容é", IsNullable = false)] |
| | | public int Capacity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®å·¥åºéåï¼ååºååJSONå符串为List<ProcessCodes>ã |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public List<ProcessCodesDTO> GetProcessCodes |
| | | { |
| | | get { return JsonConvert.DeserializeObject<List<ProcessCodesDTO>>(ProcessCodes); } |
| | | set { ProcessCodes = JsonConvert.SerializeObject(value); } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæè®¾ç½®éç¨ç©æç¼ç /å·¥èºåå·éåï¼ååºååJSONå符串为List<string>ã |
| | | /// </summary> |
| | | [SugarColumn(IsIgnore = true)] |
| | | public List<ProductTypesDTO> GetProductTypes |
| | | { |
| | | get { return JsonConvert.DeserializeObject<List<ProductTypesDTO>>(ProductTypes); } |
| | | set { ProductTypes = JsonConvert.SerializeObject(value); } |
| | | } |
| | | } |
| | | |
| | | public class ProcessCodesDTO |
| | | { |
| | | /// <summary> |
| | | /// å·¥åº |
| | | /// </summary> |
| | | public string ProcessCode { get; set; } |
| | | } |
| | | |
| | | public class ProductTypesDTO |
| | | { |
| | | /// <summary> |
| | | /// éç¨ç©æç¼ç /å·¥èºåå· |
| | | /// </summary> |
| | | public string ProductType { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_StorageBasicRepository |
| | | { |
| | | public interface IProductionRepository : IRepository<ProductionModel> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_StorageBasicRepository |
| | | { |
| | | public class ProductionRepository : RepositoryBase<ProductionModel>, IProductionRepository |
| | | { |
| | | public ProductionRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | namespace WIDESEA_StorageBasicServices; |
| | | |
| | | public interface IProductionService : IService<ProductionModel> |
| | | { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using WIDESEA_StorageBasicRepository; |
| | | |
| | | namespace WIDESEA_StorageBasicServices; |
| | | |
| | | public class ProductionService : ServiceBase<ProductionModel, IProductionRepository>, IProductionService |
| | | { |
| | | public ProductionService(IProductionRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | } |
| | |
| | | private readonly IProcessApplyService _processApplyService; //å·¥èºè·¯çº¿ |
| | | private readonly IDt_AreaInfoRepository _areaInfoRepository; //åºå |
| | | private readonly IAgingInOrOutInputService _agingInOrOutInputService; //éç½®\éå |
| | | private readonly IProductionRepository _productionRepository; //ç产 |
| | | |
| | | public Dt_TaskService(IDt_TaskRepository BaseDal, |
| | | IUnitOfWorkManage unitOfWorkManage, |
| | |
| | | IProcessApplyService processApplyService, |
| | | IDt_AreaInfoRepository areaInfoRepository, |
| | | IAgingInOrOutInputService agingInOrOutInputService, |
| | | IStockInfoDetailRepository stockInfoDetailRepository) : base(BaseDal) |
| | | IStockInfoDetailRepository stockInfoDetailRepository, |
| | | IProductionRepository productionRepository) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _outOrderRepository = outOrderRepository; |
| | |
| | | _areaInfoRepository = areaInfoRepository; |
| | | _agingInOrOutInputService = agingInOrOutInputService; |
| | | _stockInfoDetailRepository = stockInfoDetailRepository; |
| | | _productionRepository = productionRepository; |
| | | } |
| | | |
| | | #region å¤é¨æ¥å£æ¹æ³ |
| | |
| | | var result = JsonConvert.DeserializeObject<ResultTrayCellsStatus>(content.Data.ToString()); |
| | | if (result.SerialNos.Count <= 0) |
| | | return content.Error(result.MOMMessage); |
| | | |
| | | // TODO è·åæ¬å°ææ¡å±æ§ä¸æ´ççµè¯å±æ§è·åçå¼è¿è¡å¯¹æ¯ï¼å¦æä¸è´åç»§ç»ï¼å¦åè¿åéè¯¯ä¿¡æ¯ |
| | | var productions = await _productionRepository.QueryDataAsync(x => result.TrayBarcodePropertys.Select(x => x.TrayBarcodeProperty).ToList().Contains(x.TrayBarcodeProperty)); |
| | | if (productions.Count <= 0) |
| | | return content.Error("ææ¡å±æ§ä¸åå¨"); |
| | | |
| | | // è°ç¨CreateBoxingInfoæ¹æ³ï¼å建ç»çä¿¡æ¯ |
| | | |
| | | var boxing = await CreateBoxingInfo(result, input.PalletCode); |
| | | if (boxing == null) return content.Error("ç»ç失败"); |
| | | |
| | | // è°ç¨GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºè·¯çº¿ |
| | | ProcessApplyDto process = await GetProcessApplyAsync(result); |
| | |
| | | // 妿process为nullï¼åè¿åcontent |
| | | if (process == null) return content; |
| | | |
| | | // è°ç¨GetProcessResponseAsyncæ¹æ³ï¼è·åå·¥èºååº |
| | | var processResponse = await GetProcessResponseAsync(process, input.Position); |
| | | // è°ç¨_processApplyService.GetProcessApplyAsyncæ¹æ³ï¼è·åå·¥èºç³è¯· |
| | | content = await _processApplyService.GetProcessApplyAsync(process); |
| | | |
| | | // å¦æç¶æä¸ºfalseï¼åè¿ånull |
| | | if (!content.Status) return content.Error("å·¥èºç³è¯·å¤±è´¥"); |
| | | |
| | | //// è°ç¨GetProcessResponseAsyncæ¹æ³ï¼è·åå·¥èºååº |
| | | //var processResponse = await GetProcessResponseAsync(process, input.Position); |
| | | |
| | | List<string> strings = input.Position == "1088" ? new List<string>() { "CHSC01" } : new List<string>() { "JZSC01" }; |
| | | // è°ç¨CreateNewTaskæ¹æ³ï¼å建æ°ä»»å¡ |
| | | content = await CreateNewTask(input, processResponse); |
| | | content = await CreateNewTask(input, strings); |
| | | if (content.Status) |
| | | { |
| | | var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing); |
| | |
| | | SerialNumber = serialNoObj.SerialNo, |
| | | OrderNo = serialNoObj.PositionNo.ToString(), |
| | | Status = serialNoObj.SerialNoStatus, |
| | | MaterielCode = serialNoObj.BindCode, |
| | | MaterielCode = result.BindCode, |
| | | Remark = result.TrayBarcodePropertys.ToJsonString(), |
| | | }).ToList() |
| | | }; |
| | |
| | | /// <param name="areaId">åºåID</param> |
| | | /// <param name="content">ååºå
容</param> |
| | | /// <returns></returns> |
| | | private async Task<WebResponseContent> CreateNewTask(RequestTaskDto input, List<Dt_EquipmentProcess> process = null, int flag = 0) |
| | | private async Task<WebResponseContent> CreateNewTask(RequestTaskDto input, List<string> process = null, int flag = 0) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | List<string> strings = new List<string>(); |
| | | if (process != null) |
| | | { |
| | | strings = process.Select(x => x.EquipmentName).ToList(); |
| | | } |
| | | else |
| | | { |
| | | strings = input.Position.Split(',').ToList(); |
| | | } |
| | | |
| | | // è·åç®æ å°å |
| | | string ToAddress = await GetRoadWayAsync(strings); |
| | | string ToAddress = await GetRoadWayAsync(process); |
| | | |
| | | // å建æ°ä»»å¡å®ä¾ |
| | | var task = new Dt_Task |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | namespace WIDESEA_WMSServer.Controllers |
| | | { |
| | | [Route("api/[controller]")] |
| | | [ApiController] |
| | | public class ProductionController : ApiBaseController<IProductionService, ProductionModel> |
| | | { |
| | | public ProductionController(IProductionService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | public override ActionResult AddData([FromBody] ProductionModel options) |
| | | { |
| | | return base.AddData(options); |
| | | } |
| | | } |
| | | } |
| | |
| | | global using WIDESEA_Model.Models.System; |
| | | global using WIDESEA_Core.Authorization; |
| | | global using WIDESEA_Core.Utilities; |
| | | global using WIDESEA_Model; |
| | | global using WIDESEA_Model; |
| | | global using WIDESEA_StorageBasicServices; |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath> |
| | | <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID> |
| | | <Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath> |
| | | <NameOfLastUsedPublishProfile>D:\Git\BaiBuLiKu\Code Management\WMS\WIDESEA_WMSServer\WIDESEA_WMSServer\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> |
| | | </PropertyGroup> |
| | | </Project> |