|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.comparator.CompareUtil;
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.ruoyi.RuoYiApplication;
|
|
@@ -18,6 +19,7 @@ import com.ruoyi.base.domain.BaseSku;
|
|
|
import com.ruoyi.base.service.IBaseLocationInfoService;
|
|
|
import com.ruoyi.base.service.IBaseSkuService;
|
|
|
import com.ruoyi.common.constant.Constants;
|
|
|
+import com.ruoyi.common.core.domain.BaseEntity;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
@@ -32,8 +34,6 @@ import org.springframework.util.Assert;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.LinkedList;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.regex.Matcher;
|
|
@@ -182,7 +182,7 @@ public class ProcessLocationTest {
|
|
|
|
|
|
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
+ /*public static void main(String[] args) {
|
|
|
// System.out.println(handleLocationNo("A\t-02\t-08"));
|
|
|
// System.out.println(handleLocationNo(" A-02-08"));
|
|
|
// System.out.println(handleLocationNo(" -02-08"));
|
|
@@ -234,6 +234,65 @@ public class ProcessLocationTest {
|
|
|
System.out.println("stack.peek():"+linkedList.peek()); //拿取栈顶==出栈
|
|
|
System.out.println("stack:"+linkedList);
|
|
|
}
|
|
|
+*/
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ List<String> idList = Lists.newArrayList("1","2","3","4");
|
|
|
+ List<String> anotherIdList = idList;
|
|
|
+ idList.add("5");
|
|
|
+ System.out.println(JSONUtil.toJsonStr(idList)); //idList: ___
|
|
|
+ System.out.println(JSONUtil.toJsonStr(anotherIdList)); // anotherIdList: ___
|
|
|
+
|
|
|
+ StringBuffer stringBuffer = new StringBuffer("2222");
|
|
|
+ StringBuffer anotherStringBuffer = stringBuffer;
|
|
|
+ stringBuffer.append("1111");
|
|
|
+ System.out.println(stringBuffer); //stringBuffer: ___
|
|
|
+ System.out.println(anotherStringBuffer); //anotherStringBuffer: ___
|
|
|
+
|
|
|
+ BaseEntity baseEntity = new BaseEntity();
|
|
|
+ baseEntity.setRemark("111");
|
|
|
+ BaseEntity anotherBaseEntity = baseEntity;
|
|
|
+ anotherBaseEntity.setRemark("2222");
|
|
|
+ System.out.println(JSONUtil.toJsonStr(baseEntity)); // baseEntity.getRemark(): ___
|
|
|
+ System.out.println(JSONUtil.toJsonStr(anotherBaseEntity)); //anotherBaseEntity.getRemark(): ___
|
|
|
+
|
|
|
+ int a = 5;
|
|
|
+ process(a);
|
|
|
+ System.out.println(a); //a: ___
|
|
|
+
|
|
|
+ Integer b = 5;
|
|
|
+ process(b);
|
|
|
+ System.out.println(b); //b: ___
|
|
|
+
|
|
|
+ String str = "lilei";
|
|
|
+ process(str);
|
|
|
+ System.out.println(str); //str: ___
|
|
|
+
|
|
|
+ process(idList);
|
|
|
+ System.out.println(JSONUtil.toJsonStr(idList));// idList: ___
|
|
|
+ process(baseEntity);
|
|
|
+ System.out.println(JSONUtil.toJsonStr(baseEntity)); //baseEntity.getRemark(): ___
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void process(BaseEntity baseEntity) {
|
|
|
+ baseEntity.setRemark("333333");
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void process(List<String> idList) {
|
|
|
+ idList.add("6");
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void process(String str) {
|
|
|
+ str = new String("hanmeimei");
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void process(int a) {
|
|
|
+ a++;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void process(Integer b) {
|
|
|
+ b++;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
private static String handleLocationNo(String locationNo) {
|