hh 1 éve
szülő
commit
cf2fe062b1
29 módosított fájl, 388 hozzáadás és 638 törlés
  1. 6 29
      entry/src/main/ets/common/component/TaskComp.ets
  2. 1 1
      entry/src/main/ets/common/component/Warehousing.ets
  3. 2 2
      entry/src/main/ets/common/component/Workbin.ets
  4. 53 0
      entry/src/main/ets/common/util/PreferencesUtil.ts
  5. 107 0
      entry/src/main/ets/common/util/request/Helps.ets
  6. 1 1
      entry/src/main/ets/common/util/request/Index.ets
  7. 0 0
      entry/src/main/ets/common/util/request/RequestInstance.ets
  8. 1 1
      entry/src/main/ets/common/util/request/StorageIndex.ets
  9. 8 8
      entry/src/main/ets/common/util/request/testR.ets
  10. 17 73
      entry/src/main/ets/entryability/EntryAbility.ets
  11. 0 0
      entry/src/main/ets/model/OutboundDats.ets
  12. 11 0
      entry/src/main/ets/model/UserSet.ets
  13. 0 0
      entry/src/main/ets/model/WorkBinInfo.ets
  14. 0 31
      entry/src/main/ets/model/database/RobotInfo.ets
  15. 143 0
      entry/src/main/ets/model/database/UserSetModel.ets
  16. 0 116
      entry/src/main/ets/pages/IndexTemp.ets
  17. 1 1
      entry/src/main/ets/pages/LoginPage.ets
  18. 0 342
      entry/src/main/ets/pages/ProcessHomeshiyan.ets
  19. 1 1
      entry/src/main/ets/pages/Storage.ets
  20. 9 3
      entry/src/main/ets/pages/process/ProcessHome.ets
  21. 6 8
      entry/src/main/ets/view/IntelligentStorageWarehousing.ets
  22. 4 3
      entry/src/main/ets/view/IntelligentWarehousingOutbound.ets
  23. 1 1
      entry/src/main/ets/view/OtherStatistics.ets
  24. 1 1
      entry/src/main/ets/view/OtherStorageOutbound.ets
  25. 1 1
      entry/src/main/ets/view/OtherWarehousing.ets
  26. 1 1
      entry/src/main/ets/view/ScanTheOutboundQRCode.ets
  27. 12 11
      entry/src/main/ets/view/ScanTheStorageCode.ets
  28. 1 1
      entry/src/main/ets/view/Statistics.ets
  29. 0 2
      entry/src/main/resources/base/profile/main_pages.json

+ 6 - 29
entry/src/main/ets/common/component/TaskComp.ets

@@ -1,5 +1,4 @@
-import {task, taskclass} from '../util/request/testR'
-import router from '@ohos.router'
+import {task, taskclass} from '../util/request/StorageRequestInstance'
 @Component
 export struct TaskComp {
   @State bugNum:number=0
@@ -47,11 +46,6 @@ export struct TaskComp {
       .backgroundImageSize({width:'100%',height:'100%'})
       .height('100%')
       .borderRadius(15)
-      .onClick(()=>{
-        router.pushUrl({
-          url:'pages/process/ProcessHome'
-        })
-      })
 
 
       //左右column
@@ -83,7 +77,6 @@ export struct TaskComp {
 
         }.width('100%')
         .height('50%')
-        .margin({right:5})
         Divider().vertical(false)
           .width('80%')
         Blank()
@@ -114,18 +107,12 @@ export struct TaskComp {
 
         }.width('100%')
         .height('50%')
-        .margin(5)
 
 
       }.width('30%')
       .height('70%')
       .borderRadius(15)
       .alignItems(HorizontalAlign.End)
-      .onClick(()=>{
-        router.pushUrl({
-          url:'pages/process/ProcessHome'
-        })
-      })
       Divider().vertical(true)
         .height('60%')
       Column(){
@@ -144,7 +131,9 @@ export struct TaskComp {
               .fontWeight(FontWeight.Regular)
 
             Blank()
+
           }.width('100%')
+
           .height('30%')
           Text(this.completeNum.toString()).width('80%')
             .height('70%')
@@ -155,12 +144,6 @@ export struct TaskComp {
 
         }.width('100%')
         .height('50%')
-        .margin({right:5})
-        .onClick(()=>{
-          router.pushUrl({
-            url:'pages/process/ProcessHome'
-          })
-        })
         Divider().vertical(false)
           .width('80%')
         Column(){
@@ -179,23 +162,17 @@ export struct TaskComp {
             Blank()
 
           }.width('100%')
+
           .height('30%')
-          Text(this.bugNum.toString()).width('100%')
+          Text(this.bugNum.toString()).width('80%')
             .height('60%')
             .fontColor('#e6000000')
             .textAlign(TextAlign.Center)
             .fontSize(px2vp(64))
             .fontWeight(FontWeight.Bold)
 
-        }.width('80%')
+        }.width('100%')
         .height('50%')
-        .backgroundColor('#ffff')
-        .borderRadius(px2vp(21))
-        .margin(5)
-        .onClick(()=>{
-
-
-        })
 
 
       }.width('30%')

+ 1 - 1
entry/src/main/ets/common/component/Warehousing.ets

