schangxiang@126.com
2025-09-10 3d43ffa3152110b7823f9fa6320c08a6ae02358a
1、增加 堆垛机运行统计
2、增加po单空物料描述
已添加8个文件
已修改21个文件
1519 ■■■■■ 文件已修改
SiemensWarehouse/siemens2-site/src/router/modules/router.js 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/utils/formatTime.js 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/views/stat/inventory/deviceGeneralInfo.vue 303 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/views/stat/inventory/purchaseEmptyMaterialCode.vue 308 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/代码业务逻辑梳理.txt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/开发帮助文档/常用代码/1、页面增加默认时间查询.txt 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/DLL/Yitter.IdGenerator.Net45.dll 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/WMS_TestForm/App.config 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/WMS_UnitTest/App.config 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/App.config 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/Model/Input/DeviceGeneralInfoInput.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/Model/Input/Purchase_OrderList_EmptyMaterialCodeInput.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/Program.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/orm2/Purchase_OrderList_EmptyMaterialCode.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
siemenswmssditcode/wmsService/wcftest/wmsService.csproj 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiemensWarehouse/siemens2-site/src/router/modules/router.js
@@ -476,7 +476,8 @@
            menu_Id: 1847,
            menuName: '反馈SAP数据失败查询'
        }
    },{
    },
    {
        path: '/stat/inventory/sapdata',
        component: () => import('@/views/stat/inventory/sapdata'),
        name: 'sapdata',
@@ -486,7 +487,30 @@
            menu_Id: 1845,
            menuName: '反馈SAP数据查询'
        }
    },{
    },
    {
        path: '/stat/inventory/deviceGeneralInfo',
        component: () => import('@/views/stat/inventory/deviceGeneralInfo'),
        name: 'deviceGeneralInfo',
        meta: {
            title: 'deviceGeneralInfo',
            icon: '',
            menu_Id: 1845,
            menuName: '堆垛机运行统计'
        }
    },
    {
        path: '/stat/inventory/purchaseEmptyMaterialCode',
        component: () => import('@/views/stat/inventory/purchaseEmptyMaterialCode'),
        name: 'purchaseEmptyMaterialCode',
        meta: {
            title: 'purchaseEmptyMaterialCode',
            icon: '',
            menu_Id: 1845,
            menuName: 'PO明细空物料号信息'
        }
    },
    {
        path: '/stat/inventory/early',
        component: () => import('@/views/stat/inventory/early'),
        name: 'early',
SiemensWarehouse/siemens2-site/src/utils/formatTime.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,180 @@
/**
 * æ—¶é—´æ—¥æœŸè½¬æ¢
 * @param date å½“前时间,new Date() æ ¼å¼
 * @param format éœ€è¦è½¬æ¢çš„æ—¶é—´æ ¼å¼å­—符串
 * @description format å­—符串随意,如 `YYYY-mm、YYYY-mm-dd`
 * @description format å­£åº¦ï¼š"YYYY-mm-dd HH:MM:SS QQQQ"
 * @description format æ˜ŸæœŸï¼š"YYYY-mm-dd HH:MM:SS WWW"
 * @description format å‡ å‘¨ï¼š"YYYY-mm-dd HH:MM:SS ZZZ"
 * @description format å­£åº¦ + æ˜ŸæœŸ + å‡ å‘¨ï¼š"YYYY-mm-dd HH:MM:SS WWW QQQQ ZZZ"
 * @returns è¿”回拼接后的时间字符串
 */
export function formatDate(date, format) {
    const we = date.getDay(); // æ˜ŸæœŸ
    const z = getWeek(date); // å‘¨
    const qut = Math.floor((date.getMonth() + 3) / 3).toString(); // å­£åº¦
    const opt = {
        'Y+': date.getFullYear().toString(), // å¹´
        'm+': (date.getMonth() + 1).toString(), // æœˆ(月份从0开始,要+1)
        'd+': date.getDate().toString(), // æ—¥
        'H+': date.getHours().toString(), // æ—¶
        'M+': date.getMinutes().toString(), // åˆ†
        'S+': date.getSeconds().toString(), // ç§’
        'q+': qut, // å­£åº¦
    };
    // ä¸­æ–‡æ•°å­— (星期)
    const week = {
        '0': '日',
        '1': '一',
        '2': '二',
        '3': '三',
        '4': '四',
        '5': '五',
        '6': '六',
    };
    // ä¸­æ–‡æ•°å­—(季度)
    const quarter = {
        '1': '一',
        '2': '二',
        '3': '三',
        '4': '四',
    };
    if (/(W+)/.test(format))
        format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? '星期' + week[we] : '周' + week[we]) : week[we]);
    if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '第' + quarter[qut] + '季度' : quarter[qut]);
    if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 3 ? '第' + z + '周' : z + '');
    for (const k in opt) {
        const r = new RegExp('(' + k + ')').exec(format);
        // è‹¥è¾“入的长度不为1,则前面补零
        if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0'));
    }
    return format;
}
/**
 * æ—¶é—´æ—¥æœŸè½¬æ¢
 * @param date å½“前时间,new Date() æ ¼å¼
 * @param format éœ€è¦è½¬æ¢çš„æ—¶é—´æ ¼å¼å­—符串
 * @description format å­—符串随意,如 `YYYY-mm、YYYY-mm-dd`
 * @description format å­£åº¦ï¼š"YYYY-mm-dd HH:MM:SS QQQQ"
 * @description format æ˜ŸæœŸï¼š"YYYY-mm-dd HH:MM:SS WWW"
 * @description format å‡ å‘¨ï¼š"YYYY-mm-dd HH:MM:SS ZZZ"
 * @description format å­£åº¦ + æ˜ŸæœŸ + å‡ å‘¨ï¼š"YYYY/MM/DD HH:mm:ss WWW QQQQ ZZZ"
 * @returns è¿”回拼接后的时间字符串   YYYY-MM-DD HH:mm:ss
 */
export function formatDateV2(date, format) {
    //debugger
    const we = date.getDay(); // æ˜ŸæœŸ
    const z = getWeek(date); // å‘¨
    const qut = Math.floor((date.getMonth() + 3) / 3).toString(); // å­£åº¦
    const opt = {
        'Y+': date.getFullYear().toString(), // å¹´
        'M+': (date.getMonth() + 1).toString(), // æœˆ(月份从0开始,要+1)
        'D+': date.getDate().toString(), // æ—¥
        'H+': date.getHours().toString(), // æ—¶
        'm+': date.getMinutes().toString(), // åˆ†
        's+': date.getSeconds().toString(), // ç§’
        'q+': qut, // å­£åº¦
    };
    // ä¸­æ–‡æ•°å­— (星期)
    const week = {
        '0': '日',
        '1': '一',
        '2': '二',
        '3': '三',
        '4': '四',
        '5': '五',
        '6': '六',
    };
    // ä¸­æ–‡æ•°å­—(季度)
    const quarter = {
        '1': '一',
        '2': '二',
        '3': '三',
        '4': '四',
    };
    if (/(W+)/.test(format))
        format = format.replace(RegExp.$1, RegExp.$1.length > 1 ? (RegExp.$1.length > 2 ? '星期' + week[we] : '周' + week[we]) : week[we]);
    if (/(Q+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 4 ? '第' + quarter[qut] + '季度' : quarter[qut]);
    if (/(Z+)/.test(format)) format = format.replace(RegExp.$1, RegExp.$1.length == 3 ? '第' + z + '周' : z + '');
    for (const k in opt) {
        const r = new RegExp('(' + k + ')').exec(format);
        // è‹¥è¾“入的长度不为1,则前面补零
        if (r) format = format.replace(r[1], RegExp.$1.length == 1 ? opt[k] : opt[k].padStart(RegExp.$1.length, '0'));
    }
    return format;
}
/**
 * èŽ·å–å½“å‰æ—¥æœŸæ˜¯ç¬¬å‡ å‘¨
 * @param dateTime å½“前传入的日期值
 * @returns è¿”回第几周数字值
 */
export function getWeek(dateTime) {
    const temptTime = new Date(dateTime.getTime());
    // å‘¨å‡ 
    const weekday = temptTime.getDay() || 7;
    // å‘¨1+5天=周六
    temptTime.setDate(temptTime.getDate() - weekday + 1 + 5);
    let firstDay = new Date(temptTime.getFullYear(), 0, 1);
    const dayOfWeek = firstDay.getDay();
    let spendDay = 1;
    if (dayOfWeek != 0) spendDay = 7 - dayOfWeek + 1;
    firstDay = new Date(temptTime.getFullYear(), 0, 1 + spendDay);
    const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000);
    const result = Math.ceil(d / 7);
    return result;
}
/**
 * æ—¶é—´é—®å€™è¯­
 * @param param å½“前时间,new Date() æ ¼å¼
 * @description param è°ƒç”¨ `formatAxis(new Date())` è¾“出 `上午好`
 * @returns è¿”回拼接后的时间字符串
 */
