wangxinhui
20 小时以前 37051424de7c4a97132fbb06e45df594790aabf9
优化功能
已删除1个文件
已添加2个文件
已修改19个文件
1946 ■■■■ 文件已修改
项目代码/WCSClient/config/buttons.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/api/http.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/Home.vue 1202 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSClient/src/views/basicinfo/locationInfoRow.vue 386 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_DTO/EPLightSendDTO.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_DTO/WMSResponseContent.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/Controllers/WebAPIController.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Server/appsettings.json 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs 148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/AGV/AGVExtend.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/一期线体/ConveyorLineJob1.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineJob2.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口汇总文件/WMS接口对接文档20251211_V1.1.3.docx 补丁 | 查看 | 原始文档 | blame | 历史
项目资料/接口汇总文件/WMS接口对接文档20251216_V1.1.3.docx 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCSClient/config/buttons.js
@@ -136,6 +136,23 @@
    onClick: function () {
        this.export();
    }
},{
    name: "启 ç”¨",
    icon: '',
    class: '',
    value: 'Enable',
    type: 'primary',
    onClick: function () {
    }
},
{
    name: "禁 ç”¨",
    icon: '',
    class: '',
    value: 'Disable',
    type: 'danger',
    onClick: function () {
    }
}
]
ÏîÄ¿´úÂë/WCSClient/src/api/http.js
@@ -12,7 +12,7 @@
let loadingInstance;
let loadingStatus = false;
if (process.env.NODE_ENV == 'development') {
    axios.defaults.baseURL = 'http://11.2.30.112:9291/';
    axios.defaults.baseURL = 'http://127.0.0.1:9291/';
    //axios.defaults.baseURL = 'http://192.168.35.3:9281/';
}
else if (process.env.NODE_ENV == 'debug') {
ÏîÄ¿´úÂë/WCSClient/src/extension/system/Sys_User/Sys_UserGridHeader.vue
@@ -15,7 +15,15 @@
      </el-alert>
      <div>
        <el-input
          placeholder="请输入密码"
          placeholder="请输入旧密码"
          v-model="oldpwd"
          size="large"
          style="width: 100%; margin-top: 15px"
        />
      </div>
      <div>
        <el-input
          placeholder="请输入新密码"
          v-model="password"
          size="large"
          style="width: 100%; margin-top: 15px"
@@ -44,25 +52,28 @@
  data() {
    return {
      row: {},
      oldpwd: "",
      password: "",
      model: false,
    };
  },
  methods: {
    open(row) {
      this.oldpwd = "";
      this.password = "";
      this.row = row;
      this.model = true;
    },
    savePwd() {
      if (!this.password) return this.$Message.error("请输密码");
      if (!this.oldpwd) return this.$Message.error("请输旧密码");
      if (!this.password) return this.$Message.error("请输新密码");
      if (this.password.length < 6)
        return this.$Message.error("密码长度至少6位");
      let url =
        "/api/user/modifyUserPwd?password=" +
        this.password +
        "&userName=" +
        this.row.UserName;
        "/api/user/modifyPwd?oldPwd=" +
        this.oldpwd +
        "&newPwd=" +
        this.password;
      this.http.post(url, {}, true).then((x) => {
        if (!x.status) {
          return this.$message.error(x.message);
ÏîÄ¿´úÂë/WCSClient/src/views/Home.vue
@@ -1,890 +1,342 @@
<template>
    <div class="title">
        <!-- <el-row :gutter="20" style="height:85%">
            <el-col :span="8">
                <span style="position: relative; top: 100px;left: 30px;">
                    <h4>一楼设备监控</h4>
                </span>
                <el-row :gutter="20" style="height:1000px">
                    <el-col :span="8">
                        <div>
                            <div v-for="(group, index) in groupedLines(linescopy7)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition"
                                        url="api/Equipment/GetLineInfoByNo" />
                                </div>
                            </div>
                            <div style="margin-top: 118px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy8)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition"
                                        url="api/Equipment/GetLineInfoByNo" />
                                </div>
                            </div>
                            <div style="margin-top: 115px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy9)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition"
                                        url="api/Equipment/GetLineInfoByNo" />
                                </div>
                            </div>
                            <div style="margin-top: 112px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy10)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition" />
                                </div>
                            </div>
                            <div style="margin-top: 109px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy11)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition" />
                                </div>
                            </div>
                            <div style="margin-top: 107px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy12)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition" />
                                </div>
                            </div>
                        </div>
                    </el-col>
                    <el-col :span="8">
                        <div>
                            <div v-for="(group, index) in groupedLines(linescopy1)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition"
                                        url="api/Equipment/GetLineInfoByNo" />
                                </div>
                            </div>
                            <div style="margin-top: 108px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy2)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition"
                                        url="api/Equipment/GetLineInfoByNo" />
                                </div>
                            </div>
                            <div style="margin-top: 58px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy3)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition"
                                        url="api/Equipment/GetLineInfoByNo" />
                                </div>
                            </div>
                            <div style="margin-top: 58px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy4)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition" />
                                </div>
                            </div>
                            <div style="margin-top: 115px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy5)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition" />
                                </div>
                            </div>
                            <div style="margin-top: 115px;"></div>
                            <div v-for="(group, index) in groupedLines(linescopy6)" :key="index">
                                <div class="positionY-group">
                                    <LineInfoCopy v-for="(line, lineIndex) in group.lines" :key="lineIndex"
                                        :equipNo="line.equipNo" :imgType="line.imgType" :positionX="line.positionX"
                                        :positionY="line.positionY" :condition="line.condition" />
                                </div>
                            </div>
                        </div>
                    </el-col>
                </el-row>
            </el-col>
            <el-col :span="8">
                <div style="position: relative; top: 50px;">
                    <div class="stackerDiv">
                        <div class="stackDivName">一号堆垛机</div>
                        <LineComponent :x="xValue1" ref="stacker1" :equipNo="SC01"></LineComponent>
                    </div>
                    <el-divider></el-divider>
                    <div class="stackerDiv">
                        <div class="stackDivName">二号堆垛机</div>
                        <LineComponent :x="xValue2" ref="stacker2" :equipNo="SC02"></LineComponent>
                    </div>
                    <el-divider></el-divider>
                    <div class="stackerDiv">
                        <div class="stackDivName">三号堆垛机</div>
                        <LineComponent :x="xValue3" ref="stacker3" :equipNo="SC03"></LineComponent>
                    </div>
                    <el-divider></el-divider>
                    <div class="stackerDiv">
                        <div class="stackDivName">四号堆垛机</div>
                        <LineComponent :x="xValue4" ref="stacker4" :equipNo="SC04"></LineComponent>
                    </div>
                    <el-divider></el-divider>
                    <div class="stackerDiv">
                        <div class="stackDivName">五号堆垛机</div>
                        <LineComponent :x="xValue5" ref="stacker5" :equipNo="SC05"></LineComponent>
                    </div>
                    <el-divider></el-divider>
                    <div class="stackerDiv">
                        <div class="stackDivName">六号堆垛机</div>
                        <LineComponent :x="xValue6" ref="stacker6" :equipNo="SC06"></LineComponent>
                    </div>
                </div>
            </el-col>
        </el-row> -->
    </div>
</template>
<script>
import { onMounted, ref, reactive } from "vue";
import LineInfo from "./LineInfo.vue";
import LineInfoCopy from "./LineInfocopy.vue";
import LineComponent from './LineComponent.vue';
import JElDescription from "./JElDescription";
import { useWebSocket } from '@/uitils/websocket';
export default {
    data() {
        return {
            ws: null,          // WebSocket实例
            messages: [],      // æ¶ˆæ¯åˆ—表
            status: {         // è¿žæŽ¥çŠ¶æ€
                isConnected: false,
                error: null
            },
            linescopy1: [
                {
                    equipNo: "1005",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1006",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1007",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1008",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                }
            ],
            linescopy2: [
                {
                    equipNo: "1009",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1010",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1011",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1025",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 21,
                    condition: false,
                },
                {
                    equipNo: "1012",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                }
            ],
            linescopy3: [
                {
                    equipNo: "1017",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1018",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1019",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1026",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 21,
                    condition: false,
                },
                {
                    equipNo: "1020",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                }
            ],
            linescopy4: [
                {
                    equipNo: "1021",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1022",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1023",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1024",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                }
            ],
            linescopy5: [
                {
                    equipNo: "1031",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1032",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1033",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1034",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                }
            ],
            linescopy6: [
                {
                    equipNo: "1035",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1036",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1037",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1038",
                    imgType: "1",
                    positionX: 0.6,
                    positionY: 20,
                    condition: false,
                }
            ],
            linescopy7: [
                {
                    equipNo: "1001",
                    imgType: "1",
                    positionX: 5,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1002",
                    imgType: "1",
                    positionX: 5,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1003",
                    imgType: "1",
                    positionX: 5,
                    positionY: 20,
                    condition: false,
                },
                {
                    equipNo: "1004",
                    imgType: "1",
                    positionX: 5,
                    positionY: 20,
                    condition: false,
                },
            ],
            linescopy8: [
                {
                    equipNo: "1039",
                    imgType: "1",
                    positionX: 6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1040",
                    imgType: "1",
                    positionX: 6,
                    positionY: 16,
                    condition: false,
                },
            ],
            linescopy9: [
                {
                    equipNo: "1013",
                    imgType: "1",
                    positionX: 6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1014",
                    imgType: "1",
                    positionX: 6,
                    positionY: 16,
                    condition: false,
                },
            ],
            linescopy10: [
                {
                    equipNo: "1015",
                    imgType: "1",
                    positionX: 6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1016",
                    imgType: "1",
                    positionX: 6,
                    positionY: 16,
                    condition: false,
                },
            ],
            linescopy11: [
                {
                    equipNo: "1027",
                    imgType: "1",
                    positionX: 6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1028",
                    imgType: "1",
                    positionX: 6,
                    positionY: 16,
                    condition: false,
                },
            ],
            linescopy12: [
                {
                    equipNo: "1029",
                    imgType: "1",
                    positionX: 6,
                    positionY: 8,
                    condition: false,
                },
                {
                    equipNo: "1030",
                    imgType: "1",
                    positionX: 6,
                    positionY: 16,
                    condition: false,
                },
            ],
    <div class="container">
      <div class="content-wrapper">
        <!-- æŽ§åˆ¶é¢æ¿åŒºåŸŸ -->
          <!-- <div class="form-group">
            <label>区域:</label>
            <el-select
              size="mini"
              filterable
              v-model="Area.shelf_code"
              placeholder="请选择"
              class="full-width"
            >
              <el-option
                v-for="item in slectData"
                :value="item.shelf_code"
                :label="item.house_name"
                :key="item.house_name"
              ></el-option>
            </el-select>
          </div> -->
          <div class="form-group">
            <div style="display:flex;flex-direction: column;">
            <h4>货位排</h4>
            <el-select
              size="mini"
              @change="SCChange"
              v-model="Area.tunnel"
              placeholder="请选择排"
              class="full-width"
            >
              <el-option
                v-for="item in scList"
                :value="item"
                :label="'第'+item+'排'"
                :key="item"
              ></el-option>
            </el-select>
            <el-button type="success" class="refresh-btn" @click="GetViewData">
            åˆ·æ–°
          </el-button>
            </div>
            
            StackerCrane: {
                Automatic: "",
                Fault: "",
                CurrentLayer: "",
                CurrentRow: "1",
                CurrentColumn: "",
                CurrentTaskNum: "",
                Running: "",
                DeviceName: "",
                DeviceCOde: "",
                StackerAlarm: "",
            },
            RGVFirst: false,
            RGVSecond: false,
            RGVThird: false,
            xValue1: 0,
            xValue2: 0,
            xValue3: 0,
            xValue4: 0,
            xValue5: 0,
            xValue6: 0,
            timer1: null, // å®šæ—¶å™¨å˜é‡
            timer2: null, // å®šæ—¶å™¨å˜é‡
            RGV01: {
                Automatic: "",
                Fault: "",
                LevelPoint: 0,
                CurrentTaskNum: "",
                Running: "",
                DeviceName: "",
                DeviceCode: "RGV01",
                Alarm: "",
            },
            RGV02: {
                Automatic: "",
                Fault: "",
                LevelPoint: 1280,
                CurrentTaskNum: "",
                Running: "",
                DeviceName: "",
                DeviceCode: "RGV02",
                Alarm: "",
            },
            RGV03: {
                Automatic: "",
                Fault: "",
                LevelPoint: 0,
                CurrentTaskNum: "",
                Running: "",
                DeviceName: "",
                DeviceCode: "RGV03",
                Alarm: "",
            },
            formRGV: {
                TaskType: "",
                SourceAddress: "",
                TargetAddress: "",
                DeviceCode: "",
            },
        };
    },
    components: {
        LineInfoCopy,
        LineInfo,
        LineComponent,
        JElDescription,
    },
    methods: {
        groupedLines(linescopy) {
            const groups = {};
            linescopy.forEach((line) => {
                const positionY = line.positionY;
                if (!groups[positionY]) {
                    groups[positionY] = {
                        positionY,
                        lines: [],
                    };
                }
                groups[positionY].lines.push(line);
            });
            return Object.values(groups);
        },
        mouseClickRGVFirst() {
            this.fullscreenLoading = true;
            this.RGVFirst = true;
            this.fullscreenLoading = false;
        },
        mouseClickSecond() {
            this.fullscreenLoading = true;
            this.RGVSecond = true;
            this.fullscreenLoading = false;
        },
        mouseClickThird() {
            this.fullscreenLoading = true;
            this.RGVThird = true;
            this.fullscreenLoading = false;
        },
        SendCommand(x) {
            this.fullscreenLoading = true;
            this.formRGV.DeviceCode = x;
            this.http.post("api/DeviceInfo/RGVHandTask", this.formRGV)
                .then((x) => {
                    if (!x.status) {
                        this.$message.error(x.message);
                    } else {
                        this.$Message.success(x.message);
                        $vue.refresh();
                    }
                })
                .finally(() => {
                    this.fullscreenLoading = false;
                });
        },
        RGVReset(x) {
            this.fullscreenLoading = true;
            this.http.post("api/DeviceInfo/RGVReset?DeviceCode=" + x, null, "")
                .then((x) => {
                    if (!x.status) {
                        this.$message.error(x.message);
                    } else {
                        this.$Message.success(x.message);
                    }
                })
                .finally(() => {
                    this.fullscreenLoading = false;
                });
        },
        RGVemergencyStop(x) {
            this.fullscreenLoading = true;
            this.http.post("api/DeviceInfo/RGVemergencyStop?DeviceCode=" + x, null, "")
                .then((x) => {
                    if (!x.status) {
                        this.$message.error(x.message);
                    } else {
                        this.$Message.success(x.message);
                    }
                })
                .finally(() => {
                    this.fullscreenLoading = false;
                });
        },
        RGVPause(x) {
            this.fullscreenLoading = true;
            this.http.post("api/DeviceInfo/RGVPause?DeviceCode=" + x, null, "")
                .then((x) => {
                    if (!x.status) {
                        this.$message.error(x.message);
                    } else {
                        this.$Message.success(x.message);
                    }
                })
                .finally(() => {
                    this.fullscreenLoading = false;
                });
        },
        RGVCancel(x) {
            this.fullscreenLoading = true;
            this.http.post("api/DeviceInfo/RGVCancel?DeviceCode=" + x, null, "")
                .then((x) => {
                    if (!x.status) {
                        this.$message.error(x.message);
                    } else {
                        this.$Message.success(x.message);
                    }
                })
                .finally(() => {
                    this.fullscreenLoading = false;
                });
        },
        RGVInitialize(x) {
            this.fullscreenLoading = true;
            this.http.post("api/DeviceInfo/RGVInitialize?DeviceCode=" + x, null, "")
                .then((x) => {
                    if (!x.status) {
                        this.$message.error(x.message);
                    } else {
                        this.$Message.success(x.message);
                    }
                })
                .finally(() => {
                    this.fullscreenLoading = false;
                });
        },
          <div class="legend-section" style="margin-left: 20px;">
            <h4>说明</h4>
            <div class="legend-grid">
              <div
                class="legend-item"
                v-for="item in infoMsg"
                :key="item.bgcolor"
              >
                <span
                  class="color-box"
                  :style="{ 'background-color': item.bgcolor }"
                ></span>
                <span class="legend-label">{{ item.msg }}</span>
              </div>
            </div>
          </div>
          </div>
      </div>
      <!-- è´§ä½å±•示区域 -->
        <div class="location-view">
          <div
            class="layer-container"
            v-for="(item,index) in locationData"
            :key="index"
          >
            <h3 class="layer-title">第{{ item.layer }}层</h3>
            <div class="row" >
              <div
                class="location-cell"
                :style="{ 'background-color': GetBgColor(column) }"
                v-for="(column,index) in item.locationObj" :key="index"
                @mouseenter="showTooltip(column, $event)"
                @mouseleave="hideTooltip"
              >
                {{ column.row }}-{{ column.column }}-{{ column.layer }}
              </div>
            </div>
          </div>
        </div>
        <!-- æ‚¬æµ®æç¤ºæ¡† -->
        <div
          v-if="showTooltipFlag"
          class="location-tooltip"
          :style="{
            left: tooltipPosition.x + 'px',
            top: tooltipPosition.y + 'px',
          }"
        >
          <div v-if="currentLocation">
            <p><strong>货位号:</strong>{{ currentLocation.locationCode }}</p>
            <p><strong>料箱号:</strong>{{ currentLocation.barCode ? currentLocation.barCode :"无料箱" }}</p>
            <p>
              <strong>排列层:</strong> {{ currentLocation.row }}排{{
                currentLocation.column
              }}列{{ currentLocation.layer }}层
            </p>
            <p><strong>状态:</strong> {{ getStatusText(currentLocation) }}</p>
            <!-- <p>
              <strong>禁用:</strong>
              {{ currentLocation.location_lock == 3 ? "是" : "否" }}
            </p> -->
            <!-- <p v-if="currentLocation.location_state > 0">
              <strong>物料编码:</strong>
              {{ currentLocation.material_code || "无" }}
            </p>
            <p v-if="currentLocation.location_state > 0">
              <strong>数量:</strong> {{ currentLocation.quantity || "无" }}
            </p> -->
          </div>
        </div>
    </div>
  </template>
  <script>
  import { ElButton } from "element-plus";
import { el } from 'element-plus/es/locale';
  export default {
    data() {
      return {
        slectData: [],
        scList: [],
        Area: { house_name: "", tunnel: "", shelf_code: "" },
        mian_height: "",
        infoMsg: [
          { bgcolor: "lightgreen", msg: "空闲", state: 0 },
          { bgcolor: "orange", msg: "有货", state: 100 },
          { bgcolor: "#2BB3D5", msg: "锁定", state: 1 },
        ],
        locationData: [],
        showTooltipFlag: false,
        currentLocation: null,
        tooltipPosition: { x: 0, y: 0 },
      };
    },
    computed: {
      GetBgColor() {
        return (col) => {
              var bgColor = "";
              //优先显示禁用状态
              if (col.location_lock > 0) {
                this.infoMsg.forEach((el) => {
                    if (el.state === col.location_lock) {
                        bgColor = el.bgcolor;
                    }
                });
            }
            else{
                return "lightgreen";
            }
              return bgColor;
        };
      },
    },
    methods: {
      GetViewData() {
        var _this = this;
        this.http
          .post("/api/LocationInfo/GetLocationStatus?row=" + _this.Area.tunnel, {}, "查询中")
          .then((x) => {
            _this.locationData = x.data;
          });
      },
      // åˆ‡æ¢æŽ’
      SCChange() {
        this.GetViewData();
      },
      showTooltip(location, event) {
        this.currentLocation = location;
        this.showTooltipFlag = true;
        // è®¾ç½®æç¤ºæ¡†ä½ç½®ï¼Œç¨å¾®åç§»é¿å…é®æŒ¡é¼ æ ‡
        this.tooltipPosition = {
          x: event.clientX + 10,
          y: event.clientY + 10,
        };
      },
      hideTooltip() {
        this.showTooltipFlag = false;
        this.currentLocation = null;
      },
      getStatusText(location) {
        // if (location.location_lock === 3) return "禁用";
        if (location.location_lock === 0) return "空闲";
        if (location.location_lock === 1) return "锁定";
        if (location.location_lock === 100) return "有货";
        // if (location.location_state > 0 && location.location_state < 100)
        //   return "锁定";
        return "其他";
      },
    },
    mounted() {
      var mainHeight = document.getElementById("vol-main");
      this.mian_height = mainHeight.offsetHeight - 40 + "px";
      var _this = this;
      //加载下拉选项
      this.http.post("/api/LocationInfo/GetRow", {}, "查询中").then((x) => {
        //加载第一个区域,第一排
        // _this.Area.shelf_code = _this.slectData[0].shelf_code;
        _this.scList = x.data;
        _this.Area.tunnel = _this.scList[0];
        _this.GetViewData();
      });
    },
    created() {
        this.ws = new WebSocket('ws://localhost:9260/');
    this.ws.onmessage = (event) => {
      try {
        const data = JSON.parse(event.data);
        console.log('收到消息:', data);
        // å¤„理消息...
      } catch (e) {
        console.error('消息解析失败', e);
      }
    };
        const stackerComponentsMap = {
            "SC01": 'stacker1',
            "SC02": 'stacker2',
            "SC03": 'stacker3',
            "SC04": 'stacker4',
            "SC05": 'stacker5',
            "SC06": 'stacker6',
        };
        // const componentKey = stackerComponentsMap[data.R_PP_Status];
        // if (componentKey) {
        //     this.StackerCrane.Automatic = data;
        //     this.StackerCrane.Fault = data;
        //     this.StackerCrane.Running = data;
        //     this.StackerCrane.CurrentColumn = data;
        //     this.StackerCrane.CurrentLayer = data;
        //     this.StackerCrane.LevelPoint = data;
        //     this.StackerCrane.DeviceName = data;
        //     this.StackerCrane.DeviceCode = data;
        //     this.StackerCrane.CurrentTaskNum = data;
        //     this.StackerCrane.StackerAlarm = data;
        //     this.$nextTick(() => {
        //         this.$refs[componentKey].moveDot(this.StackerCrane);
        //     });
        // }
        const stationMap = {
            "SC011F": this.linescopy1,
            "SC021F": this.linescopy2,
            "SC031F": this.linescopy3,
            "SC041F": this.linescopy4,
            "SC051F": this.linescopy5,
            "SC061F": this.linescopy6,
            "SC071F": this.linescopy7,
            "SC081F": this.linescopy8,
            "SC091F": this.linescopy9,
            "SC101F": this.linescopy10,
            "SC111F": this.linescopy11,
            "SC121F": this.linescopy12,
            "SC012F": this.linescopy13,
            "SC022F": this.linescopy13,
            "SC032F": this.linescopy13,
            "SC042F": this.linescopy13,
            "SC052F": this.linescopy13,
            "SC062F": this.linescopy13,
            "SC072F": this.linescopy13,
            "SC082F": this.linescopy14,
        };
        // var station = eventData.stationChildCode;
        // if (stationMap[eventData.roadway]) {
        //     stationMap[eventData.roadway].forEach((line) => {
        //         if (line.equipNo === station) {
        //             line.condition = eventData.inStock;
        //         }
        //     })
        // }
    },
};
</script>
<style scoped>
/* .positionY-group {
  margin-bottom: 10px;
} */
.title {
    height: 1800px;
}
.cardWidth {
    components: { ElButton },
  };
  </script>
  <style scoped>
  .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
}
.cardWidthrow {
    height: 00%;
    width: 100%;
    /* margin-top: 10px; */
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
}
.divider {
    top: 50px;
}
.layerSize {
    position: absolute;
    top: 100px;
    left: 30px;
    color: fuchsi
}
.stackerDiv {
    border: 1px solid rgba(0, 195, 255, 0.822);
    width: 980px;
    padding-left: 3px;
}
.stackDivName {
    padding: 10px;
  }
  .header {
    text-align: center;
    color: rgba(0, 195, 255, 0.822);
    margin-bottom: 12px;
}
.dot-Running {
    position: absolute;
    top: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #409eff;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 9px;
    margin-bottom: 20px;
  }
  .title {
    font-size: 20px;
    font-weight: bold;
    color: white;
}
.dot-Automatic {
    position: absolute;
    top: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #0df705;
    transition: transform 0.3s ease;
    margin: 0;
  }
  .content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 9px;
    font-weight: bold;
    color: white;
}
.dot-Fault {
    position: absolute;
    top: -5px;
    width: 20px;
    height: 20px;
    /* right:0px; */
    border-radius: 50%;
    background-color: #f80410;
    transition: transform 0.3s ease;
    flex: 1;
    min-height: 0;
    padding: 10px;
  }
  .full-width {
    width: 100%;
  }
  .refresh-btn {
    margin-top: 10px;
    width: 35%;
  }
  .legend-section h4 {
    margin-bottom: 10px;
  }
  .legend-grid {
    display: flex;
    justify-content: center;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .legend-item {
    display: flex;
    align-items: center;
    font-size: 9px;
    font-weight: bold;
    color: white;
}
.line-container {
    position: relative;
    height: 1280px;
    background-color: #ecf5ff;
  }
  .color-box {
    display: inline-block;
    width: 20px;
    top: 30px;
    left: 200px
}
.RGVline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #a0cfff;
}
.line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #a0cfff;
}
.line-containerThird {
    position: absolute;
    height: 20px;
    background-color: #ecf5ff;
    width: 1330px;
    /* margin-top:180px; */
    top: 180px;
    left: 300px;
}
.lineThird {
    /* position: absolute; */
    height: 1px;
    /* margin-top:180px; */
    background-color: #a0cfff;
}</style>
    margin-right: 8px;
    border-radius: 3px;
  }
  .legend-label {
    font-size: 13px;
  }
  .location-view {
    flex: 1;
    overflow: auto;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
  }
  .layer-container {
    margin-bottom: 25px;
  }
  .layer-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
  }
  .row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 8px;
    cursor: pointer;
  }
  .location-cell {
    width: 66px;
    height: 38px;
    margin: 3px;
    text-align: center;
    font-size: 14px;
    border-radius: 3px;
    line-height: 38px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  .location-tooltip {
    position: fixed;
    z-index: 9999;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    max-width: 250px;
  }
  .location-tooltip p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.4;
  }
  .location-tooltip strong {
    display: inline-block;
    width: 70px;
    color: #666;
  }
  .form-group{
    display: flex;
  }
  </style>
ÏîÄ¿´úÂë/WCSClient/src/views/basicinfo/locationInfoRow.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,386 @@
<template>
  <div class="container">
    <div class="header">
      <h2 class="title">货位排图</h2>
    </div>
    <div class="content-wrapper">
      <!-- æŽ§åˆ¶é¢æ¿åŒºåŸŸ -->
      <div class="control-panel">
        <div class="form-group">
          <label>区域:</label>
          <el-select
            size="mini"
            filterable
            v-model="Area.shelf_code"
            placeholder="请选择"
            class="full-width"
          >
            <el-option
              v-for="item in slectData"
              :value="item.shelf_code"
              :label="item.house_name"
              :key="item.house_name"
            ></el-option>
          </el-select>
        </div>
        <div class="form-group">
          <label>排:</label>
          <el-select
            size="mini"
            clearable
            filterable
            @change="SCChange"
            v-model="Area.tunnel"
            placeholder="请选择"
            class="full-width"
          >
            <el-option
              v-for="item in scList"
              :value="item"
              :label="item"
              :key="item"
            ></el-option>
          </el-select>
        </div>
        <el-button type="success" class="refresh-btn" @click="GetViewData">
          åˆ·æ–°
        </el-button>
        <div class="legend-section">
          <h4>说明</h4>
          <div class="legend-grid">
            <div
              class="legend-item"
              v-for="item in infoMsg"
              :key="item.bgcolor"
            >
              <span
                class="color-box"
                :style="{ 'background-color': item.bgcolor }"
              ></span>
              <span class="legend-label">{{ item.msg }}</span>
            </div>
          </div>
        </div>
      </div>
      <!-- è´§ä½å±•示区域 -->
      <div class="location-view">
        <div
          class="layer-container"
          v-for="layer in locationData"
          :key="layer.index"
        >
          <h3 class="layer-title">第{{ layer.index }}层</h3>
          <div class="row" v-for="row in layer.rows" :key="row.index">
            <div
              class="location-cell"
              :style="{ 'background-color': GetBgColor(col) }"
              v-for="col in row.cols"
              :key="col.index"
              @mouseenter="showTooltip(col, $event)"
              @mouseleave="hideTooltip"
            >
              {{ row.index }}-{{ col.index }}-{{ layer.index }}
            </div>
          </div>
        </div>
      </div>
      <!-- æ‚¬æµ®æç¤ºæ¡† -->
      <div
        v-if="showTooltipFlag"
        class="location-tooltip"
        :style="{
          left: tooltipPosition.x + 'px',
          top: tooltipPosition.y + 'px',
        }"
      >
        <div v-if="currentLocation">
          <p><strong>货位号:</strong>{{ currentLocation.locationCode }}</p>
          <p>
            <strong>货位排列层:</strong> {{ currentLocation.row }}排{{
              currentLocation.index
            }}列{{ currentLocation.layer }}层
          </p>
          <p><strong>状态:</strong> {{ getStatusText(currentLocation) }}</p>
          <p>
            <strong>禁用:</strong>
            {{ currentLocation.location_lock == 3 ? "是" : "否" }}
          </p>
          <!-- <p v-if="currentLocation.location_state > 0">
            <strong>物料编码:</strong>
            {{ currentLocation.material_code || "无" }}
          </p>
          <p v-if="currentLocation.location_state > 0">
            <strong>数量:</strong> {{ currentLocation.quantity || "无" }}
          </p> -->
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { ElButton } from "element-plus";
export default {
  data() {
    return {
      slectData: [],
      scList: [],
      Area: { house_name: "", tunnel: "", shelf_code: "" },
      mian_height: "",
      infoMsg: [
        { bgcolor: "lightgreen", msg: "空货位", state: 0 },
        { bgcolor: "orange", msg: "有货", state: 100 },
        { bgcolor: "#2BB3D5", msg: "锁定", state: "InAssigned" },
        { bgcolor: "#ccc", msg: "禁用", state: 3 },
        // { bgcolor: "red", msg: "禁用", state: 3 },
        { bgcolor: "#b7ba6b", msg: "其它", state: "else" },
      ],
      locationData: [],
      showTooltipFlag: false,
      currentLocation: null,
      tooltipPosition: { x: 0, y: 0 },
    };
  },
  computed: {
    GetBgColor() {
      return (col) => {
        var bgColor = "#b7ba6b";
        //优先显示禁用状态
        if (col.location_lock == 3) {
          this.infoMsg.forEach((el) => {
            if (el.state == col.location_lock) {
              bgColor = el.bgcolor;
            }
          });
        } else {
          this.infoMsg.forEach((el) => {
            if (col.location_state > 0 && col.location_state < 100) {
              if (el.state == "InAssigned") {
                bgColor = el.bgcolor;
              }
            } else if (el.state == col.location_state) {
              bgColor = el.bgcolor;
            }
          });
        }
        return bgColor;
      };
    },
  },
  watch: {
    //切换库区
    "Area.shelf_code"(newValue, oldValue) {
      this.scList = [];
      this.slectData.forEach((e) => {
        if (e.shelf_code == newValue) {
          this.Area.tunnel = e.tunnel[0];
          this.scList = e.tunnel;
        }
      });
      this.GetViewData();
    },
  },
  methods: {
    GetViewData() {
      var _this = this;
      this.http
        .post("/api/LocationInfoRow/GetLocationStatu", _this.Area, "查询中")
        .then((x) => {
          _this.locationData = x;
          console.log("后端返回:", x);
        });
    },
    // åˆ‡æ¢æŽ’
    SCChange() {
      this.GetViewData();
    },
    showTooltip(location, event) {
      this.currentLocation = location;
      this.showTooltipFlag = true;
      // è®¾ç½®æç¤ºæ¡†ä½ç½®ï¼Œç¨å¾®åç§»é¿å…é®æŒ¡é¼ æ ‡
      this.tooltipPosition = {
        x: event.clientX + 10,
        y: event.clientY + 10,
      };
    },
    hideTooltip() {
      this.showTooltipFlag = false;
      this.currentLocation = null;
    },
    getStatusText(location) {
      // if (location.location_lock === 3) return "禁用";
      if (location.location_state === 0) return "空货位";
      if (location.location_state === 1) return "锁定";
      if (location.location_state === 10) return "有货锁定";
      if (location.location_state === 20) return "空闲锁定";
      if (location.location_state === 99) return "大托盘锁定";
      if (location.location_state === 100) return "有货";
      // if (location.location_state > 0 && location.location_state < 100)
      //   return "锁定";
      return "其他";
    },
  },
  mounted() {
    var mainHeight = document.getElementById("vol-main");
    this.mian_height = mainHeight.offsetHeight - 40 + "px";
    var _this = this;
    //加载下拉选项
    this.http.get("/api/LocationInfoRow/GetArea", {}, "查询中").then((x) => {
      _this.slectData = x;
      //加载第一个区域,第一排
      _this.Area.shelf_code = _this.slectData[0].shelf_code;
      _this.scList = _this.slectData[0].tunnel;
    });
  },
  components: { ElButton },
};
</script>
<style scoped>
.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
}
.header {
  text-align: center;
  margin-bottom: 20px;
}
.title {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}
.content-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
}
.control-panel {
  width: 220px;
  padding: 15px;
  background-color: #f5f7fa;
  border-radius: 4px;
  margin-right: 15px;
  display: flex;
  flex-direction: column;
}
.form-group {
  margin-bottom: 15px;
}
.full-width {
  width: 100%;
}
.refresh-btn {
  margin-top: 10px;
  width: 100%;
}
.legend-section {
  margin-top: 30px;
}
.legend-section h4 {
  margin-bottom: 10px;
}
.legend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
}
.color-box {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 3px;
}
.legend-label {
  font-size: 13px;
}
.location-view {
  flex: 1;
  overflow: auto;
  padding: 10px;
  background-color: white;
  border-radius: 4px;
}
.layer-container {
  margin-bottom: 25px;
}
.layer-title {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #333;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 8px;
  cursor: pointer;
}
.location-cell {
  width: 66px;
  height: 38px;
  margin: 3px;
  text-align: center;
  font-size: 14px;
  border-radius: 3px;
  line-height: 38px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.location-tooltip {
  position: fixed;
  z-index: 9999;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  max-width: 250px;
}
.location-tooltip p {
  margin: 5px 0;
  font-size: 13px;
  line-height: 1.4;
}
.location-tooltip strong {
  display: inline-block;
  width: 70px;
  color: #666;
}
</style>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_BasicInfoService/LocationStatusChangeRecordService.cs
@@ -50,7 +50,7 @@
        /// <summary>
        /// è´§ä½å˜åŠ¨è®°å½•æ·»åŠ (多个)
        /// </summary>
        public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, List<int>? taskNums = null)
        public void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, List<Dt_Task>? tasks = null)
        {
            try
            {
@@ -58,7 +58,7 @@
                for (int i = 0; i < locationInfos.Count; i++)
                {
                    Dt_LocationInfo locationInfo = locationInfos[i];
                    int? taskNum = (taskNums != null && taskNums.Count > 0 && taskNums.Count == locationInfos.Count) ? taskNums[i] : null;
                    Dt_Task? task = tasks.FirstOrDefault(x=>x.SourceAddress== locationInfo.LocationCode);
                    Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord()
                    {
                        AfterStatus = newStatus.ObjToInt(),
@@ -66,14 +66,12 @@
                        ChangeType = changeType.ObjToInt(),
                        LocationCode = locationInfo.LocationCode,
                        LocationId = locationInfo.Id,
                        TaskNum = taskNum,
                        TaskNum = task.TaskNum,
                        Creater = "",
                        CreateDate = DateTime.Now,
                    };
                    records.Add(locationStatusChangeRecord);
                }
                BaseDal.AddData(records);
            }
            catch (Exception ex)
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Common/APIEnum/APIEnum.cs
@@ -30,6 +30,11 @@
        [Description("WMS料箱到达拣选位上报")]
        WMSPickArrivedUp,
        /// <summary>
        /// WMS播种墙上报
        /// </summary>
        [Description("WMS播种墙上报")]
        WMSLightBack,
        /// <summary>
        /// äºŒæœŸæ’­ç§å¢™åˆå§‹åŒ–
        /// </summary>
        [Description("二期播种墙初始化")]
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/EPLightSendDTO.cs
@@ -25,7 +25,7 @@
        /// </summary>
        public int QUANTITY { get; set; }
        /// <summary>
        /// äº®ç¯é¢œè‰²
        /// äº®ç¯é¢œè‰² 1:蓝色 2:绿色 3:浅绿 4:红色 5:紫色 6:黄色 7:白色
        /// </summary>
        public string LIGHTCOLOR { get; set; }
        /// <summary>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/TaskInfo/WMSTaskDTO.cs
@@ -127,4 +127,18 @@
        /// </summary>
        public int Mode { get; set; }
    }
    /// <summary>
    /// æ’­ç§å¢™è¿”回
    /// </summary>
    public class TaskBackLight
    {
        /// <summary>
        /// æ’­ç§å¢™ç¼–号(B1一期/B2二期播种墙)
        /// </summary>
        public string TagNo { get; set;}
        /// <summary>
        /// è´§ä½å·
        /// </summary>
        public string TagCode { get; set; }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_DTO/WMSResponseContent.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
namespace WIDESEA_External.Model
{
@@ -24,4 +25,53 @@
        /// </summary>
        public object Data { get; set; }
    }
    public class BinCodeObj
    {
        public string Bincode { get; set; }
    }
    public class WMSReceiveTaskContent
    {
        public bool Status { get; set; }
        public int Code { get; set; }
        public string Message { get; set; }
        public List<BinCodeObj> SucessData { get; set; }
        public List<BinCodeObj> FailData { get; set; }
        public static WMSReceiveTaskContent Instance => new WMSReceiveTaskContent();
        public WMSReceiveTaskContent()
        {
            SucessData=new List<BinCodeObj>();
            FailData=new List<BinCodeObj>();
        }
        public WMSReceiveTaskContent(bool status)
        {
            Status = status;
        }
        public WMSReceiveTaskContent OK()
        {
            Status = true;
            return this;
        }
        public WMSReceiveTaskContent OK(string message = null)
        {
            Status = true;
            Message = message;
            return this;
        }
        public WMSReceiveTaskContent Error(string message = null)
        {
            Status = false;
            Message = message;
            return this;
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_IBasicInfoService/ILocationStatusChangeRecordService.cs
@@ -22,7 +22,7 @@
        /// <summary>
        /// è´§ä½å˜åŠ¨è®°å½•æ·»åŠ (多个)
        /// </summary>
        void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, List<int>? taskNums = null);
        void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, LocationStatusEnum lastStatus, LocationStatusEnum newStatus, LocationChangeType changeType, List<Dt_Task>? tasks = null);
        /// <summary>
        /// èŽ·å–æŒ‡å®šè´§ä½å˜åŠ¨è®°å½•
        /// </summary>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_ITaskInfoService/ITaskService.cs
@@ -23,6 +23,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_DTO.Agv;
using WIDESEA_External.Model;
using WIDESEAWCS_Common.APIEnum;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
@@ -57,7 +58,7 @@
        /// </summary>
        /// <param name="taskDTOs">WMS任务对象集合</param>
        /// <returns>返回处理结果</returns>
        WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO);
        WMSReceiveTaskContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO);
        /// <summary>
        /// æ’­ç§å¢™åˆå§‹åŒ–
        /// </summary>
