From e72f4946b1696a570022d6ae715fa07656ab89f7 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 27 九月 2023 13:07:43 +0800
Subject: [PATCH] Merge branch 'tzskasrs' of http://47.97.1.152:5880/r/zy-asrs into tzskasrs
---
src/main/java/com/zy/asrs/utils/Utils.java | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index 0b6ae0d..fb9d3a1 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -1,6 +1,7 @@
package com.zy.asrs.utils;
import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.mapper.Wrapper;
import com.core.common.Arith;
import com.core.common.Cools;
import com.zy.common.properties.SlaveProperties;
@@ -8,7 +9,6 @@
import java.text.DecimalFormat;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -350,4 +350,53 @@
throw new RuntimeException("搴撲綅瑙f瀽寮傚父");
}
+ //閫氳繃杈撻�佺珯鐐瑰彿鑾峰彇鎻愬崌鏈哄彿
+ public static Integer stnNoToLiftNo(Integer stnNo) {
+ //涓�鍙锋彁鍗囨満
+ ArrayList<Integer> one = new ArrayList<Integer>(){{
+ add(100);add(101);
+ add(200);add(201);
+ add(300);add(301);
+ }};
+
+ //浜屽彿鎻愬崌鏈�
+ ArrayList<Integer> two = new ArrayList<Integer>(){{
+ add(102);add(103);
+ add(202);add(203);
+ add(340);add(341);
+ }};
+
+ //涓夊彿鎻愬崌鏈�
+ ArrayList<Integer> three = new ArrayList<Integer>(){{
+ add(104);add(105);
+ add(204);add(205);
+ add(345);add(346);
+ }};
+
+ if (one.contains(stnNo)) {
+ return 1;
+ } else if (two.contains(stnNo)) {
+ return 2;
+ } else if (three.contains(stnNo)) {
+ return 3;
+ }
+
+
+ return null;
+ }
+
+ public static void wapperSetCondition(Wrapper wrapper, String column, String condition){
+ if(Cools.isEmpty(condition)){
+ wrapper.isNull(column);
+ }else {
+ wrapper.eq(column,condition);
+ }
+ }
+
+ public static void confirmOnlyMat(Wrapper wrapper, String matnr, String csocode, String isoseq){
+ wapperSetCondition(wrapper,"matnr",matnr);
+ wapperSetCondition(wrapper,"csocode",csocode);
+ wapperSetCondition(wrapper,"isoseq",isoseq);
+ }
+
}
--
Gitblit v1.9.1