export function formatAxis(param) {
    const hour = new Date(param).getHours();
    if (hour < 6) return '凌晨好';
    else if (hour < 9) return '早上好';
    else if (hour < 12) return '上午好';
    else if (hour < 14) return '中午好';
    else if (hour < 17) return '下午好';
    else if (hour < 19) return '傍晚好';
    else if (hour < 22) return '晚上好';
    else return '夜里好';
}
//默认赋值 å½“前一周的时间
export function getThisWeekRange(flag) {
    //暂时都返回空
    //return ["",""];
    const today = new Date();
    const startOfWeek = new Date();
    // if(flag==1){//表示要查7天内数据
    //   //startOfWeek.setDate(today.getDate() -6); // å‡åŽ»ä»Šå¤©æ˜¯ä¸€å‘¨çš„ç¬¬å‡ å¤©ï¼Œå¾—åˆ°å‘¨ä¸€çš„æ—¥æœŸstartOfWeek
    //   startOfWeek.setDate(today.getDate() -2); // å‡åŽ»ä»Šå¤©æ˜¯ä¸€å‘¨çš„ç¬¬å‡ å¤©ï¼Œå¾—åˆ°å‘¨ä¸€çš„æ—¥æœŸstartOfWeek
    // }
    startOfWeek.setDate(today.getDate() - flag); // å‡åŽ»ä»Šå¤©æ˜¯ä¸€å‘¨çš„ç¬¬å‡ å¤©ï¼Œå¾—åˆ°å‘¨ä¸€çš„æ—¥æœŸstartOfWeek
    startOfWeek.setHours(0, 0, 0, 0); // è®¾ç½®æ—¶ã€åˆ†ã€ç§’和毫秒数
    const endOfWeek = new Date(today);
    endOfWeek.setDate(endOfWeek.getDate() + 1);
    //endOfWeek.setHours(23, 59, 59, 999); // è®¾ç½®æ—¶ã€åˆ†ã€ç§’和毫秒数
    endOfWeek.setHours(0, 0, 0, 0); // è®¾ç½®æ—¶ã€åˆ†ã€ç§’和毫秒数
    //return [moment(startOfWeek,"YYYY-MM-DD HH:mm"), moment(endOfWeek,"YYYY-MM-DD HH:mm")];
    //return [moment(startOfWeek), moment(endOfWeek)];
    // const startStr = formatDateV2(startOfWeek,'YYYY-MM-DD HH:mm:ss');
    // const endStr = formatDateV2(endOfWeek,'YYYY-MM-DD HH:mm:ss');
    //return [new Date(startStr), new Date(endStr)];
    // const startStr = formatDateV2(startOfWeek, 'yyyy-MM-dd HH:mm:ss');
    // const endStr = formatDateV2(endOfWeek, 'yyyy-MM-dd HH:mm:ss');
    // return [startStr, endStr];
     // âœ… ç›´æŽ¥è¿”回 Date å¯¹è±¡çš„æ•°ç»„
     return [startOfWeek, endOfWeek];
    //*/
}
SiemensWarehouse/siemens2-site/src/views/stat/inventory/deviceGeneralInfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,303 @@
<template>
  <!-- é¢åŒ…屑导航区 -->
  <div class="indexs">
    <el-card>
      <el-row>
        <el-button type="success" plain @click="exportExcel" >导出Excel</el-button>
            <el-date-picker
            v-model="datatime"
            size="large"
            type="datetimerange"
            value-format="yyyy-MM-dd HH:mm:ss"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
            <el-button type="success" plain @click="find(1)" >查询</el-button>
             <el-button type="info" plain @click="reset" >重置</el-button>
      </el-row>
      <!-- æ˜¾ç¤ºäººå‘˜åˆ—表 -->
      <el-table ref= "table"  :max-height="tableHeight" :data="TakeStocklist" bottom= "10%" border stripe >
        <el-table-column
      type="selection"
      width="55">
    </el-table-column>
        <el-table-column
        label="序号"
      type="index"
      width="50">
    </el-table-column>
        <el-table-column label="运行时间(分钟)" prop="deviceRunTime" width="220"></el-table-column>
        <el-table-column label="报警时间(分钟)" prop="deviceAlarmTime" width="220"></el-table-column>
        <el-table-column label="等待时间(分钟)" prop="deviceWaitTime" width="220"></el-table-column>
        <el-table-column label="时间" prop="createTime" width="170" :formatter="formatterDateTime" ></el-table-column>
      </el-table>
      <el-pagination
        :current-page="queryInfo.pagenum"
        :page-sizes="[5,10, 15, 20,50,100,1000,10000]"
        :page-size="queryInfo.pagesize"
        :total="total"
        layout="total, sizes, prev, pager, next, jumper"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      >
      </el-pagination>
    </el-card>
  </div>