@@ -77,7 +78,7 @@
        /// å®¹å™¨å…¥åº“创建任务
        /// </summary>
        /// <returns></returns>
        WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO,string deviceCode,string stationCode);
        WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO,string deviceCode,string stationCode,int type=0);
        /// <summary>
        /// ç”³è¯·å…¥åº“
        /// </summary>
@@ -152,6 +153,11 @@
        /// <returns></returns>
        WebResponseContent TaskCompleted(int taskNum);
        /// <summary>
        /// äºŒæœŸæ’­ç§å¢™å›žä¼ 
        /// </summary>
        /// <returns></returns>
        EPLightContent WMSLightBack(List<TaskBackLight> taskBackLights);
        /// <summary>
        /// äºŒæœŸæ’­ç§å¢™ä¸‹å‘
        /// </summary>
        /// <param name="lightSendDTOs"></param>
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/BasicInfo/LocationInfoController.cs
@@ -68,6 +68,34 @@
        {
            return Service.LocationDisableStatus(keys); ;
        }
        [HttpPost,HttpGet , Route("GetLocationStatus")]
        public WebResponseContent GetLocationStatus(int row)
        {
            List<int> layers = _repository.QueryData(x => x.Row == row).Select(x => x.Layer).Distinct().ToList();
            List<object> listObj=new List<object>();
            foreach (var item in layers)
            {
                object locationObj = _repository.QueryData(x => x.Row == row && x.Layer== item).OrderBy(x => x.Columns).Select(x => new
                {
                    barCode = x.PalletCode,
                    layer=x.Layer.ToString().PadLeft(2, '0'),
                    row=x.Row.ToString().PadLeft(2, '0'),
                    column = x.Columns.ToString().PadLeft(2, '0'),
                    locationCode = x.LocationCode,
                    location_lock=x.LocationStatus
                }).ToList();
                object obj = new { layer=item, locationObj };
                listObj.Add(obj);
            }
            return WebResponseContent.Instance.OK("成功", listObj);
        }
        [HttpPost, HttpGet, Route("GetRow")]
        public WebResponseContent GetRow()
        {
            List<int> listRow=_repository.QueryData().Select(x=>x.Row).Distinct().ToList();
            return WebResponseContent.Instance.OK("成功",listRow);
        }
    }
}
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Text;
using WIDESEA_External.Model;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
@@ -33,7 +34,7 @@
        }
        [HttpPost, Route("ReceiveTask"), AllowAnonymous]
        public WebResponseContent ReceiveWMSTask([FromBody] WMSTaskDTO taskDTO)
        public WMSReceiveTaskContent ReceiveWMSTask([FromBody] WMSTaskDTO taskDTO)
        {
            return Service.ReceiveWMSTask(taskDTO);
        }