@@ -1,4 +1,4 @@
-import {testGet1, StorageStatus} from '../util/request/testR'
+import {testGet1, StorageStatus} from '../util/request/StorageRequestInstance'
 @Component
 export struct Warehousing {
   @State allNum:number=0

+ 2 - 2
entry/src/main/ets/common/component/Workbin.ets

@@ -1,6 +1,6 @@
 import ProcessData from '../../model/ProcessData';
-import StorageRequest from '../util/request/StorageIndex';
-import {Tasklistoutbound,Tasklist,SelectMaterialslist} from  '../util/request/testR'
+import StorageRequest from '../util/request/StorageRequest';
+import {Tasklistoutbound,Tasklist,SelectMaterialslist} from '../util/request/StorageRequestInstance'
 /////物料位置
 export interface Materialpositionclass {
   //批次号

+ 53 - 0
entry/src/main/ets/common/util/PreferencesUtil.ts

@@ -0,0 +1,53 @@
+import preferences from '@ohos.data.preferences';
+
+class PreferencesUtil{
+
+  prefMap: Map<string, preferences.Preferences> = new Map()
+
+  async loadPreference(context, name: string){
+    try { // 加载preferences
+      let pref = await preferences.getPreferences(context, name)
+      this.prefMap.set(name, pref)
+      console.log('testTag', `加载Preferences[${name}]成功`)
+    } catch (e) {
+      console.log('testTag', `加载Preferences[${name}]失败`, JSON.stringify(e))
+    }
+  }
+
+  async putPreferenceValue(name: string, key: string, value: preferences.ValueType){
+    if (!this.prefMap.has(name)) {
+      console.log('testTag', `Preferences[${name}]尚未初始化!`)
+      return
+    }
+    try {
+      let pref = this.prefMap.get(name)
+      // 写入数据
+      await pref.put(key, value)
+      // 刷盘
+      await pref.flush()
+      console.log('testTag', `保存Preferences[${name}.${key} = ${value}]成功`)
+    } catch (e) {
+      console.log('testTag', `保存Preferences[${name}.${key} = ${value}]失败`, JSON.stringify(e))
+    }
+  }
+
+  async getPreferenceValue(name: string, key: string, defaultValue: preferences.ValueType){
+    if (!this.prefMap.has(name)) {
+      console.log('testTag', `Preferences[${name}]尚未初始化!`)
+      return
+    }
+    try {
+      let pref = this.prefMap.get(name)
+      // 读数据
+      let value = await pref.get(key, defaultValue)
+      console.log('testTag', `读取Preferences[${name}.${key} = ${value}]成功`)
+      return value
+    } catch (e) {
+      console.log('testTag', `读取Preferences[${name}.${key} ]失败`, JSON.stringify(e))
+    }
+  }
+}
+
+const preferencesUtil = new PreferencesUtil()
+
+export default preferencesUtil as PreferencesUtil

+ 107 - 0
entry/src/main/ets/common/util/request/Helps.ets

@@ -0,0 +1,107 @@
+import  {InternalAxiosRequestConfig, AxiosResponse, AxiosError} from "@ohos/axios"
+import promptAction from '@ohos.promptAction'
+
+// 是否在控制台打印某项log
+const pConfig = false
+const pHeaders = false
+const pUrl = true
+const pParams = false
+const pBody = true
+const pResponse = false
+const pData = true
+const pError = true
+
+// @CustomDialog
+// struct CustomDialogExample {
+//   controller: CustomDialogController
+//   build() {
+//     Column() {
+//       Text('我是内容')
+//         .fontSize(20)
+//         .margin({ top: 10, bottom: 10 })
+//     }
+//   }
+// }
+
+const printRequest = (config: InternalAxiosRequestConfig) => {
+  if (pConfig) {
+    console.debug("printRequest config", JSON.stringify(config))
+  }
+
+  if (pHeaders) {
+    console.debug("printRequest headers", JSON.stringify(config.headers))
+  }
+
+  if (pUrl) {
+    console.debug("printRequest url", `Method:${config.method} ${config.baseURL}${config.url}`)
+  }
+
+  if (pBody) {
+    console.debug("printRequest 请求参数data", JSON.stringify(config.data))
+  }
+
+  if (pParams) {
+    console.debug("printRequest 请求参数params", JSON.stringify(config.params))
+  }
+
+}
+
+const printResponse = (response: AxiosResponse) => {
+  if (pResponse) {
+    console.debug('handleRes response: ', JSON.stringify(response))
+  }
+  if (pData) {
+    console.debug("printResponse data", JSON.stringify(response.data))
+  }
+}
+
+const printError = (error: AxiosError) => {
+  if (pError) {
+    console.debug("printError error", error.message)
+  }
+  promptAction.showToast({
+    message: error.message ?? "请求出错",
+    duration: 1300,
+    bottom: 100
+  })
+}
+
+
+// 处理返回数据
+const handleRes = (response: AxiosResponse) : [boolean, string] =>  {
+  let isSuccess = true
+  let msg = ""
+
+  if (response.status === 200) { //判断返回状态是否为200
+    if (response.data?.code === "200") { //判断数据的code是否为200,有可能是500的服务器错误
+      isSuccess = true
+      msg = `请求数据成功`
+    }
+    else {
+      isSuccess = false
+      msg = `${response.data?.code}: ${response.data?.msg ?? "服务器错误"}`
+    }
+  }
+  else {
+    isSuccess = false
+    msg = `状态码非200 status: ${response.status}}`
+  }
+
+  if (!isSuccess) {
+    promptAction.showToast({
+      message: msg,
+      duration: 1300,
+      bottom: 100
+    })
+
+    // const dialogController: CustomDialogController = new CustomDialogController({
+    //   builder: CustomDialogExample({}),
+    // })
+    // dialogController.open()
+  }
+
+  return [isSuccess, msg]
+}
+
+
+export {printRequest, printResponse, printError, handleRes}

+ 1 - 1
entry/src/main/ets/common/util/request/Index.ets

@@ -1,5 +1,5 @@
 import axios, { AxiosError, AxiosResponse, AxiosRequestHeaders,AxiosRequestConfig, CreateAxiosDefaults,InternalAxiosRequestConfig } from '@ohos/axios';
-import { printError, printRequest, printResponse, handleRes } from './helps';
+import { printError, printRequest, printResponse, handleRes } from './Helps';
 
 const baseUrl = "http://192.168.101.4:8079/"
 const DEBUG = true //

+ 0 - 0
entry/src/main/ets/common/util/request/RequestInstance.ets


+ 1 - 1
entry/src/main/ets/common/util/request/StorageIndex.ets

@@ -1,5 +1,5 @@
 import axios, { AxiosError, AxiosResponse, AxiosRequestHeaders,AxiosRequestConfig, CreateAxiosDefaults,InternalAxiosRequestConfig } from '@ohos/axios';
-import { printError, printRequest, printResponse, handleRes } from './helps';
+import { printError, printRequest, printResponse, handleRes } from './Helps';
 
 const baseUrl = "http://192.168.101.4:8088/"
 const DEBUG = true //

+ 8 - 8
entry/src/main/ets/common/util/request/testR.ets

@@ -1,8 +1,8 @@
-import StorageRequest from './StorageIndex';
+import StorageRequest from './StorageRequest';
 import List from '@ohos.util.List';
 import { formToJSON } from '@ohos/axios';
-import WorkBinInfo from '../../../model/database/WorkBinInfo';
-import OutboundData from '../../../model//database/OutboundDats';
+import WorkBinInfo from '../../../model/WorkBinInfo';
+import OutboundData from '../../../model/OutboundDats';
 
 // 定义数据类型最好用xxxModel, 所有属性都是可选来适用 as。  在swagger或者控制台 复制返回的json到  https://xiets.gitee.io/json-to-any-web/ 即可获得所有TS类型。
 export interface StorageStatus {
@@ -126,7 +126,7 @@ export interface  StorageStatusList1 {
   max?:number
   min?:number
 }
-/////统计占用率请求
+// 统计占用率请求
 const testGet1 = async () : Promise<StorageStatus> => {
   let obj: StorageStatus = { } //尽量用{}来定义空对象,如果用null在get属性的时候可能会出错
   let res = await StorageRequest.get("/api/v3/position/lineStockState1")
@@ -146,7 +146,7 @@ const task = async () : Promise<taskclass> => {
 }
 
 
-///////入库取料箱数据
+// 入库取料箱数据
 export interface  WarehousingBufferHopperList {
   //料箱已存物料信息
   list?: WorkBinInfo[];
@@ -162,11 +162,11 @@ const Warehousing = async() : Promise<WarehousingBufferHopperList[]> => {
   obj = JSON.parse(JSON.stringify(res))
   return obj
 }
-/////入库存料箱
+// 入库存料箱
 export interface  BufferHopperclass {
-  //料箱存入物料信息
+  // 料箱存入物料信息
   detailsList?: OutboundData[];
-  ///料箱编号
+  // 料箱编号
   vehicleNo?:string
 }
 const BufferHopper= async() : Promise<BufferHopperclass[]> => {

+ 17 - 73
entry/src/main/ets/entryability/EntryAbility.ets

@@ -6,20 +6,30 @@ import window from '@ohos.window';
 import RobotSelfCheckModel from '../model/database/RobotSelfCheckModel';
 import StorageModel from '../model/database/StorageModel';
 import StorageSpaceModel from '../model/database/StorageSpaceModel';
-import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
-import common from '@ohos.app.ability.common';
-import bundleManager from '@ohos.bundle.bundleManager';
-
-
-const permissions: Array<Permissions> = ['ohos.permission.STORAGE_MANAGER'];
+import PreferencesUtil from '../common/util/PreferencesUtil';
+import UserSetModel from '../model/database/UserSetModel';
+import UserSet from '../model/UserSet';
 
 export default class EntryAbility extends UIAbility {
-  onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
+  async onCreate(want: Want, launchParam: AbilityConstant.LaunchParam) {
     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
     // 初始化表
     RobotSelfCheckModel.initTaskDB(this.context)
     StorageSpaceModel.initTaskDB(this.context)
     StorageModel.initTaskDB(this.context)
+    UserSetModel.initTaskDB(this.context)
+    // 加载Preferences
+    await PreferencesUtil.loadPreference(this.context, 'MyPreferences')
+
+    await UserSetModel.getLast().then(userSet=>{
+      if (userSet && userSet.maintainLoginStatus === 1) {
+
+      }
+    })
+
+
+
+
   }
 
   onDestroy(): void {
@@ -29,21 +39,6 @@ export default class EntryAbility extends UIAbility {
   onWindowStageCreate(windowStage: window.WindowStage): void {
     // Main window is created, set main page for this ability
     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
-
-    // let atManager: abilityAccessCtrl.AtManager = abilityAccessCtrl.createAtManager();
-    // try {
-    //   let context = getContext(this);
-    //   atManager.requestPermissionsFromUser(context, ['ohos.permission.CAMERA']).then((data) => {
-    //     console.info('data:' + JSON.stringify(data));
-    //     console.info('data permissions:' + data.permissions);
-    //     console.info('data authResults:' + data.authResults);
-    //   }).catch((err) => {
-    //     console.info('data:' + JSON.stringify(err));
-    //   })
-    // } catch(err) {
-    //   console.log(`catch err->${JSON.stringify(err)}`);
-    // }
-    // checkPermissions(this.context);
     // 1.获取应用主窗口。
     let windowClass = null;
     windowStage.getMainWindow((err, data) => {
@@ -93,55 +88,4 @@ export default class EntryAbility extends UIAbility {
     // Ability has back to background
     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
   }
-}
-
-async function checkAccessToken() {
-  let atManager = abilityAccessCtrl.createAtManager();
-  let tokenId: number = 0;
-  try {
-    let bundleInfo: bundleManager.BundleInfo = await bundleManager
-      .getBundleInfoForSelf(bundleManager.BundleFlag.GET_BUNDLE_INFO_WITH_APPLICATION);
-    let appInfo: bundleManager.ApplicationInfo = bundleInfo.appInfo;
-    tokenId = appInfo.accessTokenId;
-  } catch (err) {
-    console.error('EntryAbility',
-      `checkAccessToken Failed to get bundle info for self. err=${JSON.stringify(err)}`);
-  }
-
-  let grantStatus: abilityAccessCtrl.GrantStatus = abilityAccessCtrl.GrantStatus.PERMISSION_DENIED;
-  try {
-    grantStatus = await atManager.checkAccessToken(tokenId, 'ohos.permission.DISTRIBUTED_DATASYNC');
-  } catch (err) {
-    console.error('EntryAbility',
-      `checkAccessToken Failed to check access token. err=${JSON.stringify(err)}`);
-  }
-
-  return grantStatus;
-}
-
-/**
- * Check the permission status.
- */
-async function checkPermissions(context: common.UIAbilityContext) {
-  let grantStatus: abilityAccessCtrl.GrantStatus = await checkAccessToken();
-  if (grantStatus !== abilityAccessCtrl.GrantStatus.PERMISSION_GRANTED) {
-    // Applying for the distributed data synchronization permission.
-    let atManager: abilityAccessCtrl.AtManager = abilityAccessCtrl.createAtManager();
-    atManager.requestPermissionsFromUser(context, permissions).then((data) => {
-      let grantStatus: Array<number> = data.authResults;
-      let length: number = grantStatus.length;
-      for (let i: number = 0; i < length; i++) {
-        if (grantStatus[i] === 0) {
-          console.info('EntryAbility', `checkPermissions request permission ${permissions[i]} success`);
-        } else {
-          console.error('EntryAbility',
-            `checkPermissions request fail permission=${permissions[i]}, grantStatus=${grantStatus[i]}`);
-          return;
-        }
-      }
-    }).catch((err: Error) => {
-      console.error('EntryAbility',
-        `checkPermissions request permissions failed, err=${JSON.stringify(err)}`);
-    })
-  }
 }

entry/src/main/ets/model/database/OutboundDats.ets → entry/src/main/ets/model/OutboundDats.ets


+ 11 - 0
entry/src/main/ets/model/UserSet.ets

@@ -0,0 +1,11 @@
+// 用户设置
+export default class UserSet {
+  // id
+  id?: number;
+  // 仓储id
+  userId?: number;
+  // 保持登录状态(1:是 2:否)
+  maintainLoginStatus?: number;
+  // 更新时间戳
+  updateTime?: number;
+}

entry/src/main/ets/model/database/WorkBinInfo.ets → entry/src/main/ets/model/WorkBinInfo.ets


+ 0 - 31
entry/src/main/ets/model/database/RobotInfo.ets

@@ -1,31 +0,0 @@
-export default class RobotInfo {
-  // id
-  id: number;
-  // 机器人编码
-  robotCode: string = '';
-  // 所属仓库id
-  storageId: number;
-  // 机器人位置x坐标
-  x: number = 0
-  // 机器人位置y坐标
-  y: number = 0
-  // 车类型(1:轨道 2:仓储)
-  robotType
-  //机器人的朝向(1:x+ 2:x- 3:y+ 4:y-)
-  robotToward: number = 0
-  // 上次自检日期
-  lastSelfCheck : string
-
-
-  //车类型(1:轨道 2:仓储)
-  // carType: number = 2
-  // //车状态(1:异常 2:空闲 3:运行)
-  // carState: number = 0
-  // // 仓储车悬臂x坐标
-  // armX: number
-  // // 仓储车悬臂y坐标
-  // armY: number
-  //
-  // //异常信息
-  // errorMsg?: string
-}

+ 143 - 0
entry/src/main/ets/model/database/UserSetModel.ets

@@ -0,0 +1,143 @@
+import relationalStore from '@ohos.data.relationalStore';
+import CommonConstants from '../../common/constants/CommonConstants';
+import UserSet from '../UserSet';
+
+class UserSetModel {
+
+  private rdbStore: relationalStore.RdbStore
+  private tableName: string = 'USER_SET'
+
+  /**
+   * 初始化表
+   */
+  initTaskDB(context){
+    // 1.rdb配置
+    const config = {
+      name: CommonConstants.RDB_NAME,
+      securityLevel: relationalStore.SecurityLevel.S1
+    }
+    // 2.初始化SQL语句
+    const sql = `CREATE TABLE IF NOT EXISTS USER_SET (
+                  ID INTEGER PRIMARY KEY AUTOINCREMENT,
+                  USER_ID INTEGER NOT NULL,
+                  MAINTAIN_LOGIN_STATUS INTEGER NOT NULL,
+                  UPDATE_TIME INTEGER NOT NULL
+                 )`
+    // 3.获取rdb
+    relationalStore.getRdbStore(context, config, (err, rdbStore) => {
+      if(err){
+        console.log('testTag', '获取rdbStore失败!')
+        return
+      }
+      // 执行Sql
+      rdbStore.executeSql(sql).then(()=>{
+        console.log('testTag', '创建用户设置表成功!')
+      }).catch(err=>{
+        console.log('testTag', '创建失败')
+      })
+      // 保存rdbStore
+      this.rdbStore = rdbStore
+    })
+  }
+
+  /**
+   * 查询用户设置列表
+   */
+  // async getUserSetList(){
+  //   // 1.构建查询条件
+  //   let predicates = new relationalStore.RdbPredicates(this.tableName)
+  //   // 2.查询
+  //   let result = await this.rdbStore.query(predicates, ['ID', 'USER_ID', 'MAINTAIN_LOGIN_STATUS'])
+  //   // 3.解析查询结果
+  //   // 3.1.定义一个数组,组装最终的查询结果
+  //   let userSets: UserSet[] = []
+  //   // 3.2.遍历封装
+  //   while(!result.isAtLastRow){
+  //     // 3.3.指针移动到下一行
+  //     result.goToNextRow()
+  //     // 3.4.获取数据
+  //     let id = result.getLong(result.getColumnIndex('ID'))
+  //     let userId = result.getLong(result.getColumnIndex('USER_ID'))
+  //     let maintainLoginStatus = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
+  //     let updateTime = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
+  //     // 3.5.封装到数组
+  //     userSets.push({id: id, userId: userId, maintainLoginStatus: maintainLoginStatus, updateTime: updateTime})
+  //   }
+  //   return userSets
+  // }
+
+  // 查询最后一次用户登录的数据
+  async getLast(): Promise<UserSet> {
+    // 1.构建查询条件
+    let predicates = new relationalStore.RdbPredicates(this.tableName)
+    predicates.orderByDesc('UPDATE_TIME')
+    predicates.limitAs(1)
+    // 2.查询
+    let result = await this.rdbStore.query(predicates, ['ID', 'USER_ID', 'MAINTAIN_LOGIN_STATUS', 'UPDATE_TIME'])
+    // 3.4.获取数据
+    let id = result.getLong(result.getColumnIndex('ID'))
+    let userId = result.getLong(result.getColumnIndex('USER_ID'))
+    let maintainLoginStatus = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
+    let updateTime = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
+    return {id: id, userId: userId, maintainLoginStatus: maintainLoginStatus, updateTime: updateTime}
+  }
+
+  // 查询最后一次用户登录的数据
+  async getByUserId(userId: number): Promise<UserSet> {
+    // 1.构建查询条件
+    let predicates = new relationalStore.RdbPredicates(this.tableName)
+    predicates.equalTo('USER_ID', userId)
+    predicates.orderByDesc('UPDATE_TIME')
+    predicates.limitAs(1)
+    // 2.查询
+    let result = await this.rdbStore.query(predicates, ['ID', 'USER_ID', 'MAINTAIN_LOGIN_STATUS', 'UPDATE_TIME'])
+    // 3.4.获取数据
+    let id = result.getLong(result.getColumnIndex('ID'))
+    let maintainLoginStatus = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
+    let updateTime = result.getLong(result.getColumnIndex('MAINTAIN_LOGIN_STATUS'))
+    return {id: id, userId: userId, maintainLoginStatus: maintainLoginStatus, updateTime: updateTime}
+  }
+
+  /**
+   * 添加用户设置
+   * @param UserSetName 用户设置名称
+   * @param xSize x尺寸
+   * @param ySize y尺寸
+   * @param defaultLayer 默认尺寸
+   * @returns 用户设置id
+   */
+  addUserSet(userId: number, maintainLoginStatus: number, updateTime: number): Promise<number>{
+      return this.rdbStore.insert(this.tableName, {USER_ID: userId, MAINTAIN_LOGIN_STATUS: maintainLoginStatus, UPDATE_TIME: updateTime})
+  }
+
+  /**
+   * 根据id更新用户设置状态
+   * @param id 任务id
+   * @param finished 任务是否完成
+   */
+  updateUserSet(id: number, userId: number, maintainLoginStatus: number, updateTime: number) {
+    // 1.要更新的数据
+    let data = {USER_ID: userId, MAINTAIN_LOGIN_STATUS: maintainLoginStatus, UPDATE_TIME: updateTime}
+    // 2.更新的条件
+    let predicates = new relationalStore.RdbPredicates(this.tableName)
+    predicates.equalTo('ID', id)
+    // 3.更新操作
+    return this.rdbStore.update(data, predicates)
+  }
+
+  /**
+   * 根据id删除任务
+   * @param id 任务id
+   */
+  deleteUserSetById(id: number){
+    // 1.删除的条件
+    let predicates = new relationalStore.RdbPredicates(this.tableName)
+    predicates.equalTo('ID', id)
+    // 2.删除操作
+    return this.rdbStore.delete(predicates)
+  }
+}
+
+let userSetModel = new UserSetModel();
+
+export default userSetModel as UserSetModel;

+ 0 - 116
entry/src/main/ets/pages/IndexTemp.ets

@@ -1,116 +0,0 @@
-// xxx.ets
-@Extend(Text) function textStyle () {
-  .width('25%')
-  .height(35)
-  .fontSize(16)
-  .textAlign(TextAlign.Center)
-  .backgroundColor(0xAFEEEE)
-}
-
-@Entry
-@Component
-struct DragExample {
-  @State numbers: string[] = ['one', 'two', 'three', 'four', 'five', 'six']
-  @State text: string = ''
-  @State bool: boolean = true
-  @State eventType: string = ''
-  @State appleVisible: Visibility = Visibility.Visible
-  @State orangeVisible: Visibility = Visibility.Visible
-  @State bananaVisible: Visibility = Visibility.Visible
-  private dragList: string[] = ['apple', 'orange', 'banana']
-  @State fruitVisible: Visibility[] = [Visibility.Visible, Visibility.Visible, Visibility.Visible]
-  @State idx: number = 0
-
-  // 自定义拖拽过程中显示的内容
-  @Builder pixelMapBuilder() {
-    Column() {
-      Text(this.text)
-        .width('50%')
-        .height(60)
-        .fontSize(16)
-        .borderRadius(10)
-        .textAlign(TextAlign.Center)
-        .backgroundColor(Color.Yellow)
-    }
-  }
-
-  build() {
-    Column() {
-      Text('There are three Text elements here')
-        .fontSize(12)
-        .fontColor(0xCCCCCC)
-        .width('90%')
-        .textAlign(TextAlign.Start)
-        .margin(5)
-      Row({ space: 15 }) {
-        ForEach(this.dragList, (item, index) => {
-          Text(item)
-            .textStyle()
-            .visibility(this.fruitVisible[index])
-            .onDragStart(() => {
-              this.bool = true
-              this.text = item
-              this.fruitVisible[index] = Visibility.None
-              return this.pixelMapBuilder
-            })
-            .onTouch((event: TouchEvent) => {
-              if (event.type === TouchType.Down) {
-                this.eventType = 'Down'
-                this.idx = index
-              }
-              if (event.type === TouchType.Up) {
-                this.eventType = 'Up'
-                if (this.bool) {
-                  this.fruitVisible[index] = Visibility.Visible
-                }
-              }
-            })
-        })
-      }.padding({ top: 10, bottom: 10 }).margin(10)
-
-      Text('This is a List element')
-        .fontSize(12)
-        .fontColor(0xCCCCCC)
-        .width('90%')
-        .textAlign(TextAlign.Start)
-        .margin(15)
-      List({ space: 20 }) {
-        ForEach(this.numbers, (item) => {
-          ListItem() {
-            Text(item)
-              .width('100%')
-              .height(80)
-              .fontSize(16)
-              .borderRadius(10)
-              .textAlign(TextAlign.Center)
-              .backgroundColor(0xAFEEEE)
-          }
-        }, item => item)
-      }
-      .editMode(true)
-      .height('50%')
-      .width('90%')
-      .border({ width: 1 })
-      .padding(15)
-      .divider({ strokeWidth: 2, color: 0xFFFFFF, startMargin: 20, endMargin: 20 })
-      .onDragEnter((event: DragEvent, extraParams: string) => {
-        console.log('List onDragEnter, ' + extraParams + 'X:' + event.getX() + 'Y:' + event.getY())
-      })
-      .onDragMove((event: DragEvent, extraParams: string) => {
-        console.log('List onDragMove, ' + extraParams + 'X:' + event.getX() + 'Y:' + event.getY())
-      })
-      .onDragLeave((event: DragEvent, extraParams: string) => {
-        console.log('List onDragLeave, ' + extraParams + 'X:' + event.getX() + 'Y:' + event.getY())
-      })
-      .onDrop((event: DragEvent, extraParams: string) => {
-        let jsonString = JSON.parse(extraParams);
-        if (this.bool) {
-          // 通过splice方法插入元素
-          this.numbers.splice(jsonString.insertIndex, 0, this.text)
-          this.bool = false
-        }
-        this.fruitVisible[this.idx] = Visibility.None
-      })
-    }.width('100%').height('100%').padding({ top: 20 }).margin({ top: 20 })
-  }
-}

+ 1 - 1
entry/src/main/ets/pages/LoginPage.ets

@@ -1,5 +1,5 @@
 import router from '@ohos.router'
-import JGRequest from '../common/util/request'
+import JGRequest from '../common/util/request/Request'
 
 @Entry
 @Component

+ 0 - 342
entry/src/main/ets/pages/ProcessHomeshiyan.ets

@@ -1,342 +0,0 @@
-import { BottomOperateComp } from '../common/component/BottomOperateComp'
-import { TaskComp } from '../common/component/TaskComp';
-import { TitleStateComp } from '../common/component/TitleStateComp'
-import CommonConstants from '../common/constants/CommonConstants';
-import OrderInfo from '../model/OrderInfo';
-import ProcessData from '../model/ProcessData';
-
-/*
- * 工序操作首页
- * */
-@Entry
-@Component
-struct ProcessHome {
-
-  @State orderArray: OrderInfo[] = CommonConstants.ORDER_ARRAY;
-  @State selectOrderId: number = 0
-  @State processes: ProcessData[] = CommonConstants.PROCESS_ARRAY;
-  @State selectProcess: number = 0
-
-  aboutToAppear() {
-  //   todo 查询订单数据
-    if (this.orderArray && this.orderArray.length > 0) {
-      this.selectOrderId = this.orderArray[0].id
-    }
-  }
-
-  build() {
-    Column() {
-      TitleStateComp()
-      Row() {
-        // 订单展示
-        Column() {
-          Row() {
-            Text('待完成的订单[' + (this.orderArray ? this.orderArray.length : 0) + ']')
-              .titleFont()
-          }
-          .width('90%')
-          .height('9%')
-          .justifyContent(FlexAlign.Start)
-          List({space: '2%'}) {
-            ForEach(this.orderArray, (item: OrderInfo)=>{
-              ListItem() {
-                Column() {
-                  Row() {
-                    Text(item.orderName)
-                      .fontSize($r('app.float.process_card_middle_font_size'))
-                      .fontWeight(FontWeight.Medium)
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                      .opacity(this.selectOrderId === item.id ? $r('app.float.card_font_select_opacity') : 1)
-                  }
-                  .width('90%')
-                  .height('15%')
-                  .justifyContent(FlexAlign.Start)
-                  .margin({ top: '2%' })
-
-                  Row() {
-                    Text('产品型号  ')
-                      .fontSize($r('app.float.process_card_small_font_size'))
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                    Text(item.productModel)
-                      .fontSize($r('app.float.process_card_small_font_size'))
-                      .fontWeight(FontWeight.Bold)
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                  }
-                  .width('90%')
-                  .height('12.5%')
-                  .justifyContent(FlexAlign.Start)
-
-                  Row() {
-                    Text('计划编号  ')
-                      .fontSize($r('app.float.process_card_small_font_size'))
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                    Text(item.productModel)
-                      .fontSize($r('app.float.process_card_small_font_size'))
-                      .fontWeight(FontWeight.Bold)
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                  }
-                  .width('90%')
-                  .height('12.5%')
-                  .justifyContent(FlexAlign.Start)
-
-                  Row() {
-                    Text('订单编号  ')
-                      .fontSize($r('app.float.process_card_small_font_size'))
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                    Text(item.orderCode)
-                      .fontSize($r('app.float.process_card_small_font_size'))
-                      .fontWeight(FontWeight.Bold)
-                      .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                  }
-                  .width('90%')
-                  .height('12.5%')
-                  .justifyContent(FlexAlign.Start)
-
-                  Row() {
-                    Row() {}
-                    .width('5%')
-                    Column() {
-                      Text(item.orderNum.toString())
-                        .fontSize($r('app.float.process_card_large_font_size'))
-                        .fontWeight(FontWeight.Bold)
-                        .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                        .padding({ bottom: '2%' })
-                      Text('订单数量')
-                        .fontSize($r('app.float.process_card_small_font_size'))
-                        .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                    }
-                    Row(){}
-                    .width('8%')
-                    Divider()
-                      .vertical(true)
-                      .color(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                      .strokeWidth('1px')
-                      .opacity(this.selectOrderId === item.id ? 0.2 : 1)
-                      .height('60%')
-                    Row(){}
-                    .width('8%')
-
-                    Column() {
-                      Text(item.kittingNum.toString())
-                        .fontSize($r('app.float.process_card_large_font_size'))
-                        .fontWeight(FontWeight.Bold)
-                        .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                        .padding({ bottom: '2%' })
-                      Text('主料齐套')
-                        .fontSize($r('app.float.process_card_small_font_size'))
-                        .fontColor(this.selectOrderId === item.id ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                    }
-                    Blank()
-
-                    Row() {
-                      Text(item.orderState === 1 ? '未开始' : (item.orderState === 2 ? '生产中' : '已完成'))
-                        .fontWeight(FontWeight.Bold)
-                        .textAlign(TextAlign.Center)
-                        .fontSize($r('app.float.process_card_small_font_size'))
-                        .fontColor($r('app.color.general_font_white_color'))
-                        .borderRadius({topLeft: $r('app.float.general_border_radius'), bottomRight: $r('app.float.general_border_radius')})
-                        .backgroundColor(item.orderState === 1 ? $r('app.color.order_wait_state_background') : (item.orderState === 2 ? $r('app.color.order_producing_state_background') : $r('app.color.order_finished_state_background')))
-                        .width($r('app.float.order_state_width'))
-                        .height($r('app.float.order_state_height'))
-                    }
-                    .height('100%')
-                    .layoutWeight(1)
-                    .alignItems(VerticalAlign.Bottom)
-                    .justifyContent(FlexAlign.End)
-                  }
-                  .width('100%')
-                  .justifyContent(FlexAlign.Start)
-                  .layoutWeight(1)
-                }
-                .justifyContent(FlexAlign.Center)
-                // .alignItems(HorizontalAlign.Center)
-                .onClick(() => {
-                  this.selectOrderId = item.id
-                  //   todo 查询当前工序
-                })
-                .width('90%')
-                .height('26.5%')
-                .borderRadius($r('app.float.general_border_radius'))
-                .backgroundColor(this.selectOrderId === item.id ? $r('app.color.order_select_background') : $r('app.color.general_card_background_color'))
-              }
-            })
-          }
-          .alignListItem(ListItemAlign.Center)
-        }
-        .width('26%')
-        .height('100%')
-
-        // 工序
-        Column() {
-          Row() {
-            Text('工序[' + (this.processes && this.processes.length ? this.processes.length : 0) + ']')
-              .titleFont()
-          }
-          .width('100%')
-          .height('9%')
-
-          List() {
-            ForEach(this.processes, (item: ProcessData, index: number) => {
-              ListItem() {
-                Column() {
-                  Row({ space: 4 }) {
-                    Stack() {
-                      Circle()
-                        .width('100%')
-                        .height('100%')
-                        .fillOpacity(0)
-                        .strokeWidth('3px')
-                        .stroke(this.selectProcess === item.sortNum ? $r('app.color.general_font_white_color') : $r('app.color.process_sort_ring_color'))
-                      Row() {
-                        Text(JSON.stringify(item.sortNum))
-                          .fontSize($r('app.float.process_card_middle_font_size'))
-                          .fontColor(this.selectProcess === item.sortNum ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                          .fontWeight(FontWeight.Bold)
-                          .padding({ right: 3 })
-                      }
-                      .width('100%')
-                      .height('100%')
-                      .alignItems(VerticalAlign.Center)
-                      .justifyContent(FlexAlign.Center)
-                    }
-                    .width('26%')
-                    .height('100%')
-                    .padding({ top: 1})
-
-                    Text(item.processName)
-                      .fontSize($r('app.float.process_card_middle_font_size'))
-                      .fontColor(this.selectProcess === item.sortNum ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                      .fontWeight(FontWeight.Bold)
-                    Blank()
-                    Text(item.completedQuantity.toString())
-                      .fontSize($r('app.float.process_card_middle_font_size'))
-                      .fontColor(this.selectProcess === item.sortNum ? $r('app.color.general_font_white_color') : $r('app.color.general_font_color'))
-                      .fontWeight(FontWeight.Bold)
-                  }
-                  .width('100%')
-                  .height('91%')
-                  .justifyContent(FlexAlign.Start)
-                  .backgroundColor(this.selectProcess === item.sortNum ? $r('app.color.order_select_background') : $r('app.color.general_card_background_color'))
-                  .borderRadius('187px')
-                  .padding({ right: '5%' })
-                  .onClick(() => {
-                    this.selectProcess = item.sortNum
-                  })
-
-                  if (index < this.processes.length - 1) {
-                    Row() {
-                      Divider()
-                        .vertical(true)
-                        .color($r('app.color.divider_horizontal_color'))
-                        .strokeWidth('3px')
-                        .padding({ right: 3 })
-                    }
-                    .justifyContent(FlexAlign.Center)
-                    .width('19%')
-                    .layoutWeight(1)
-                  }
-                }
-                .width('100%')
-                .height('15%')
-                .alignItems(HorizontalAlign.Start)
-              }
-            })
-          }
-          .width('100%')
-          .layoutWeight(1)
-
-          Row() {
-            Button('叫主料', { type: ButtonType.Normal })
-              .fontWeight(FontWeight.Bold)
-              .fontColor($r('app.color.general_font_white_color'))
-              .fontSize($r('app.float.process_card_middle_font_size'))
-              .width('100%')
-              .height('67%')
-              .borderRadius($r('app.float.robot_set_radius'))
-              .backgroundColor($r('app.color.order_select_background'))
-          }
-          .width('100%')
-          .height('17%')
-          .justifyContent(FlexAlign.Center)
-        }
-        .width('23%')
-        .height('100%')
-
-        Column() {
-          Row() {
-            Text('任务')
-              .titleFont()
-          }
-          .width('80%')
-          .height('9%')
-          Row() {
-            TaskComp()
-          }
-          .width('60%')
-          .height('36%')
-          Row() {
-            Text('扫码')
-              .titleFont()
-          }
-          .width('80%')
-          .height('9%')
-
-          Row() {
-            Image($r('app.media.scan_qr'))
-              .height('60%')
-          }
-          .width('80%')
-          .height('25%')
-          .justifyContent(FlexAlign.Center)
-          Row() {
-            Row() {
-              Row() {
-                Image($r('app.media.qr_code'))
-                  .height('31%')
-              }
-              .width('8%')
-              .justifyContent(FlexAlign.End)
-
-              TextInput({ placeholder: '请扫描物料编码' })
-                .placeholderColor($r('app.color.text_input_placeholder_font_color'))
-                .placeholderFont({size: $r('app.float.robot_set_font_size'), weight: FontWeight.Medium})
-                .fontSize($r('app.float.robot_set_font_size'))
-                .fontWeight(FontWeight.Medium)
-                .fontColor($r('app.color.general_font_color'))
-                .textAlign(TextAlign.Start)
-                .height('100%')
-                .layoutWeight(1)
-                .maxLength(100)
-                .borderRadius($r('app.float.robot_set_radius'))
-                .backgroundColor($r('app.color.general_font_white_color'))
-            }
-            .borderRadius($r('app.float.robot_set_radius'))
-            .backgroundColor($r('app.color.general_font_white_color'))
-            .width('100%')
-            .height('87%')
-          }
-          .width('80%')
-          .height('10%')
-          .justifyContent(FlexAlign.Center)
-        }
-        .layoutWeight(1)
-        .height('100%')
-      }
-      .backgroundColor($r('app.color.page_general_background'))
-      .width('100%')
-      .height('84%')
-      BottomOperateComp()
-    }
-    .height('100%')
-    .width('100%')
-  }
-
-}
-
-// 统一的标题文字样式
-@Extend(Text) function titleFont(){
-  .fontSize($r('app.float.title_font_size'))
-    .fontWeight(FontWeight.Medium)
-    .fontColor($r('app.color.general_font_color'))
-    .opacity($r('app.float.general_font_opacity'))
-}

+ 1 - 1
entry/src/main/ets/pages/Storage.ets

@@ -3,7 +3,7 @@ import { BottomOperateComp } from '../common/component/BottomOperateComp';
 import {IntelligentWarehousingOutbound}from '../view/IntelligentWarehousingOutbound'
 import  {Statistics}from '../view/Statistics'
 import {IntelligentStorageWarehousing }from '../view/IntelligentStorageWarehousing'
-import {testGet1,StorageStatus,testPost} from '../common/util/request/testR'
+import {testGet1,StorageStatus,testPost} from '../common/util/request/StorageRequestInstance'
 import {OtherStorageOutbound}from '../view/OtherStorageOutbound'
 import {OtherWarehousing}from '../view/OtherWarehousing'
 import { OtherStatistics } from '../view/OtherStatistics';

+ 9 - 3
entry/src/main/ets/pages/process/ProcessHome.ets

@@ -5,6 +5,8 @@ import OrderInfo from '../../model/OrderInfo';
 import ProcessData from '../../model/ProcessData';
 import router from '@ohos.router';
 import { OrderStatisticsComp } from '../../common/component/OrderStatisticsComp';
+import JGRequest from '../../common/util/request/Request';
+
 /*
  * 工序操作首页
  * */
@@ -12,14 +14,18 @@ import { OrderStatisticsComp } from '../../common/component/OrderStatisticsComp'
 @Component
 struct ProcessHome {
 
-  @State orderArray: OrderInfo[] = CommonConstants.ORDER_ARRAY;
+  @State orderArray: OrderInfo[] = [];
   @State selectOrderId: number = 0
   @State processes: ProcessData[] = CommonConstants.PROCESS_ARRAY;
   @State selectProcess: number = 0
   @State mainMaterial: string = ''
 
-  aboutToAppear() {
-    //   todo 查询订单数据
+  async aboutToAppear() {
+    // 查询订单数据
+    this.orderArray = await JGRequest.get("/api/v1/plan/workOrder/taskPage", {
+
+    }) as OrderInfo[]
+
     if (this.orderArray && this.orderArray.length > 0) {
       this.selectOrderId = this.orderArray[0].id
     }

+ 6 - 8
entry/src/main/ets/view/IntelligentStorageWarehousing.ets

@@ -1,9 +1,7 @@
-// import {WarehousingList}from '../common/compont/WarehousingList'
-// import {OutboundScanCode}from '../common/compont/OutboundScanCode'
-import {Warehousing,BufferHopper, WarehousingBufferHopperList,BufferHopperclass}from '../common/util/request/testR'
+import {Warehousing,BufferHopper, WarehousingBufferHopperList,BufferHopperclass}from '../common/util/request/StorageRequestInstance'
 import { ScanTheStorageCode }from '../view/ScanTheStorageCode'
 
-export interface ScanStoragecodeclass {
+export interface ScanStorageCodeClass {
   //批次号
   //已经占用箱数
   useNum?:number
@@ -56,7 +54,7 @@ export interface ScanStoragecodeclass {
 @CustomDialog
   ///入库确认弹框
 struct bufferf {
-   @Link private ScanStoragecodelist:Array<ScanStoragecodeclass>
+   @Link private ScanStoragecodelist:Array<ScanStorageCodeClass>
   @Link CunQuHuo:number
   scroller: Scroller = new Scroller()
   @State navigation:number=0
@@ -82,7 +80,7 @@ struct bufferf {
           .fontColor('#99000000')
         Column(){
           Grid(this.scroller) {
-            ForEach(this.ScanStoragecodelist, (item:ScanStoragecodeclass) => {
+            ForEach(this.ScanStoragecodelist, (item:ScanStorageCodeClass) => {
               //    ForEach(this.Number, (day: string) => {
               GridItem() {
                 Row(){
@@ -330,8 +328,8 @@ struct ChuKU {
 
 @Component
 export struct IntelligentStorageWarehousing{
- // @State private ScanStoragecodelist:Array<ScanStoragecodeclass>=[]
-  @Link private ScanStoragelist:Array<ScanStoragecodeclass>
+ // @State private ScanStoragecodelist:Array<ScanStorageCodeClass>=[]
+  @Link private ScanStoragelist:Array<ScanStorageCodeClass>
   @State previewUri: Resource = $r('app.media.morentu')
   @State videoSrc: Resource = $rawfile('quliao.mp4')
   @State CunQuHuo:number=0

+ 4 - 3
entry/src/main/ets/view/IntelligentWarehousingOutbound.ets

@@ -1,4 +1,5 @@
 import {Workbin} from '../common/component/Workbin'
+
 export interface ScanStorageclass {
   //批次号
   //已经占用箱数
@@ -299,15 +300,15 @@ struct Outbound {
     // dialog默认的borderRadius为24vp,如果需要使用border属性,请和borderRadius属性一起使用。
   }
 }
-//@Entry
+@Entry
 @Component
 export struct IntelligentWarehousingOutbound{
- // @State private ScanStoragelist:Array<ScanStorageclass>=[]
-  @Link private  ScanStoragelist:Array<ScanStorageclass>
+  @State private ScanStoragelist:Array<ScanStorageclass>=[]
   @State previewUri: Resource = $r('app.media.morentu')
   @State videoSrc: Resource = $rawfile('lailaoship.mp4')
   @State textValue: string = ''
   @State inputValue: string = ''
+
   @State ZhuangTai:number=0
   @State CunQuHuo:number=0
   OutboundController: CustomDialogController = new CustomDialogController({

+ 1 - 1
entry/src/main/ets/view/OtherStatistics.ets

@@ -1,5 +1,5 @@
 
-import {testGet1,StorageStatus,testPost, StorageStatusList,stockWarning,StorageStatusList1,returnList ,returnList1} from '../common/util/request/testR'
+import {testGet1,StorageStatus,testPost, StorageStatusList,stockWarning,StorageStatusList1,returnList ,returnList1} from '../common/util/request/StorageRequestInstance'
 class Item{
   name:string
   id:string

+ 1 - 1
entry/src/main/ets/view/OtherStorageOutbound.ets

@@ -1,5 +1,5 @@
 
-import StorageRequest from '../common/util/request/StorageIndex';
+import StorageRequest from '../common/util/request/StorageRequest';
 export interface Materialpositionclass {
 
   //批次号

+ 1 - 1
entry/src/main/ets/view/OtherWarehousing.ets

@@ -1,5 +1,5 @@
 
-import StorageRequest from '../common/util/request/StorageIndex';
+import StorageRequest from '../common/util/request/StorageRequest';
 export interface Materialpositionclass {
 
   //批次号

+ 1 - 1
entry/src/main/ets/view/ScanTheOutboundQRCode.ets

@@ -1,4 +1,4 @@
-import StorageRequest from '../common/util/request/StorageIndex';
+import StorageRequest from '../common/util/request/StorageRequest';
 import {ScanStorageclass}from './IntelligentWarehousingOutbound'
 class Item{
   name:string

+ 12 - 11
entry/src/main/ets/view/ScanTheStorageCode.ets

@@ -1,5 +1,6 @@
-import StorageRequest from '../common/util/request/StorageIndex';
-import {ScanStoragecodeclass}from './IntelligentStorageWarehousing'
+import StorageRequest from '../common/util/request/StorageRequest';
+import { ScanStorageCodeClass } from './IntelligentStorageWarehousing';
+
 class Item{
   name:string
   id:string
@@ -16,7 +17,7 @@ class Item{
   ///无批次号物料详情弹窗
 struct Outbound {
   @Link value:number
-  @State private items:Array<ScanStoragecodeclass>=[]
+  @State private items:Array<ScanStorageCodeClass>=[]
   @Link CunQuHuo:number
   scroller: Scroller = new Scroller()
   @State navigation:number=0
@@ -307,8 +308,8 @@ struct buffer {
   @State num:number=0
   @State materialName:string=''
   @State itemCode:string='132451234'
-  ScanStorageCode= async(itemCode:string) : Promise<ScanStoragecodeclass> => {
-    let obj: ScanStoragecodeclass
+  ScanStorageCode= async(itemCode:string) : Promise<ScanStorageCodeClass> => {
+    let obj: ScanStorageCodeClass
     let res = await StorageRequest.get("/api/v3/common/scanItem/"+itemCode)
     //let res = await StorageRequest.get("/api/v3/stock/selectSafeList/1")
     console.log('testTag', '扫码成功1!' + JSON.stringify(res))
@@ -319,7 +320,7 @@ struct buffer {
   }
   // aboutToAppear(){
   //   ////扫码
-  //   // this.ScanStorageCode().then((res : ScanStorageclass) => {
+  //   // this.ScanStorageCode().then((res : ScanStorageCodeClass) => {
   //   //   console.log('testTag', '扫码成功5!'+JSON.stringify(res))
   //   //   // if (res && res.length > 0) {
   //   //   //   //this.ScanStoragelist= res
@@ -329,7 +330,7 @@ struct buffer {
   //   //  console.log("扫码成功4!"+JSON.stringify(this.ScanStoragelist))
   // }
   @State click:number=-1
-  @Link private ScanStoragelist:Array<ScanStoragecodeclass>
+  @Link private ScanStoragelist:Array<ScanStorageCodeClass>
   @Link CunQuHuo:number
   scroller: Scroller = new Scroller()
   @State navigation:number=0
@@ -363,7 +364,7 @@ struct buffer {
               .backgroundColor("#ffff")
               .borderRadius(21)
               .onSubmit(() => {
-                this.ScanStorageCode(this.itemCode).then((obj : ScanStoragecodeclass)=>{
+                this.ScanStorageCode(this.itemCode).then((obj : ScanStorageCodeClass)=>{
                   this.ScanStoragelist.push(obj)
                 })
               })
@@ -383,7 +384,7 @@ struct buffer {
         Column(){
           Grid(this.scroller) {
             if (this.ScanStoragelist && this.ScanStoragelist.length > 0) {
-              ForEach(this.ScanStoragelist, (item:ScanStoragecodeclass,index:number) => {
+              ForEach(this.ScanStoragelist, (item:ScanStorageCodeClass,index:number) => {
                 GridItem() {
                   Row(){
                     Column({space:10}){
@@ -564,7 +565,7 @@ export struct ScanTheStorageCode{
     gridCount: 4,
     customStyle: true,
   })
-  @Link private ScanStoragelist:Array<ScanStoragecodeclass>
+  @Link private ScanStoragelist:Array<ScanStorageCodeClass>
   scroller: Scroller = new Scroller()
   MaterialRetrievalController: CustomDialogController = new CustomDialogController({
     builder: buffer({
@@ -613,7 +614,7 @@ export struct ScanTheStorageCode{
       ///入库列表
       Column({ space: 5 }) {
         Grid(this.scroller) {
-          ForEach(this.ScanStoragelist, (item:ScanStoragecodeclass) => {
+          ForEach(this.ScanStoragelist, (item:ScanStorageCodeClass) => {
             //    ForEach(this.Number, (day: string) => {
             GridItem() {
               Row(){

+ 1 - 1
entry/src/main/ets/view/Statistics.ets

@@ -1,5 +1,5 @@
 import { McLineChart, Options } from '@mcui/mccharts'
-import {testGet1,StorageStatus,testPost, StorageStatusList,stockWarning,StorageStatusList1,returnList ,returnList1} from '../common/util/request/testR'
+import {testGet1,StorageStatus,testPost, StorageStatusList,stockWarning,StorageStatusList1,returnList ,returnList1} from '../common/util/request/StorageRequestInstance'
 class Item{
   name:string
   id:string

+ 0 - 2
entry/src/main/resources/base/profile/main_pages.json

@@ -7,8 +7,6 @@
     "pages/Distribute",
     "pages/DistributedControl",
     "pages/SmartFactory",
-    "pages/ProcessHomeshiyan",
-    "pages/IndexTemp",
     "pages/TestComponentPage",
     "pages/process/ProcessHome",
     "pages/process/CallMaterialPage",