</template>
<script>
import { parseTime,formatDate } from '@/utils'
import { getThisWeekRange} from '@/utils/formatTime.js'
export default {
  data() {
    return {
      tableHeight:window.innerHeight-204,
      searchParam: {
        materialName: null,
        materialCode: null,
        SalesOrder: null
      },
      queryInfo: {
        // å½“前页
        pagenum: 1,
        // æ¯é¡µæ˜¾ç¤ºå¤šå°‘条信息s
        pagesize: 10
      },
      TakeStocklist: [],
      TakeStocklistAll: [],
      total: 0,
      datatime: '',
      selectType: [
        { value: '1', label: '出库' }, { value: '2', label: '移库' }, { value: '3', label: '收货' }, { value: '4', label: '按凭证退货' }],
      selectTypeValue: '',
      dialogFormVisible: false,
      productList: [],
      updateDate: null
    }
  },
  created() {},
  mounted() {
      this.initTimeData();
    this.find(1)
  },
  methods: {
     initTimeData(){
      this.datatime= '';
      this.datatime= getThisWeekRange(30);//启用了
    },
     // æ—¶é—´è½¬æ¢
    formatterDateTime (row, column, cellValue, index) {
      if (cellValue === null || cellValue === '') {
        return ''
      }
      var NewDtime = new Date(cellValue)
      return formatDate(NewDtime, 'yyyy-MM-dd hh:mm:ss')
    },
    // ç›‘听 pagesize æ”¹å˜
    handleSizeChange(newSizd) {
      this.queryInfo.pagesize = newSizd
      this.queryInfo.pagenum = 1
      this.find(1)
    },
    // ç›‘听 é¡µç å€¼æ”¹å˜
    handleCurrentChange(newpage) {
      this.queryInfo.pagenum = newpage
      this.find(2)
    },
    userStatusChange(userinfo) {
      console.log(userinfo)
    },
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
          return
        }
        if (index != 5) {
          sums[index] = ''
          return
        }
        const values = data.map(item => Number(item[column.property]))
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            const value = Number(curr)
            if (!isNaN(value)) {
              return prev + curr
            } else {
              return prev
            }
          }, 0)
          sums[index] += ' '
        } else {
          sums[index] = 'N/A'
        }
        sums[index] = Number(sums[index]).toFixed(2)
      })
      return sums
    },
    formatJson(filterVal, jsonData) {
      return jsonData.map(v =>
        filterVal.map(j => {
          if (j === 'createTime') {
            return parseTime(v[j])
          }
          else if (j === 'moveType') {
            return this.setMoveTypeStr(v[j])
          }
          else if (j === 'isFinish') {
            return this.setIsFinishStr(v[j])
          } else {
            return v[j]
          }
        })
      )
    },
    find(ischang = 1) {
      if (ischang == 1) {
        this.queryInfo.pagenum = 1
      }
      const url = '/api/task/queryPageDeviceGeneralInfo'
      const params = {
        search: this.searchParam,
        queryInfo: this.queryInfo, //分页
        positionTypeValue: this.selectTypeValue, //下拉框的值
        datatime: this.datatime, //日期
        alarmValue: 1
      }
      var callback = res => {
        //debugger
        if (res.result === true) {
          res.data.forEach(item => {
            item.moveType =this.setMoveTypeStr(item.moveType)
             item.isFinish =this.setIsFinishStr(item.isFinish)
          })
          this.TakeStocklist = res.data
          this.TakeStocklistAll = res.data2
          this.total = res.countPrint
        } else {
          this.TakeStocklist = []
          this.TakeStocklistAll = []
          this.total = 0
          return this.$message.success('当前条件 æŸ¥ä¸åˆ°æ•°æ®!')
        }
      }
      this.common.ajax(url, params, callback, true)
    },
    find_export(ischang = 1) {
      if (ischang == 1) {
        this.queryInfo.pagenum = 1
      }
      const url = '/api/task/queryPageDeviceGeneralInfo'
      const params = {
         IsLoadAllData:true,//加载全部
        search: this.searchParam,
        queryInfo: this.queryInfo, //分页
        positionTypeValue: this.selectTypeValue, //下拉框的值
        datatime: this.datatime, //日期
        alarmValue: 1
      }
      var callback = res => {
        //debugger
        if (res.result === true) {
          res.data2.forEach(item => {
            item.moveType =this.setMoveTypeStr(item.moveType)
             item.isFinish =this.setIsFinishStr(item.isFinish)
          })
          this.TakeStocklistAll = res.data2
          this.do_exportExcel()
        } else {
          this.TakeStocklistAll = []
          return this.$message.success('当前条件 æŸ¥ä¸åˆ°æ•°æ®!')
        }
      }
      this.common.ajax(url, params, callback, true)
    },
    do_exportExcel() {
      // import("@/vendor/Export2Excel")
      this.downloadLoading = true
      import('@/vendor/Export2Excel').then(excel => {
        const tHeader = ['运行时间(分钟)', '报警时间(分钟)', '等待时间(分钟)','时间']
        const filterVal = ['deviceRunTime', 'deviceAlarmTime', 'deviceWaitTime', 'createTime']
        const data = this.formatJson(filterVal, this.TakeStocklistAll)
        excel.export_json_to_excel({
          header: tHeader,
          data,
          filename: '堆垛机运行统计'
        })
        this.downloadLoading = false
      })
    },
      exportExcel() {
      this.find_export(1)
    },
    setMoveTypeStr(moveType){
        if (moveType === 1) return'出库'
        if (moveType === 2) return '移库'
        if (moveType === 3) return '收货'
        if (moveType === 4) return '按凭证退货'
        return ''
    },
    setIsFinishStr(isFinish){
        if (isFinish === 1) {
                return '已完成'
             }else{
               return '未完成'
             }
    },
    reset() {
      this.searchParam.materialName = null
      this.searchParam.materialCode = null
      this.searchParam.SalesOrder = null
      this.selectTypeValue = ''
      this.datatime = ''
      this.initTimeData();//重置时间
      this.find()
    }
  }
}
</script>
<style lang="postcss" scoped>
.el-table .el-pagination {
  margin-top: 10px;
  line-height: 30px;
  margin-bottom: 0%;
}
.el-row {
  text-align: left;
}
.selectValues {
  width: 420px;
}
.search {
  width: 200px;
}
.selectTypeValue {
  width: 150px;
}
.el-card {
  padding: 0%;
  margin-bottom: 0%;
    /* 84 = navbar + tags-view = 50 +34 */
  max-height: calc(100vh - 104px);
}
thead .el-table-column--selection .cell {
  display: none;
}
.el-scrollbar{
    .el-scrollbar__bar.is-vertical {
      opacity: 1;/* æ”¹ä¸º0不显示滚动条*/
      width:5;
    }
  }
</style>
SiemensWarehouse/siemens2-site/src/views/stat/inventory/early.vue
@@ -15,7 +15,7 @@
           <el-input v-model="searchParam.materialName" placeholder="物料名称" class="search"></el-input>
           <el-input v-model="searchParam.materialCode" placeholder="物料编号" class="search"></el-input>
            <el-input v-model="searchParam.tranckNnmber" placeholder="跟踪号" class="search"></el-input>
            <el-date-picker
           <!-- <el-date-picker
            v-model="datatime"
            size="large"
            type="datetimerange"
@@ -24,7 +24,7 @@
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
          </el-date-picker>  -->
            <el-button type="success" plain @click="find(1)" >查询</el-button>
             <el-button type="info" plain @click="reset" >重置</el-button>
      </el-row>
SiemensWarehouse/siemens2-site/src/views/stat/inventory/lower.vue
@@ -3,7 +3,7 @@
  <div class="indexs">
    <el-card>
      <el-row>
        <el-button type="success" plain @click="exportExcel" >导出本页Excel</el-button>
        <el-button type="success" plain @click="exportExcel" >导出Excel</el-button>
          <el-button type="danger" @click="openAlarm">设备异常报警统计</el-button>
         <el-select v-model="selectTypeValue" placeholder="选择设备名称" class="selectTypeValue" @change="selectChang">
               <el-option