@@ -81,11 +82,11 @@
                        byte[] bytesPick = commonConveyorLine.Communicator.Read("2", 5);
                        string PickBarCode = Encoding.UTF8.GetString(bytesPick).Replace("\0", "").Replace("\\0", "");
                        if (containerFlowDTO.ContainerCode != PickBarCode) throw new Exception($"传入料箱码{containerFlowDTO.ContainerCode},输送料箱码{PickBarCode}数据错误");
                        if (containerFlowDTO.Direction == "100")
                        {
                            WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
                            if (!responseContent.Status) throw new Exception(responseContent.Message);
                        }
                        //if (containerFlowDTO.Direction == "100")
                        //{
                        //    WebResponseContent responseContent = Service.ContainerFlow(containerFlowDTO, stationManger.StationDeviceCode, stationManger.PickStationCode);
                        //    if (!responseContent.Status) throw new Exception(responseContent.Message);
                        //}
                        commonConveyorLine.Communicator.Write("22", (containerFlowDTO.Direction == "100" ? new byte[] { 1, 0 } : new byte[] { 2, 0 }));
                    }
                    else
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/Controllers/WebAPIController.cs
@@ -15,6 +15,7 @@
using WIDESEAWCS_Core.LogHelper;
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.Agv;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
@@ -59,7 +60,12 @@
                {
                    return content.Error("传入不能为空");
                }
                content.OK("接收成功");
                List<TaskBackLight> taskBackLights = lightBackDTOs.Select(x => new TaskBackLight()
                {
                    TagNo="B2",
                    TagCode=x.LOCATION,
                }).ToList();
                content = _taskService.WMSLightBack(taskBackLights);
            }
            catch (Exception ex)
            {
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Server/appsettings.json
@@ -12,10 +12,7 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  "DBType": "SqlServer",
  //连接字符串
  //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
  //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSLLD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_HF;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=192.168.35.3;Initial Catalog=WIDESEA_HF;User ID=sa;Password=Sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -104,22 +104,17 @@
        /// </summary>
        /// <param name="taskDTOs">WMS任务对象集合</param>
        /// <returns>返回处理结果</returns>
        public WebResponseContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO)
        public WMSReceiveTaskContent ReceiveWMSTask([NotNull] WMSTaskDTO taskDTO)
        {
            WebResponseContent content = new WebResponseContent();
            WMSReceiveTaskContent content = new WMSReceiveTaskContent();
            string errorMsg = "";
            try
            {
                lock (lock_taskReceive)
                {
                    List<Dt_Task> tasks = new List<Dt_Task>();
                    Dt_Task taskOld = BaseDal.QueryFirst(x=> taskDTO.Tasks.Select(x => x.TaskDescribe.ContainerCode).Contains(x.PalletCode));
                    if (taskOld != null) throw new Exception($"料箱{taskOld.PalletCode}"+(taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "入库任务已存在" : "出库任务已存在"));
                    List<Dt_Task> taskOlds = BaseDal.QueryData(x=> taskDTO.Tasks.Select(x => x.TaskDescribe.ContainerCode).Contains(x.PalletCode));
                    List<Dt_LocationInfo> locationInfos = _locationInfoRepository.GetCanOut(taskDTO.Tasks.Select(x=>x.TaskDescribe.ContainerCode).ToList());
                    Dt_LocationInfo? noOutLocation = locationInfos.FirstOrDefault(x=>x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() || x.EnableStatus != EnableStatusEnum.Normal.ObjToInt());
                    if (noOutLocation != null) throw new Exception($"料箱{noOutLocation.PalletCode}货位{noOutLocation.LocationCode}状态不可出库");
                    List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData();
                    //下发任务组
                    string taskGroup= taskDTO.TaskGroupCode.IsNullOrEmpty() ? Guid.NewGuid().ToString().Replace("-","") : taskDTO.TaskGroupCode;
@@ -129,16 +124,28 @@
                        //获取操作台
                        Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.PickStationCode == item.TaskDescribe.ToStationCode);
                        if (stationManger == null) throw new Exception($"任务{item.TaskCode}出库目标操作台{item.TaskDescribe.ToStationCode}不存在");
                        Dt_Task? taskOld = taskOlds.FirstOrDefault(x=>x.PalletCode==item.TaskDescribe.ContainerCode);
                        if (taskOld != null)
                        {
                            errorMsg += $"料箱{taskOld.PalletCode}" + (taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "入库任务已存在;" : "出库任务已存在;");
                            content.FailData.Add(new BinCodeObj() { Bincode = item.TaskDescribe.ContainerCode });
                            continue;
                        }
                        Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.PalletCode == item.TaskDescribe.ContainerCode);
                        if (locationInfo == null)
                        {
                            errorMsg += $"料箱{item.TaskDescribe.ContainerCode}不存在;";
                            content.FailData.Add(new BinCodeObj() { Bincode = item.TaskDescribe.ContainerCode });
                            continue;
                        };
                        Dt_LocationInfo? noOutLocation = locationInfos.FirstOrDefault(x => (x.LocationStatus != LocationStatusEnum.InStock.ObjToInt() || x.EnableStatus != EnableStatusEnum.Normal.ObjToInt()) && x.PalletCode == item.TaskDescribe.ContainerCode);
                        if (noOutLocation != null)
                        {
                            errorMsg += $"料箱{noOutLocation.PalletCode}货位{noOutLocation.LocationCode}状态不可出库";
                            content.FailData.Add(new BinCodeObj() { Bincode = noOutLocation.PalletCode });
                            continue;
                        }
                        Dt_Task task = _mapper.Map<Dt_Task>(item);
                        task.SourceAddress = locationInfo.LocationCode;
                        task.CurrentAddress = locationInfo.LocationCode;
                        task.NextAddress = stationManger.PickStationCode;
@@ -149,6 +156,7 @@
                        task.DeviceCode = stationManger.CraneCode;
                        task.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
                        tasks.Add(task);
                        content.SucessData.Add(new BinCodeObj() { Bincode = item.TaskDescribe.ContainerCode });
                    }
                    locationInfos.ForEach(x =>
@@ -161,8 +169,11 @@
                    _locationInfoRepository.UpdateData(locationInfos);
                    _unitOfWorkManage.CommitTran();
                    _taskExecuteDetailService.AddTaskExecuteDetail(tasks.Select(x => x.TaskNum).ToList(), "接收WMS任务");
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfos, LocationStatusEnum.InStock, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, tasks.Select(x => x.TaskNum).ToList());
                    content = tasks.Count > 0 ? content.OK("成功!"+(errorMsg.IsNullOrEmpty()? "": errorMsg)) : content.Error("失败");
                    if (tasks.Count>0)
                    {
                        _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfos, LocationStatusEnum.InStock, LocationStatusEnum.Lock, LocationChangeType.OutboundAssignLocation, tasks);
                    }
                    content.OK(errorMsg.IsNullOrEmpty()? "成功": errorMsg);
                }
            }
            catch (Exception ex)
