wanshenmean
2024-11-11 021edcd84d6601249e008141b3027549f864155f
24-11-11.01
已添加9个文件
已修改9个文件
已重命名5个文件
656 ■■■■ 文件已修改
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/router/tables.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/MOM/Extend/Add.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/MOM/ProductionModel.js 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/MOM/ProductionModel.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/CellStateDto.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/ResultTrayCellsStatus.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellUnbindDto.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayUnbindDto.cs 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/ResponeAgingInputDto.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/MOM/ProductionModel.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Production/IProductionRepository.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Production/ProductionRepository.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Production/IProductionService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Production/ProductionService.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/ProductionController.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/GlobalUsing.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -196,26 +196,30 @@
            }
        }
        #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>
        /// è¾“送线入库完成
@@ -234,7 +238,7 @@
                //conveyorLine.SetValue(ConveyorLineDBName.WriteInteractiveSignal, 0, childDeviceCode);
                WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
                Console.Out.WriteLine(content.Serialize());
                //Console.Out.WriteLine(content.Serialize());
            }
        }
@@ -304,13 +308,11 @@
                    taskCommand.TargetAddress = 0;
                }
                conveyorLine.SendCommand(taskCommand, childDeviceCode);
                ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
                content = _taskService.UpdateTaskStatusToNext(task);
            }
        }
        /// <summary>
        /// ç›‘测空托盘实盘出库
@@ -332,7 +334,6 @@
            }
            catch (Exception)
            {
            }
        }
