duyongjia
2024-11-26 0c0ac28fc5784ac64612811c65be7dca8318d8c6
前端更新货位状态修改
已修改7个文件
105 ■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Client/src/extension/basic/extend/updateStatus.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Client/src/views/basic/locationInfo.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/LocationEnum/EnableStatusEnum.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/Basic/Dt_LocationInfo.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/extension/basic/extend/updateStatus.vue
@@ -12,15 +12,16 @@
          <el-input v-model="form.locationCode" disabled></el-input>
        </el-form-item>
        <el-form-item label="货位状态">
          <el-select v-model="form.locationStatus" placeholder="请选择货位状态">
          <el-select v-model="form.locationStatus" placeholder="请选择货位状态" @change="showStatus">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option> </el-select
        ></el-form-item>
            </el-option>
          </el-select>
          </el-form-item>
      </el-form>
      <template #footer>
        <el-button type="primary" size="small" @click="updateLocationStatus"
@@ -52,6 +53,9 @@
    };
  },
  methods: {
    showStatus(){
      console.log(this.form.locationStatus);
    },
    open(row) {
      this.row = row;
      this.showDetialBox = true;
@@ -63,8 +67,8 @@
        .post("/api/LocationInfo/GetLocationStatusDic", {}, true)
        .then((x) => {
          if (!x.status) return this.$message.error(x.message);
          this.options = x.data;
          console.log(this.options);
        });
    },
    updateLocationStatus() {
@@ -73,7 +77,7 @@
          "/api/LocationInfo/UpdateLocationStatus?key=" +
            this.row.id +
            "&locationStatus=" +
            this.row.locationStatus,
            this.form.locationStatus,
          {},
          "数据处理中"
        )
@@ -81,6 +85,8 @@
          if (!x.status) return this.$message.error(x.message);
          this.$message.success("操作成功");
          this.showDetialBox = false;
          this.form.locationStatus='';
          this.$parent.refresh()
        });
    },
  },
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/views/basic/locationInfo.vue
@@ -56,19 +56,38 @@
          field: "layer",
          type: "string",
        },
        {
          title: "货位深度",
          required: true,
          field: "depth",
          type: "string",
        },
        // {
        //   title: "货位深度",
        //   required: true,
        //   field: "depth",
        //   type: "string",
        // },
      ],
      [
        {
          title: "货位类型",
          required: true,
          field: "locationType",
          type: "string",
          type: "select",
          dataKey:"",
          data:[
            {key:1,value:'正常货位'},
            {key:2,value:'暂存位'},
            {key:3,value:'提升机'},
            {key:4,value:'输送线'},
            {key:5,value:'组立机'},
          ]
        },
         {
          title: "禁用状态",
          required: true,
          field: "enableStatus",
          type: "select",
          dataKey:"",
          data:[
            {key:0,value:'正常'},
            {key:1,value:'禁用'},
          ]
        },
        {
          title: "区域主键",
@@ -77,12 +96,12 @@
          type: "string",
          hidden:true,
        },
        {
          title: "巷道编号",
          required: true,
          field: "roadwayNo",
          type: "string",
        },
        // {
        //   title: "巷道编号",
        //   required: true,
        //   field: "roadwayNo",
        //   type: "string",
        // },
      ],
    ]);
    const searchFormFields = ref({
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/LocationEnum/EnableStatusEnum.cs
@@ -18,14 +18,14 @@
        /// <summary>
        /// åªå…¥
        /// </summary>
        [Description("只入")]
        OnlyIn = 1,
        //[Description("只入")]
        //OnlyIn = 1,
        /// <summary>
        /// åªå‡º
        /// </summary>
        [Description("只出")]
        OnlyOut = 2,
        //[Description("只出")]
        //OnlyOut = 2,
        /// <summary>
        /// ç¦ç”¨
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/Basic/Dt_LocationInfo.cs
@@ -14,8 +14,8 @@
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "区域主键")]
        public int AreaId {  get; set; }
        [SugarColumn(ColumnDescription = "区域主键")]
        public int AreaId {  get; set; }=0;
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "货位编号")]
        public string LocationCode {  get; set; }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,8 +12,8 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  //"ConnectionString": "Data Source=10.0.250.20;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=STC@123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=10.0.250.20;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=STC@123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -183,7 +183,7 @@
                            return content = WebResponseContent.Instance.Error($"WCS未查询到源站点对应的库位,源站点:{taskDTO.dest_station.ToString()}");
                        }
                        break;
                    case 3001://AGV放货完成 WMS发3001的同时会写提升信号
                    case 3001://AGV放货完成 WMS发3001的同时WCS需在job中写提升信号
                        if (BaseDal.QueryFirst(x => x.TaskNum == taskDTO.task_id) == null)//手动入库直接发3001,需要生成任务,因为没有1001环节
                        {
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -134,8 +134,16 @@
                                MESResponse res = ApiInvoke.SendTaskCMD(sendcmd);
                                if (res != null && res.code != 0)
                                {
                                    WriteDebug(nameof(CommonStackerCraneJob), $"提升机提升完成,回传WMS失败!任务号{task1001.TaskNum}");
                                WriteDebug(nameof(CommonStackerCraneJob), $"允计AGV进入提升机,回传WMS失败!任务号{task1001.TaskNum}");
                                }
                            else
                            {
                                WriteDebug(nameof(CommonStackerCraneJob), $"允计AGV进入提升机,回传WMS成功!任务号{task1001.TaskNum}");
                            }
                        }
                        else
                        {
                            WriteDebug(nameof(CommonStackerCraneJob), $"未读取到提升机允计进入信号,暂不允计AGV进入提升机,任务号{task1001.TaskNum}");
                            }
                        }
                        Dt_Task? task3001 = _taskService.QueryStackerCraneTaskByAGVPutFinish("SC01");