@@ -176,7 +187,7 @@
        /// å®¹å™¨å…¥åº“创建任务
        /// </summary>
        /// <returns></returns>
        public WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO, string deviceCode, string stationCode)
        public WebResponseContent ContainerFlow(ContainerFlowDTO containerFlowDTO, string deviceCode, string stationCode, int type = 0)
        {
            WebResponseContent content = new WebResponseContent();
            try
@@ -184,13 +195,27 @@
                List<Dt_LocationInfo> locationInfos = _locationInfoRepository.QueryData();
                Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.PalletCode == containerFlowDTO.ContainerCode);
                if (locationInfo != null) throw new Exception($"库位料箱号{containerFlowDTO.ContainerCode}已存在");
                if (BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && x.DeviceCode== deviceCode) != null)
                Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode);
                if (taskOld !=null && taskOld.PalletCode == containerFlowDTO.ContainerCode && taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() && taskOld.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && taskOld.DeviceCode == deviceCode)
                {
                    return content.OK();
                }
                else if(BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode) != null)
                if (taskOld != null && taskOld.PalletCode == containerFlowDTO.ContainerCode && taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() && taskOld.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && taskOld.DeviceCode != deviceCode)
                {
                    throw new Exception($"料箱号{containerFlowDTO.ContainerCode}任务已存在");
                    Dt_StationManger stationOld = _stationMangerRepository.QueryFirst(x => x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() && x.StationDeviceCode == deviceCode);
                    string oldSlotCode = taskOld.SourceAddress;
                    taskOld.SourceAddress = containerFlowDTO.SlotCode;
                    taskOld.CurrentAddress = containerFlowDTO.SlotCode;
                    taskOld.NextAddress = stationOld.StationCode;
                    taskOld.DeviceCode = stationOld.StationDeviceCode;
                    //更新任务
                    BaseDal.UpdateData(taskOld);
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { taskOld.TaskNum }, $"{oldSlotCode}换至{containerFlowDTO.SlotCode}入库");
                    return content.OK();
                }
                else if(taskOld != null)
                {
                    throw new Exception($"料箱号{containerFlowDTO.ContainerCode}" + (taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "入库AGV执行中": "出库AGV执行中"));
                }
                Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt());
                if (noInLocation == null) throw new Exception($"可用货位不足!");