@@ -345,6 +346,7 @@
            if (tasks.Count < index)
            {
                #region è°ƒç”¨WMS获取出库任务
                WMSTaskDTO taskDTO = new WMSTaskDTO();
                object dynamic = new
                {
@@ -362,6 +364,7 @@
                    return;
                taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString());
                #endregion
                CreateAndSendTask(taskDTO);
@@ -380,6 +383,7 @@
            }
            return content;
        }
        /// <summary>
        /// è¾“送线交互完成
        /// </summary>
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -48,9 +48,7 @@
                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)
                    {
@@ -301,54 +299,6 @@
            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>
        /// è®¾å¤‡å¿ƒè·³
@@ -381,84 +331,5 @@
            }
        }
        /// <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);
        }
    }
}
Code Management/WMS/WIDESEA_WMSClient/src/router/tables.js
@@ -216,6 +216,14 @@
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/ProductionModel',
    name: 'ProductionModel',
    component: () => import('@/views/widesea_wms/MOM/ProductionModel.vue'),
    meta: {
      keepAlive: false
    }
  }
]
export default tables
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/MOM/Extend/Add.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
<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>
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/MOM/ProductionModel.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,77 @@
/*****************************************************************************************
**  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;
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/MOM/ProductionModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
<!--
*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>
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/HostedService/SeedDataHostedService.cs
@@ -49,7 +49,7 @@
                {
                    // ä½¿ç”¨ myScopedService æ‰§è¡Œä»»åŠ¡
                    //await DBSeed.SeedAsync(_dbContext, _webRootPath);
                    await DBSeed.SeedAsync(_dbContext, _webRootPath);
                    //多租户 åŒæ­¥
                    //await DBSeed.TenantSeedAsync(_dbContext);
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/CellStateDto.cs
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/ResultTrayCellsStatus.cs
ÎļþÃû´Ó Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/ResultTrayCellsStatus.cs ÐÞ¸Ä
@@ -1,5 +1,8 @@
namespace WIDESEA_DTO.MOM
{
    /// <summary>
    /// æ‰˜ç›˜ç”µèŠ¯çŠ¶æ€
    /// </summary>
    public class ResultTrayCellsStatus : BasicResult
    {
        /// <summary>
@@ -11,9 +14,22 @@
        /// ç”µèŠ¯åˆ—è¡¨
        /// </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>
@@ -35,7 +51,7 @@
        /// </summary>
        public int PositionNo { get; set; }
        public string BindCode { get; set; }
        //public string BindCode { get; set; }
        /// <summary>
        /// ç”µèŠ¯çŠ¶æ€
@@ -58,8 +74,10 @@
        /// </summary>
        public List<ProcessCodes> ProcessCodes { get; set; } = new List<ProcessCodes>();
        /// <summary>
        /// æ‰˜ç›˜å®¹é‡
        /// </summary>
        public double Capacity { get; set; }
        /// <summary>
        /// é€‚用物料编码/工艺型号
@@ -69,7 +87,6 @@
    public class ProcessCodes
    {
        /// <summary>
        /// å·¥åº
        /// </summary>
@@ -78,8 +95,9 @@
    public class ProductTypes
    {
        /// <summary>
        /// é€‚用物料编码/工艺型号
        /// </summary>
        public string ProductType { get; set; }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellUnbindDto.cs
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayCellsStatusDto.cs
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/CellState/TrayUnbindDto.cs
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MOM/ResponeAgingInputDto.cs
@@ -6,6 +6,9 @@
namespace WIDESEA_DTO.MOM
{
    /// <summary>
    /// å…¥åº“
    /// </summary>
    public class ResponeAgingInputDto : BasicResult
    {
        /// <summary>
@@ -19,8 +22,30 @@
        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>();
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/BasicModel/DtStockInfo.cs
@@ -41,6 +41,15 @@
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        /// <summary>
        /// å…³è”工序返回时间(注液\静置时长)
        /// </summary>
        public string LinedProcessFeedbackTime { get; set; }
        /// <summary>
        /// å…³è”工序返回时间(注液\静置时长)
        /// </summary>
        public string LinedProcessFeedbackTimes { get; set; }
        /// <summary>
        /// åŒºåŸŸç¼–码
@@ -59,7 +68,7 @@
        /// è´§ä½æ•°æ®
        /// </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; }
    }
}
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/MOM/ProductionModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,79 @@
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; }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Production/IProductionRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_StorageBasicRepository
{
    public interface IProductionRepository : IRepository<ProductionModel>
    {
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Production/ProductionRepository.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
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)
        {
        }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Production/IProductionService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
namespace WIDESEA_StorageBasicServices;
public interface IProductionService : IService<ProductionModel>
{
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Production/ProductionService.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
using WIDESEA_StorageBasicRepository;
namespace WIDESEA_StorageBasicServices;
public class ProductionService : ServiceBase<ProductionModel, IProductionRepository>, IProductionService
{
    public ProductionService(IProductionRepository BaseDal) : base(BaseDal)
    {
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -34,6 +34,7 @@
    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,
@@ -54,7 +55,8 @@
                                IProcessApplyService processApplyService,
                                IDt_AreaInfoRepository areaInfoRepository,
                                IAgingInOrOutInputService agingInOrOutInputService,
                                IStockInfoDetailRepository stockInfoDetailRepository) : base(BaseDal)
                                IStockInfoDetailRepository stockInfoDetailRepository,
                                IProductionRepository productionRepository) : base(BaseDal)
    {
        _unitOfWorkManage = unitOfWorkManage;
        _outOrderRepository = outOrderRepository;
@@ -75,6 +77,7 @@
        _areaInfoRepository = areaInfoRepository;
        _agingInOrOutInputService = agingInOrOutInputService;
        _stockInfoDetailRepository = stockInfoDetailRepository;
        _productionRepository = productionRepository;
    }
    #region å¤–部接口方法
@@ -452,7 +455,16 @@
            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);
@@ -460,11 +472,18 @@
            // å¦‚æžœ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);
@@ -564,7 +583,7 @@
                SerialNumber = serialNoObj.SerialNo,
                OrderNo = serialNoObj.PositionNo.ToString(),
                Status = serialNoObj.SerialNoStatus,
                MaterielCode = serialNoObj.BindCode,
                MaterielCode = result.BindCode,
                Remark = result.TrayBarcodePropertys.ToJsonString(),
            }).ToList()
        };
@@ -1184,20 +1203,12 @@
    /// <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
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/ProductionController.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,17 @@

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);
        }
    }
}
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/GlobalUsing.cs
@@ -12,4 +12,5 @@
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;
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj.user
@@ -1,8 +1,8 @@
<?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>