@@ -82,6 +82,7 @@
<script>
import { parseTime } from '@/utils'
import { getDate } from '@/utils/dateTime'
import { getThisWeekRange} from '@/utils/formatTime.js'
export default {
  data() {
    return {
@@ -114,9 +115,14 @@
  },
  created() {},
  mounted() {
      this.initTimeData();
    this.find()
  },
  methods: {
     initTimeData(){
      this.datatime= '';
      this.datatime= getThisWeekRange(30);//启用了
    },
    // ç›‘听 pagesize æ”¹å˜
    handleSizeChange(newSizd) {
      this.queryInfo.pagesize = newSizd
@@ -269,6 +275,7 @@
      this.queryInfo.pagenum = 1
      this.pagesize = 10
      this.datatime = ''
      this.initTimeData();//重置时间
      this.find()
    },
    resetChild() {
SiemensWarehouse/siemens2-site/src/views/stat/inventory/purchaseEmptyMaterialCode.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,308 @@
<template>
  <!-- é¢åŒ…屑导航区 -->
  <div class="indexs">
    <el-card>
      <el-row>
        <el-button type="success" plain @click="exportExcel" >导出Excel</el-button>
        <el-input v-model="searchParam.PoCode" placeholder="PO单号" class="search"></el-input>
           <el-input v-model="searchParam.ProductName" placeholder="物料名称" class="search"></el-input>
            <el-input v-model="searchParam.ItemNumber" placeholder="项号" class="search"></el-input>
            <el-date-picker
            v-model="datatime"
            size="large"
            type="datetimerange"
            value-format="yyyy-MM-dd HH:mm:ss"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
            <el-button type="success" plain @click="find(1)" >查询</el-button>
             <el-button type="info" plain @click="reset" >重置</el-button>
      </el-row>
      <!-- æ˜¾ç¤ºäººå‘˜åˆ—表 -->
      <el-table ref= "table"  :max-height="tableHeight" :data="TakeStocklist" bottom= "10%" border stripe >
        <el-table-column
      type="selection"
      width="55">
    </el-table-column>
        <el-table-column
        label="序号"
      type="index"
      width="50">
    </el-table-column>
        <el-table-column label="PO单号" prop="PoCode" width="200"></el-table-column>
        <el-table-column label="物料名称" prop="ProductName" width="300" ></el-table-column>
         <el-table-column label="项号" prop="ItemNumber" width="300" ></el-table-column>
        <el-table-column label="时间" prop="CreateTime" width="170" :formatter="formatterDateTime" ></el-table-column>
        <el-table-column label="备注" prop="Remark" width="120"></el-table-column>
      </el-table>
      <el-pagination
        :current-page="queryInfo.pagenum"
        :page-sizes="[5,10, 15, 20,50,100,1000,10000]"
        :page-size="queryInfo.pagesize"
        :total="total"
        layout="total, sizes, prev, pager, next, jumper"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      >
      </el-pagination>
    </el-card>
  </div>
</template>
<script>
import { parseTime,formatDate} from '@/utils'
import { getThisWeekRange} from '@/utils/formatTime.js'
export default {
  data() {
    return {
      tableHeight:window.innerHeight-204,
      searchParam: {
        ProductName: null,
        MaterialCode: null,
        ItemNumber: null
      },
      queryInfo: {
        // å½“前页
        pagenum: 1,
        // æ¯é¡µæ˜¾ç¤ºå¤šå°‘条信息s
        pagesize: 10
      },
      TakeStocklist: [],
      TakeStocklistAll: [],
      total: 0,
      datatime: '',
      selectType: [
        { value: '1', label: '出库' }, { value: '2', label: '移库' }, { value: '3', label: '收货' }, { value: '4', label: '按凭证退货' }],
      selectTypeValue: '',
      dialogFormVisible: false,
      productList: [],
      updateDate: null
    }
  },
  created() {},
  mounted() {
    this.initTimeData();
    this.find(1)
  },
  methods: {
    initTimeData(){
      this.datatime= '';
      this.datatime= getThisWeekRange(30);//启用了
    },
     // æ—¶é—´è½¬æ¢
    formatterDateTime (row, column, cellValue, index) {
      if (cellValue === null || cellValue === '') {
        return ''
      }
      var NewDtime = new Date(cellValue)
      return formatDate(NewDtime, 'yyyy-MM-dd hh:mm:ss')
    },
    // ç›‘听 pagesize æ”¹å˜
    handleSizeChange(newSizd) {
      this.queryInfo.pagesize = newSizd
      this.queryInfo.pagenum = 1
      this.find(1)
    },
    // ç›‘听 é¡µç å€¼æ”¹å˜
    handleCurrentChange(newpage) {
      this.queryInfo.pagenum = newpage
      this.find(2)
    },
    userStatusChange(userinfo) {
      console.log(userinfo)
    },
    getSummaries(param) {
      const { columns, data } = param
      const sums = []
      columns.forEach((column, index) => {
        if (index === 0) {
          sums[index] = '合计'
          return
        }
        if (index != 5) {
          sums[index] = ''
          return
        }
        const values = data.map(item => Number(item[column.property]))
        if (!values.every(value => isNaN(value))) {
          sums[index] = values.reduce((prev, curr) => {
            const value = Number(curr)
            if (!isNaN(value)) {
              return prev + curr
            } else {
              return prev
            }
          }, 0)
          sums[index] += ' '
        } else {
          sums[index] = 'N/A'
        }
        sums[index] = Number(sums[index]).toFixed(2)
      })
      return sums
    },
    formatJson(filterVal, jsonData) {
      return jsonData.map(v =>
        filterVal.map(j => {
          if (j === 'CreateTime') {
            return parseTime(v[j])
          }
          else if (j === 'moveType') {
            return this.setMoveTypeStr(v[j])
          }
          else if (j === 'isFinish') {
            return this.setIsFinishStr(v[j])
          } else {
            return v[j]
          }
        })
      )
    },
    find(ischang = 1) {
      if (ischang == 1) {
        this.queryInfo.pagenum = 1
      }
      const url = '/api/task/queryPagePurchaseEmptyMaterialCode'
      const params = {
        search: this.searchParam,
        queryInfo: this.queryInfo, //分页
        positionTypeValue: this.selectTypeValue, //下拉框的值
        datatime: this.datatime, //日期
        alarmValue: 1
      }
      var callback = res => {
        //debugger
        if (res.result === true) {
          res.data.forEach(item => {
            item.moveType =this.setMoveTypeStr(item.moveType)
             item.isFinish =this.setIsFinishStr(item.isFinish)
          })
          this.TakeStocklist = res.data
          this.TakeStocklistAll = res.data2
          this.total = res.countPrint
        } else {
          this.TakeStocklist = []
          this.TakeStocklistAll = []
          this.total = 0
          return this.$message.success('当前条件 æŸ¥ä¸åˆ°æ•°æ®!')
        }
      }
      this.common.ajax(url, params, callback, true)
    },
    find_export(ischang = 1) {
      if (ischang == 1) {
        this.queryInfo.pagenum = 1
      }
      const url = '/api/task/queryPagePurchaseEmptyMaterialCode'
      const params = {
         IsLoadAllData:true,//加载全部
        search: this.searchParam,
        queryInfo: this.queryInfo, //分页
        positionTypeValue: this.selectTypeValue, //下拉框的值
        datatime: this.datatime, //日期
        alarmValue: 1
      }
      var callback = res => {
        //debugger
        if (res.result === true) {
          res.data2.forEach(item => {
            item.moveType =this.setMoveTypeStr(item.moveType)
             item.isFinish =this.setIsFinishStr(item.isFinish)
          })
          this.TakeStocklistAll = res.data2
          this.do_exportExcel()
        } else {
          this.TakeStocklistAll = []
          return this.$message.success('当前条件 æŸ¥ä¸åˆ°æ•°æ®!')
        }
      }
      this.common.ajax(url, params, callback, true)
    },
    do_exportExcel() {
      // import("@/vendor/Export2Excel")
      this.downloadLoading = true
      import('@/vendor/Export2Excel').then(excel => {
        const tHeader = ['PO单号', '物料名称', '项号', '时间','备注']
        const filterVal = ['PoCode', 'ProductName', 'ItemNumber', 'CreateTime', 'Remark']
        const data = this.formatJson(filterVal, this.TakeStocklistAll)
        excel.export_json_to_excel({
          header: tHeader,
          data,
          filename: 'PO明细空物料号信息'
        })
        this.downloadLoading = false
      })
    },
      exportExcel() {
      this.find_export(1)
    },
    setMoveTypeStr(moveType){
        if (moveType === 1) return'出库'
        if (moveType === 2) return '移库'
        if (moveType === 3) return '收货'
        if (moveType === 4) return '按凭证退货'
        return ''
    },
    setIsFinishStr(isFinish){
        if (isFinish === 1) {
                return '已完成'
             }else{
               return '未完成'
             }
    },
    reset() {
      this.searchParam.ProductName = null
      this.searchParam.MaterialCode = null
      this.searchParam.ItemNumber = null
      this.selectTypeValue = ''
      this.datatime = ''
      this.initTimeData();//重置时间
      this.find()
    }
  }
}
</script>
<style lang="postcss" scoped>
.el-table .el-pagination {
  margin-top: 10px;
  line-height: 30px;
  margin-bottom: 0%;
}
.el-row {
  text-align: left;
}
.selectValues {
  width: 420px;
}
.search {
  width: 200px;
}
.selectTypeValue {
  width: 150px;
}
.el-card {
  padding: 0%;
  margin-bottom: 0%;
    /* 84 = navbar + tags-view = 50 +34 */
  max-height: calc(100vh - 104px);
}
thead .el-table-column--selection .cell {
  display: none;
}
.el-scrollbar{
    .el-scrollbar__bar.is-vertical {
      opacity: 1;/* æ”¹ä¸º0不显示滚动条*/
      width:5;
    }
  }
</style>
SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata.vue
@@ -70,6 +70,7 @@
</template>
<script>
import { parseTime,formatDate } from '@/utils'
import { getThisWeekRange} from '@/utils/formatTime.js'
export default {
  data() {
    return {
@@ -100,9 +101,14 @@
  },
  created() {},
  mounted() {
      this.initTimeData();
    this.find(1)
  },
  methods: {
     initTimeData(){
      this.datatime= '';
      this.datatime= getThisWeekRange(60);//启用了
    },
     // æ—¶é—´è½¬æ¢
    formatterDateTime (row, column, cellValue, index) {
      if (cellValue === null || cellValue === '') {
@@ -275,6 +281,7 @@
      this.searchParam.SalesOrder = null
      this.selectTypeValue = ''
      this.datatime = ''
      this.initTimeData();//重置时间
      this.find()
    }
  }
SiemensWarehouse/siemens2-site/src/views/stat/inventory/sapdata_fail.vue
@@ -76,6 +76,7 @@
</template>
<script>
import { parseTime,formatDate } from '@/utils'
import { getThisWeekRange} from '@/utils/formatTime.js'
export default {
  data() {
    return {
@@ -107,9 +108,14 @@
  },
  created() {},
  mounted() {
      this.initTimeData();
    this.find(1)
  },
  methods: {
     initTimeData(){
      this.datatime= '';
      this.datatime= getThisWeekRange(60);//启用了
    },
     // æ—¶é—´è½¬æ¢
    formatterDateTime (row, column, cellValue, index) {
      if (cellValue === null || cellValue === '') {
@@ -259,6 +265,7 @@
      this.searchParam.purchaseCode = null
      this.selectTypeValue = ''
      this.datatime = ''
      this.initTimeData();//重置时间
      this.find()
    }
  }
SiemensWarehouse/´úÂëÒµÎñÂß¼­ÊáÀí.txt
@@ -1,3 +1,6 @@
0、获取PO单流程
      ç•Œé¢ä¸Šè¾“å…¥ po单号=》调用wcftest接口getPoList=》调用sap接口 GetPurchaseOrder=》写入到wms表。
1、入库流程
       ï¼ˆ1)收货,输入采购单号和项号,调用接口 inbound/inScan/getData查询,查询这个项号待收多少,已收多少。
       ï¼ˆ2)点击按钮【确认】,请求接口receiptConvert,
SiemensWarehouse/¿ª·¢°ïÖúÎĵµ/³£ÓôúÂë/1¡¢Ò³ÃæÔö¼ÓĬÈÏʱ¼ä²éѯ.txt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
import { getThisWeekRange} from '@/utils/formatTime.js'
 initTimeData(){
      this.datatime= '';
      this.datatime= getThisWeekRange(30);//启用了
    },
1、在mounted方法中,find前面调用方法
  this.initTimeData();
    this.find(1)
2、在 reset æ–¹æ³•中调用
this.initTimeData();//重置时间
      this.find()
siemenswmssditcode/sql/DBScript/01_DDL/01_DDL_TABLE.sql
@@ -255,4 +255,35 @@
GO
use YrtWMS_Siemens2;
go
/*==============================================================*/
/* Table: Purchase_OrderList_EmptyMaterialCode */
/* Description: PO明细空物料号表                                */
/* Author:shaocx                                                */
/* CreateTime:2025-09-09                                    */
/*==============================================================*/
IF NOT EXISTS( SELECT 1 FROM SYSOBJECTS  WHERE ID = OBJECT_ID('Purchase_OrderList_EmptyMaterialCode') AND TYPE = 'U')
create table Purchase_OrderList_EmptyMaterialCode (
   ID            bigint        NOT NULL, -- ä¸»é”®
   PoCode        nvarchar(50) null,-- é‡‡è´­å•号
   ProductName   nvarchar(500) null,-- ç‰©æ–™åç§°
   Quantity    decimal  null, --  æ•°é‡
   ItemNumber   nvarchar(50) null,-- é¡¹å·
   BatchNumber  nvarchar(50) null,-- æ‰¹æ¬¡å·
   Remark      nvarchar(2000)      null, --  å¤‡æ³¨
   Creator        varchar(128)    null,-- åˆ›å»ºäºº
   CreateTime        datetime    null,-- åˆ›å»ºæ—¶é—´
   LastModifier        varchar(128)    null,-- ä¿®æ”¹äºº
   LastModifyTime   datetime    null -- ä¿®æ”¹æ—¶é—´
   constraint PK_Purchase_OrderList_EmptyMaterialCode_Id primary key (ID)
)
GO
siemenswmssditcode/wmsService/DLL/Yitter.IdGenerator.Net45.dll
Binary files differ
siemenswmssditcode/wmsService/WMS_TestForm/App.config
@@ -1,29 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections></configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
  </startup>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IControlCenterWcfService" />
        <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647"  maxReceivedMessageSize="2147483647"/>
        <binding name="BasicHttpBinding_IControlCenterWcfService"/>
        <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService"
        contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" />
      <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService"
        contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" />
      <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/>
      <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/>
    </client>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
@@ -31,13 +27,13 @@
      <service name="wcftest.wcf.apitest">
        <endpoint address="" binding="basicHttpBinding" contract="wcftest.wcf.Iapitest">
          <identity>
            <dns value="localhost" />
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/" />
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/"/>
            <!--<add baseAddress="http://192.168.0.191:8733/Design_Time_Addresses/wcftest.wcf/apitest/ " _Dev />-->
          </baseAddresses>
        </host>
@@ -45,14 +41,14 @@
    </services>
  </system.serviceModel>
  <connectionStrings>
    <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
    <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>
    <!--是否是虚拟仿真模式,true:是,false:否。生产环境要配置为false ã€EditBy shaocx,2022-01-27】-->
    <add key="IsVirtualMode" value="true"/>
  </appSettings>
</configuration>
</configuration>
siemenswmssditcode/wmsService/WMS_TestForm/Properties/Resources.Designer.cs
@@ -1,17 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     æ­¤ä»£ç ç”±å·¥å…·ç”Ÿæˆã€‚
//     è¿è¡Œæ—¶ç‰ˆæœ¬: 4.0.30319.42000
//     è¿è¡Œæ—¶ç‰ˆæœ¬:4.0.30319.42000
//
//     å¯¹æ­¤æ–‡ä»¶çš„æ›´æ”¹å¯èƒ½ä¼šå¯¼è‡´ä¸æ­£ç¡®çš„行为,并且如果
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œè¿™äº›æ›´æ”¹å°†ä¸¢å¤±ã€‚
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œè¿™äº›æ›´æ”¹å°†ä¼šä¸¢å¤±ã€‚
// </auto-generated>
//------------------------------------------------------------------------------
namespace WMS_TestForm.Properties
{
namespace WMS_TestForm.Properties {
    using System;
    /// <summary>
    ///   ä¸€ä¸ªå¼ºç±»åž‹çš„资源类,用于查找本地化的字符串等。
    /// </summary>
@@ -22,48 +22,40 @@
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources
    {
    internal class Resources {
        private static global::System.Resources.ResourceManager resourceMan;
        private static global::System.Globalization.CultureInfo resourceCulture;
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources()
        {
        internal Resources() {
        }
        /// <summary>
        ///   è¿”回此类使用的、缓存的 ResourceManager å®žä¾‹ã€‚
        ///   è¿”回此类使用的缓存的 ResourceManager å®žä¾‹ã€‚
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager
        {
            get
            {
                if ((resourceMan == null))
                {
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WMS_TestForm.Properties.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        /// <summary>
        ///   ä¸ºæ‰€æœ‰èµ„源查找重写当前线程的 CurrentUICulture å±žæ€§ï¼Œ
        ///   æ–¹æ³•是使用此强类型资源类。
        ///   ä½¿ç”¨æ­¤å¼ºç±»åž‹èµ„源类,为所有资源查找
        ///   é‡å†™å½“前线程的 CurrentUICulture å±žæ€§ã€‚
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture
        {
            get
            {
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set
            {
            set {
                resourceCulture = value;
            }
        }
siemenswmssditcode/wmsService/WMS_TestForm/Properties/Settings.Designer.cs
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//     æ­¤ä»£ç ç”±å·¥å…·ç”Ÿæˆã€‚
//     è¿è¡Œæ—¶ç‰ˆæœ¬:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
//     å¯¹æ­¤æ–‡ä»¶çš„æ›´æ”¹å¯èƒ½ä¼šå¯¼è‡´ä¸æ­£ç¡®çš„行为,并且如果
//     é‡æ–°ç”Ÿæˆä»£ç ï¼Œè¿™äº›æ›´æ”¹å°†ä¼šä¸¢å¤±ã€‚
// </auto-generated>
//------------------------------------------------------------------------------
namespace WMS_TestForm.Properties
{
namespace WMS_TestForm.Properties {
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
    {
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
        public static Settings Default
        {
            get
            {
        public static Settings Default {
            get {
                return defaultInstance;
            }
        }
siemenswmssditcode/wmsService/WMS_TestForm/WMS_TestForm.csproj
@@ -9,8 +9,9 @@
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>WMS_TestForm</RootNamespace>
    <AssemblyName>WMS_TestForm</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
@@ -74,6 +75,7 @@
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
siemenswmssditcode/wmsService/WMS_UnitTest/App.config
@@ -1,29 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections></configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
  </startup>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IControlCenterWcfService" />
        <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647"  maxReceivedMessageSize="2147483647"/>
        <binding name="BasicHttpBinding_IControlCenterWcfService"/>
        <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService"
        contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" />
      <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService"
        contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" />
      <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/>
      <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/>
    </client>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
@@ -31,13 +27,13 @@
      <service name="wcftest.wcf.apitest">
        <endpoint address="" binding="basicHttpBinding" contract="wcftest.wcf.Iapitest">
          <identity>
            <dns value="localhost" />
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/" />
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/"/>
            <!--<add baseAddress="http://192.168.0.191:8733/Design_Time_Addresses/wcftest.wcf/apitest/ " _Dev />-->
          </baseAddresses>
        </host>
@@ -45,14 +41,14 @@
    </services>
  </system.serviceModel>
  <connectionStrings>
    <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
    <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>
    <!--是否是虚拟仿真模式,true:是,false:否。生产环境要配置为false ã€EditBy shaocx,2022-01-27】-->
    <add key="IsVirtualMode" value="true"/>
  </appSettings>
</configuration>
</configuration>
siemenswmssditcode/wmsService/WMS_UnitTest/WMS_UnitTest.csproj
@@ -8,7 +8,7 @@
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>WMS_UnitTest</RootNamespace>
    <AssemblyName>WMS_UnitTest</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -16,6 +16,7 @@
    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
    <IsCodedUITest>False</IsCodedUITest>
    <TestProjectType>UnitTest</TestProjectType>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
siemenswmssditcode/wmsService/wcftest/App.config
@@ -1,30 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections></configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
  </startup>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IControlCenterWcfService" />
        <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647"
          maxReceivedMessageSize="2147483647" />
        <binding name="BasicHttpBinding_IControlCenterWcfService"/>
        <binding name="BasicHttpBinding_ISapWcfService" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"/>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService"
        contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService" />
      <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/"
        binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService"
        contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService" />
      <endpoint address="http://localhost:8733/Design_Time_Addresses/iWareSAP.WCF/SapWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISapWcfService" contract="sendToSap.ISapWcfService" name="BasicHttpBinding_ISapWcfService"/>
      <endpoint address="http://localhost:8733/Design_Time_Addresses/IWareCC.WCf.ControlCenterWcfService/ControlCenterWcfService/" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IControlCenterWcfService" contract="wcfApi.IControlCenterWcfService" name="BasicHttpBinding_IControlCenterWcfService"/>
    </client>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
@@ -32,13 +27,13 @@
      <service name="wcftest.wcf.apitest">
        <endpoint address="" binding="basicHttpBinding" contract="wcftest.wcf.Iapitest">
          <identity>
            <dns value="localhost" />
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/" />
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/wcftest.wcf/apitest/"/>
            <!--<add baseAddress="http://192.168.0.191:8733/Design_Time_Addresses/wcftest.wcf/apitest/ " _Dev />-->
          </baseAddresses>
        </host>
@@ -46,14 +41,14 @@
    </services>
  </system.serviceModel>
  <connectionStrings>
    <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    <add name="dbModel" connectionString="data source=.;initial catalog=YrtWMS_Siemens2;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
    <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
    <add name="deviceOrm" connectionString="data source=.;initial catalog=Siemens;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>
    <!--是否是虚拟仿真模式,true:是,false:否。生产环境要配置为false ã€EditBy shaocx,2022-01-27】-->
    <add key="IsVirtualMode" value="true"/>
  </appSettings>
</configuration>
</configuration>
siemenswmssditcode/wmsService/wcftest/BussinessExtension/VirtualModeHelper.cs
@@ -19,7 +19,7 @@
                //模拟环境下,认为抛出异常
                //在测试环境下,你可以屏蔽该代码
                //发布到生产环境,请打开该代码
                throw new Exception("此次是模拟环境!警告");
                //throw new Exception("此次是模拟环境!警告");
            }
        }
    }
siemenswmssditcode/wmsService/wcftest/Model/Input/DeviceGeneralInfoInput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using wcftest.EnumDefine;
namespace wcftest.Model.Input
{
    /// <summary>
    /// åˆ†é¡µæŸ¥è¯¢ å †åž›æœºè¿è¡Œç»Ÿè®¡ è¾“入参数
    /// </summary>
    public class DeviceGeneralInfoInput : roleMenu
    {
        /// <summary>
        /// åˆ†é¡µ
        /// </summary>
        public paging queryInfo { get; set; }
        /// <summary>
        /// æ˜¯å¦åŠ è½½å…¨éƒ¨æ•°æ®
        /// </summary>
        public bool IsLoadAllData { get; set; }
        /// <summary>
        /// æ—¶é—´èŒƒå›´-创建时间
        /// </summary>
        public DateTime[] datatime { get; set; }
    }
}
siemenswmssditcode/wmsService/wcftest/Model/Input/Purchase_OrderList_EmptyMaterialCodeInput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using wcftest.EnumDefine;
namespace wcftest.Model.Input
{
    /// <summary>
    /// åˆ†é¡µæŸ¥è¯¢  è¾“入参数
    /// </summary>
    public class Purchase_OrderList_EmptyMaterialCodeInput : roleMenu
    {
        /// <summary>
        /// åˆ†é¡µ
        /// </summary>
        public paging queryInfo { get; set; }
        /// <summary>
        /// æ˜¯å¦åŠ è½½å…¨éƒ¨æ•°æ®
        /// </summary>
        public bool IsLoadAllData { get; set; }
        /// <summary>搜索参数
        ///
        /// </summary>
        public searchparamForPurchase_OrderList_EmptyMaterialCode search { get; set; }
        /// <summary>
        /// æ—¶é—´èŒƒå›´-创建时间
        /// </summary>
        public DateTime[] datatime { get; set; }
    }
    public class searchparamForPurchase_OrderList_EmptyMaterialCode
    {
        public string PoCode { get; set; }
        public string ProductName { get; set; }
        public string ItemNumber { get; set; }
    }
}
siemenswmssditcode/wmsService/wcftest/Program.cs
@@ -25,6 +25,8 @@
            Mutex MyMutex = new Mutex(true, "wcftest", out result);
            if (result)
            {
                Yitter.IdGenerator.IdGeneratorOptions options = new Yitter.IdGenerator.IdGeneratorOptions(1);
                Yitter.IdGenerator.YitIdHelper.SetIdGenerator(options);
                Application.Run(form1ObjPublic);
            }
            else
siemenswmssditcode/wmsService/wcftest/orm/dbModel.cs
@@ -12,6 +12,7 @@
            : base("name=dbModel")
        {
        }
        public virtual DbSet<Purchase_OrderList_EmptyMaterialCode> Purchase_OrderList_EmptyMaterialCode { get; set; }
        public virtual DbSet<Base_PositionPrint> Base_PositionPrint { get; set; }
        public virtual DbSet<Sale_Order_History_Items> Sale_Order_History_Items { get; set; }
        public virtual DbSet<Sale_Order_History> Sale_Order_History { get; set; }
@@ -51,6 +52,18 @@
        public virtual DbSet<Base_BasicDataSet> Base_BasicDataSet { get; set; }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>()
                .Property(e => e.Quantity)
                .HasPrecision(18, 0);
            modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>()
                .Property(e => e.Creator)
                .IsUnicode(false);
            modelBuilder.Entity<Purchase_OrderList_EmptyMaterialCode>()
                .Property(e => e.LastModifier)
                .IsUnicode(false);
            modelBuilder.Entity<Base_PositionPrint>()
               .Property(e => e.ProductStorage)
               .HasPrecision(14, 4);
siemenswmssditcode/wmsService/wcftest/orm2/Purchase_OrderList_EmptyMaterialCode.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
namespace wcftest.orm
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;
    public partial class Purchase_OrderList_EmptyMaterialCode
    {
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public long ID { get; set; }
        [StringLength(50)]
        public string PoCode { get; set; }
        [StringLength(500)]
        public string ProductName { get; set; }
        public decimal? Quantity { get; set; }
        [StringLength(50)]
        public string ItemNumber { get; set; }
        [StringLength(50)]
        public string BatchNumber { get; set; }
        [StringLength(2000)]
        public string Remark { get; set; }
        [StringLength(128)]
        public string Creator { get; set; }
        public DateTime? CreateTime { get; set; }
        [StringLength(128)]
        public string LastModifier { get; set; }
        public DateTime? LastModifyTime { get; set; }
    }
}
siemenswmssditcode/wmsService/wcftest/orm_test/orm_test.cs
@@ -13,10 +13,5 @@
        }
       
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
        }
    }
}
siemenswmssditcode/wmsService/wcftest/wcf/Iapitest.cs
@@ -55,6 +55,24 @@
        [OperationContract]
        string getDeviceInfo(string startTime, string endTime);
        /// <summary>
        /// åˆ†é¡µæŸ¥è¯¢ å †åž›æœºè¿è¡Œç»Ÿè®¡
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        [OperationContract]
        string QueryPageDeviceGeneralInfo(string param);
        /// <summary>
        /// åˆ†é¡µæŸ¥è¯¢ PO明细空物料号信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        [OperationContract]
        string QueryPagePurchaseEmptyMaterialCode(string param);
        [OperationContract]
        string outStockTaskList(string takes);
        [OperationContract]
siemenswmssditcode/wmsService/wcftest/wcf/apitest.cs
@@ -24,6 +24,7 @@
using wcftest.Model.Output;
using wcftest.orm_test;
using wcftest.Utils.AuthFacotry;
using System.Linq.Expressions;
namespace wcftest.wcf
@@ -3270,7 +3271,7 @@
                data.Add(waitStatus);
                //x轴顺序重新排序 ã€Editby shaocx,2024-12-30】
                xdata = xdata.OrderBy(x=>x).ToList();
                xdata = xdata.OrderBy(x => x).ToList();
                string[] legend = { "p设备运行时间", "p设备等待时间", "p设备异常时间" };
                var workpiece = new
                 {
@@ -3297,6 +3298,237 @@
            }
        }
        /// <summary>
        /// åˆ†é¡µæŸ¥è¯¢ å †åž›æœºè¿è¡Œç»Ÿè®¡
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public string QueryPageDeviceGeneralInfo(string param)
        {
            msgss<deviceGeneralInfo> msg = new msgss<deviceGeneralInfo>();
            DeviceGeneralInfoInput page = JsonConvert.DeserializeObject<DeviceGeneralInfoInput>(param);
            try
            {
                using (dbModel mod = new dbModel())
                {
                    List<deviceGeneralInfo> fiveDayDeviceInfo = null;
                    if (page.datatime == null)
                    {
                        fiveDayDeviceInfo = mod.deviceGeneralInfo
                           .OrderByDescending(x => x.createTime)
                           .ToList();
                    }
                    else
                    {
                        DateTime _startTime = Convert.ToDateTime(page.datatime[0]);
                        DateTime _endTime = Convert.ToDateTime(page.datatime[1]);
                        fiveDayDeviceInfo = mod.deviceGeneralInfo
                           .Where(x => x.createTime >= _startTime && x.createTime <= _endTime)
                           .OrderByDescending(x => x.createTime)
                           .ToList();
                    }
                    if (fiveDayDeviceInfo.Count > 0)
                    {
                        foreach (var item in fiveDayDeviceInfo)
                        {
                            //重新计算等待时间
                            item.deviceWaitTime = 1440 - ((item.deviceRunTime ?? 0M) + (item.deviceAlarmTime ?? 0M));
                        }
                    }
                    List<deviceGeneralInfo> fenyeRerult = new List<deviceGeneralInfo>();
                    if (fiveDayDeviceInfo.Count > 0)
                    {
                        msg.status = 200;
                        msg.total = fiveDayDeviceInfo.Count;
                        if (page.IsLoadAllData)
                        {//只有确定加载全部数据时才加载全部数据 [EditBy shaocx,2022-03-07]
                            msg.status = 200;
                            msg.allDate = fiveDayDeviceInfo.ToList();
                        }
                        else
                        {//不加载全部,就过滤分页信息
                            //假如每页数量 å¤§äºŽç›˜ç‚¹æ•°æ®
                            if (page.queryInfo.pagesize > fiveDayDeviceInfo.Count)
                            {
                                msg.date = fiveDayDeviceInfo;
                            }
                            else
                            {
                                #region åˆ†é¡µè®¡ç®—
                                int a = page.queryInfo.pagesize;
                                int b = page.queryInfo.pagenum;
                                int c = (int)Math.Ceiling((double)fiveDayDeviceInfo.Count / a);
                                int d = fiveDayDeviceInfo.Count % a;
                                int e = 0;
                                int f = a * (b - 1);
                                if (d != 0 && b == c)
                                {
                                    e = d + f;
                                }
                                else
                                {
                                    e = a + f;
                                }
                                for (int i = f; i < e; i++)
                                {
                                    fenyeRerult.Add(fiveDayDeviceInfo[i]);
                                }
                                msg.date = fenyeRerult;
                                #endregion
                            }
                        }
                    }
                    else
                    {
                        msg.status = 400;
                        msg.total = 1;
                        msg.date = null;
                    }
                    return JsonConvert.SerializeObject(msg);
                }
            }
            catch (Exception ex)
            {
                logtxt.txtWrite("出错信息" + ex.Message + "出错行号" + (string)ex.StackTrace, 2);
                msg.status = 400;
                msg.total = 1;
                msg.date = null;
                return JsonConvert.SerializeObject(msg);
            }
        }
        /// <summary>
        /// åˆ†é¡µæŸ¥è¯¢ PO明细空物料号信息
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public string QueryPagePurchaseEmptyMaterialCode(string param)
        {
            msgss<Purchase_OrderList_EmptyMaterialCode> msg = new msgss<Purchase_OrderList_EmptyMaterialCode>();
            Purchase_OrderList_EmptyMaterialCodeInput page = JsonConvert.DeserializeObject<Purchase_OrderList_EmptyMaterialCodeInput>(param);
            try
            {
                using (dbModel mod = new dbModel())
                {
                    List<Purchase_OrderList_EmptyMaterialCode> fiveDayDeviceInfo = new List<Purchase_OrderList_EmptyMaterialCode>();
                    Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_datatime = x => 1 == 1;
                    if (page.datatime != null)
                    {
                        DateTime _startTime = Convert.ToDateTime(page.datatime[0]);
                        DateTime _endTime = Convert.ToDateTime(page.datatime[1]);
                        predicate_datatime = x => x.CreateTime >= _startTime && x.CreateTime <= _endTime;
                    }
                    Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_poCode = x => 1 == 1;
                    if (!string.IsNullOrEmpty(page.search.PoCode))
                    {
                        predicate_poCode = x => x.PoCode == page.search.PoCode;
                    }
                    Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_ItemNumber = x => 1 == 1;
                    if (!string.IsNullOrEmpty(page.search.ItemNumber))
                    {
                        predicate_poCode = x => x.ItemNumber == page.search.ItemNumber;
                    }
                    Expression<Func<Purchase_OrderList_EmptyMaterialCode, bool>> predicate_ProductName = x => 1 == 1;
                    if (!string.IsNullOrEmpty(page.search.ProductName))
                    {
                        predicate_poCode = x => x.ProductName == page.search.ProductName;
                    }
                    fiveDayDeviceInfo = mod.Purchase_OrderList_EmptyMaterialCode
                        .Where(predicate_datatime)
                        .Where(predicate_poCode)
                        .Where(predicate_ItemNumber)
                        .Where(predicate_ProductName)
                        .ToList();
                    List<Purchase_OrderList_EmptyMaterialCode> fenyeRerult = new List<Purchase_OrderList_EmptyMaterialCode>();
                    if (fiveDayDeviceInfo.Count > 0)
                    {
                        msg.status = 200;
                        msg.total = fiveDayDeviceInfo.Count;
                        if (page.IsLoadAllData)
                        {//只有确定加载全部数据时才加载全部数据 [EditBy shaocx,2022-03-07]
                            msg.status = 200;
                            msg.allDate = fiveDayDeviceInfo.ToList();
                        }
                        else
                        {//不加载全部,就过滤分页信息
                            //假如每页数量 å¤§äºŽç›˜ç‚¹æ•°æ®
                            if (page.queryInfo.pagesize > fiveDayDeviceInfo.Count)
                            {
                                msg.date = fiveDayDeviceInfo;
                            }
                            else
                            {
                                #region åˆ†é¡µè®¡ç®—
                                int a = page.queryInfo.pagesize;
                                int b = page.queryInfo.pagenum;
                                int c = (int)Math.Ceiling((double)fiveDayDeviceInfo.Count / a);
                                int d = fiveDayDeviceInfo.Count % a;
                                int e = 0;
                                int f = a * (b - 1);
                                if (d != 0 && b == c)
                                {
                                    e = d + f;
                                }
                                else
                                {
                                    e = a + f;
                                }
                                for (int i = f; i < e; i++)
                                {
                                    fenyeRerult.Add(fiveDayDeviceInfo[i]);
                                }
                                msg.date = fenyeRerult;
                                #endregion
                            }
                        }
                    }
                    else
                    {
                        msg.status = 400;
                        msg.total = 1;
                        msg.date = null;
                    }
                    return JsonConvert.SerializeObject(msg);
                }
            }
            catch (Exception ex)
            {
                logtxt.txtWrite("出错信息" + ex.Message + "出错行号" + (string)ex.StackTrace, 2);
                msg.status = 400;
                msg.total = 1;
                msg.date = null;
                return JsonConvert.SerializeObject(msg);
            }
        }
        /// <summary>2d动画获取设备位置
        /// 2d动画获取设备位置
@@ -5719,12 +5951,27 @@
                        var checkMateria1s = (from p in mod.Base_ProductInfo where (from f in rstPo select f).Contains(p.ProductCode) select p).ToList();
                        #region æ·»åŠ PO单物料明细
                        System.Collections.Generic.List<Purchase_OrderList_EmptyMaterialCode> insert_OrderList_EmptyMaterialCodeList = new List<Purchase_OrderList_EmptyMaterialCode>();
                        string lastTracknum = "";
                        foreach (var item in resultPo.Materials)
                        {
                            if (item.MaterialCode == null)
                            {
                            if (string.IsNullOrEmpty(item.MaterialCode))
                            {//写入PO明细空物料号表        ã€Editby shaocx,2025-09-09】
                                logtxt.txtWrite("采购单号:" + item.PoNumber + " ç‰©æ–™é¡¹å·:" + item.PoItem + "物料编号为空", 2);
                                insert_OrderList_EmptyMaterialCodeList.Add(new Purchase_OrderList_EmptyMaterialCode()
                                {
                                    ID = Yitter.IdGenerator.YitIdHelper.NextId(),
                                    PoCode = poInfo.PoCode,
                                    BatchNumber = "",
                                    ItemNumber = item.PoItem,
                                    ProductName = item.MaterialName,
                                    CreateTime = DateTime.Now,
                                    Creator = resultPo.CreatedBy,
                                    Quantity = 0,
                                    LastModifier = resultPo.CreatedBy,
                                    LastModifyTime = DateTime.Now,
                                    Remark = ""
                                });
                                continue;//物料编号为空
                            }
                            string materialCode = item.MaterialCode;
@@ -5860,6 +6107,12 @@
                        #endregion
                        //先保存主表 ç„¶åŽèŽ·å–ä¸»è¡¨ID å†å†™å…¥æ˜Žç»†è¡¨
                        mod.Purchase_Order.Add(poInfo);
                        if (insert_OrderList_EmptyMaterialCodeList != null && insert_OrderList_EmptyMaterialCodeList.Count > 0)
                        {//写入PO明细空物料号表 ã€Editby shaocx,2025-09-09】
                            mod.Purchase_OrderList_EmptyMaterialCode.AddRange(insert_OrderList_EmptyMaterialCodeList);
                        }
                        int results = mod.SaveChanges();
                        for (int h = 0; h < 10; h++)
                        {
siemenswmssditcode/wmsService/wcftest/wmsService.csproj
@@ -9,9 +9,10 @@
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>wcftest</RootNamespace>
    <AssemblyName>wcftest</AssemblyName>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
@@ -68,6 +69,9 @@
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="Yitter.IdGenerator.Net45">
      <HintPath>..\DLL\Yitter.IdGenerator.Net45.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="BussinessExtension\AutoMoveLocation\UpdateStoreWarningDaysHandler.cs" />
@@ -157,6 +161,8 @@
    </Compile>
    <Compile Include="deviceorm\MainTask.cs" />
    <Compile Include="deviceorm\PartTask.cs" />
    <Compile Include="Model\Input\Purchase_OrderList_EmptyMaterialCodeInput.cs" />
    <Compile Include="Model\Input\DeviceGeneralInfoInput.cs" />
    <Compile Include="Model\Input\UpdateStoreWarningDaysInput.cs" />
    <Compile Include="Model\Input\RePrintBarCodeInput.cs" />
    <Compile Include="Model\Input\Sale_Order_HistoryInput.cs" />
@@ -1144,6 +1150,7 @@
    <Compile Include="orm\Sale_Order_History.cs" />
    <Compile Include="orm\Sale_Order_History_Items.cs" />
    <Compile Include="orm_test\orm_test.cs" />
    <Compile Include="orm2\Purchase_OrderList_EmptyMaterialCode.cs" />
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="sapEntity\analyseMateral.cs" />