@@ -207,9 +232,17 @@
                task.Roadway = noInLocation.RoadwayNo;
                task.DeviceCode = stationManger.StationDeviceCode;
                task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt();
                //添加任务
                BaseDal.AddData(task);
                _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "创建入库任务");
                if (type > 0)
                {
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "手动按钮入库");
                }
                else
                {
                    _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "创建入库任务");
                }
                content.OK("成功");
            }
            catch (Exception ex)
@@ -265,7 +298,36 @@
            WebResponseContent content = new WebResponseContent();
            try
            {
                EPLightContent pLightContent = new EPLightContent();
                if (taskSendLight.TagNo=="B2")
                {
                    List<EPLightSendDTO> lightSendDTOs = new List<EPLightSendDTO>()
                    {
                        new EPLightSendDTO
                        {
                            DOCNO = taskSendLight.DocNo,
                            TASKNO= taskSendLight.TaskNo,
                            LOCATION=taskSendLight.TagCode,
                            QUANTITY=taskSendLight.TagQunity,
                            LIGHTCOLOR=taskSendLight.Color switch
                            {
                                "Blue" => "1",
                                "Green" => "2",
                                "Red" => "4",
                                _ => throw new Exception($"未找到颜色定义")
                            },
                            ORDERTYPE=taskSendLight.Mode.ToString(),
                            LIGHTTYPE="1",
                        }
                    };
                    EPLightContent pLightContent = PickOrderInfoRequest(lightSendDTOs);
                    if (pLightContent.Result != "0") throw new Exception($"{pLightContent.Msg}");
                    content.OK();
                }
                else
                {
                    content.OK();
                }
            }
            catch (Exception ex)
            {
@@ -567,15 +629,16 @@
                        CompleteType = 1
                    };
                    string request = JsonConvert.SerializeObject(containerInFinishDTO, settings);
                    //调用接口
                    string response = HttpHelper.Post(url, request);
                    WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ?? throw new Exception($"{taskNum},未接收到WMS出库上报返回值");
                    if (wMSResponse.Code != "0") throw new Exception($"出库任务{task.TaskNum}WMS出库上报错误,信息:{wMSResponse.Msg}");
                    _unitOfWorkManage.BeginTran();
                    _locationInfoRepository.UpdateData(locationInfo);
                    BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.自动完成 : OperateTypeEnum.人工完成);
                    _unitOfWorkManage.CommitTran();
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, LocationStatusEnum.Lock, LocationStatusEnum.Free, LocationChangeType.OutboundCompleted, task.TaskNum);
                    //调用接口
                    string response = HttpHelper.Post(url, request);
                    WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ?? throw new Exception($"{taskNum},未接收到WMS出库上报返回值");
                    if (wMSResponse.Code != "0") content.Message=$"出库任务{task.TaskNum}WMS出库上报错误,信息:{wMSResponse.Msg}";
                }
                else if(task != null && task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//入库任务完成逻辑
                {
@@ -595,10 +658,7 @@
                        CompleteType = 2
                    };
                    string request = JsonConvert.SerializeObject(containerInFinishDTO, settings);
                    //调用接口
                    string response = HttpHelper.Post(url, request);
                    WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ?? throw new Exception($"{taskNum},未接收到WMS入库上报返回值");
                    if (wMSResponse.Code != "0") throw new Exception($"入库任务{task.TaskNum}WMS入库上报错误,信息:{wMSResponse.Msg}");
                    Dt_LocationInfo locationInfo = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.TargetAddress);
                    if (locationInfo.LocationStatus != LocationStatusEnum.Lock.ObjToInt())
                    {
@@ -612,6 +672,10 @@
                    BaseDal.DeleteAndMoveIntoHty(task, App.User?.UserId == 0 ? OperateTypeEnum.自动完成 : OperateTypeEnum.人工完成);
                    _unitOfWorkManage.CommitTran();
                    _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, LocationStatusEnum.Lock, LocationStatusEnum.InStock, LocationChangeType.InboundCompleted, task.TaskNum);
                    //调用接口
                    string response = HttpHelper.Post(url, request);
                    WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ?? throw new Exception($"{taskNum},未接收到WMS入库上报返回值");
                    if (wMSResponse.Code != "0") content.Message = $"入库任务{task.TaskNum}WMS入库上报错误,信息:{wMSResponse.Msg}";
                }
                content.OK("任务完成");
            }