@@ -147,12 +155,18 @@
                            if (task3001.SourceAddress == "SC01-002-000-001")//WMS 1001站点
                            {
                                //提升机是否处于就绪状态
                                int IsReady= commonStackerCrane.Communicator.Read<short>("DB2.0.0");
                            WriteDebug(nameof(CommonStackerCraneJob), $"提升机状态:{IsReady}任务号:{task3001.TaskNum}");
                                //写入提升信息
                                IsWriteOne = commonStackerCrane.Communicator.Read<short>("DB1.0.0");
                                if(IsWriteOne == 0&& IsReady == 1) 
                                {
                                   commonStackerCrane.Communicator.Write<short>("DB1.0.0", 1);
                            }
                            else
                            {
                                WriteDebug(nameof(CommonStackerCraneJob), $"未写入提升信号,可能是已写入或者提升机未处理就绪状态,任务号:{task3001.TaskNum}");
                                }
                                //读取提升机信号,确定是否提升完成
                               
@@ -161,12 +175,18 @@
                            else if (task3001.SourceAddress == "SC01-002-000-002")//WMS 1002站点
                            {
                                //提升机是否处于就绪状态
                                int IsReady = commonStackerCrane.Communicator.Read<short>("DB2.0.0");
                            WriteDebug(nameof(CommonStackerCraneJob), $"提升机状态:{IsReady}任务号:{task3001.TaskNum}");
                                //写入提升信息
                                IsWriteTwo = commonStackerCrane.Communicator.Read<short>("DB1.6.0");
                                if (IsWriteTwo == 0 && IsReady == 1)
                                {
                                    commonStackerCrane.Communicator.Write<short>("DB1.6.0", 1);
                            }
                            else
                            {
                                WriteDebug(nameof(CommonStackerCraneJob), $"未写入提升信号,可能是信号已写入或者提升机未处理就绪状态,任务号:{task3001.TaskNum}");
                                }    
                                //读取提升机信号,确定是否提升完成
                                IsFinish = commonStackerCrane.Communicator.Read<short>("DB2.10.0");
@@ -183,6 +203,10 @@
                                    WriteDebug(nameof(CommonStackerCraneJob), $"提升机提升完成,回传WMS失败!任务号{task3001.TaskNum}");
                                }
                            }
                        else
                        {
                            WriteDebug(nameof(CommonStackerCraneJob), $"提升机提升中...,任务号:{task3001.TaskNum}");
                        }
                        }
                        //小堆垛机出库完成任务