@@ -622,11 +686,35 @@
            }
            return content;
        }
        /// <summary>
        /// äºŒæœŸæ’­ç§å¢™å›žä¼ 
        /// </summary>
        /// <returns></returns>
        public EPLightContent WMSLightBack(List<TaskBackLight> taskBackLights)
        {
            EPLightContent content = new EPLightContent();
            try
            {
                string? url = _apiInfoRepository.QueryFirst(x => x.ApiCode == APIEnum.WMSLightBack.ToString())?.ApiAddress;
                if (string.IsNullOrEmpty(url))
                {
                    return content.Error($"未找到播种墙上报,请检查接口配置");
                }
                string request = JsonConvert.SerializeObject(taskBackLights, settings);
                string response = HttpHelper.Post(url, request);
                WMSResponseContent wMSResponse = JsonConvert.DeserializeObject<WMSResponseContent>(response) ?? throw new Exception($"未接收到播种墙上报返回值");
                if (wMSResponse.Code != "0") throw new Exception($"播种墙上报错误,信息:{wMSResponse.Msg}");
                content.OK();
            }
            catch (Exception ex)
            {
                content.Error(ex.Message);
            }
            return content;
        }
        /// <summary>
        /// äºŒæœŸæ’­ç§å¢™ä¸‹å‘
        /// </summary>
        /// <param name="taskNum"></param>
        /// <returns></returns>
        public EPLightContent PickOrderInfoRequest(List<EPLightSendDTO> lightSendDTOs)
        {
@@ -638,7 +726,7 @@
                {
                    return content.Error($"未找到播种墙下发接口,请检查接口配置");
                }
                string request = JsonConvert.SerializeObject(lightSendDTOs, settings);
                string request = JsonConvert.SerializeObject(lightSendDTOs, settings).ToUpper();
                //调用接口
                string response = HttpHelper.Post(url, request);
                EPLightContent lightContent = JsonConvert.DeserializeObject<EPLightContent>(response) ?? throw new Exception($"未接收到播种墙下发上报返回值");
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/AGV/AGVExtend.cs
@@ -47,6 +47,7 @@
                                if (locationInfoStart == null || stationMangerEnd == null) throw new Exception($"未找到任务号${task.TaskNum}起始点{task.CurrentAddress}或目标点{task.NextAddress}位置信息");
                                agvTaskSend.RequestId = GroupId;
                                agvTaskSend.MissionCode = GroupId;
                                agvTaskSend.ViewBoardType = "W01";
                                if (task.Grade == 0)
                                {
                                    agvTaskSend.Priority = 99;
@@ -113,6 +114,7 @@
                            if (locationInfoEnd == null || stationMangerStart == null) throw new Exception($"未找到任务号${task.TaskNum}起始点{task.CurrentAddress}或目标点{task.NextAddress}位置信息");
                            agvTaskSend.RequestId = Guid.NewGuid().ToString().Replace("-", "");
                            agvTaskSend.MissionCode = task.TaskNum.ToString();
                            agvTaskSend.ViewBoardType = "W02";
                            if (task.Grade == 0)
                            {
                                agvTaskSend.Priority = 99;
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/Ò»ÆÚÏßÌå/ConveyorLineJob1.cs
@@ -18,6 +18,7 @@
using WIDESEAWCS_Communicator;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
@@ -104,7 +105,7 @@
                                        }
                                        BarCode1 = pickBarCode;
                                    }
                                    if (device.DeviceCode == "CL2" && BarCode1 != pickBarCode)
                                    if (device.DeviceCode == "CL2" && BarCode2 != pickBarCode)
                                    {
                                        WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, pickBarCode);
                                        if (content.Status)
@@ -133,9 +134,17 @@
                            if (InTake==256 && InBarCode.IsNotEmptyOrNull())
                            {
                                //申请入库任务
                                Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.TaskState != TaskStatusEnum.CL_Executing.ObjToInt() && x.DeviceCode==device.DeviceCode);
                                Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == InBarCode && x.TaskType == TaskTypeEnum.Inbound.ObjToInt() && x.DeviceCode==device.DeviceCode);
                                if (task != null) continue;
                                Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x=>x.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt());
                                ContainerFlowDTO containerFlowDTO = new ContainerFlowDTO()
                                {
                                    SlotCode = stationManger.PickStationCode,
                                    ContainerCode= InBarCode,
                                    Direction="100"
                                };
                                WebResponseContent responseContent = _taskService.ContainerFlow(containerFlowDTO, station.StationDeviceCode, stationManger.PickStationCode);
                                if (!responseContent.Status) throw new Exception(responseContent.Message);
                                WebResponseContent content = _taskService.RequestInTask(station.StationCode, InBarCode);
                                if (content.Status)
                                {
ÏîÄ¿´úÂë/WCSServices/WIDESEAWCS_Tasks/¶þÆÚÏßÌå/ConveyorLineJob2.cs
@@ -65,14 +65,14 @@
                                    //WebResponseContent content = WebResponseContent.Instance.OK();
                                    if (content.Status)
                                    {
                                        //写入拣选确认
                                        conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode);
                                        WriteInfo(conveyorLine.DeviceCode, $"{station.PickStationCode}拣选申请上报成功{PickBarCode}");
                                    }
                                    else
                                    {
                                        WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}拣选申请上报WMS错误{PickBarCode},信息{content.Message}");
                                    }
                                    //写入拣选确认
                                    conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode);
                                }
                                else
                                {
@@ -93,7 +93,7 @@
                                        ContainerCode = PickBarCode,
                                        Direction="100"
                                    };
                                    WebResponseContent responseContent = _taskService.ContainerFlow(containerFlowDTO, station.StationDeviceCode, station.PickStationCode);
                                    WebResponseContent responseContent = _taskService.ContainerFlow(containerFlowDTO, station.StationDeviceCode, station.PickStationCode,1);
                                    if (responseContent.Status)
                                    {
                                        conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), station.StationCode);
ÏîÄ¿×ÊÁÏ/½Ó¿Ú»ã×ÜÎļþ/WMS½Ó¿Ú¶Ô½ÓÎĵµ20251211_V1.1.3.docx
Binary files differ
ÏîÄ¿×ÊÁÏ/½Ó¿Ú»ã×ÜÎļþ/WMS½Ó¿Ú¶Ô½ÓÎĵµ20251216_V1.1.3.docx
Binary files differ