parent
939f8f2c04
commit
1f34327049
@ -0,0 +1,38 @@
|
|||||||
|
package com.glxp.mipsdl.req.base;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UdiwmsAddManuRequest {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往来单位ID
|
||||||
|
*/
|
||||||
|
private String unitId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往来单位名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String addr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社会信用号
|
||||||
|
*/
|
||||||
|
private String creditNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人
|
||||||
|
*/
|
||||||
|
private String contact;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
package com.glxp.mipsdl.util;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class CustomUtil {
|
||||||
|
|
||||||
|
public static String getUUId() {
|
||||||
|
UUID uuid = UUID.randomUUID();
|
||||||
|
return uuid.toString().replace("-", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
//随机生成ID
|
||||||
|
public static String getId() {
|
||||||
|
String id = System.currentTimeMillis() + "";
|
||||||
|
int number = new Random().nextInt(90) + 10;
|
||||||
|
id = id + number;
|
||||||
|
return id.substring(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static <T> List<List<T>> splitList(List<T> list, int len) {
|
||||||
|
|
||||||
|
if (list == null || list.isEmpty() || len < 1) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<List<T>> result = new ArrayList<>();
|
||||||
|
|
||||||
|
int size = list.size();
|
||||||
|
int count = (size + len - 1) / len;
|
||||||
|
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
List<T> subList = list.subList(i * len, ((i + 1) * len > size ? size : len * (i + 1)));
|
||||||
|
result.add(subList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//随机生成往来单位ID
|
||||||
|
public static String getUnitId() {
|
||||||
|
String id = System.currentTimeMillis() + "";
|
||||||
|
int number = new Random().nextInt(90) + 10;
|
||||||
|
id = id + number;
|
||||||
|
return "HZ" + id.substring(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isEmpty(List data) {
|
||||||
|
if (data == null || data.isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isNotEmpty(List data) {
|
||||||
|
if (data != null && !data.isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成当前时间字符串
|
||||||
|
public static String getDate(){
|
||||||
|
Calendar ca = Calendar.getInstance();
|
||||||
|
String year = String.valueOf(ca.get(Calendar.YEAR));//获取年份
|
||||||
|
String month=String.valueOf(ca.get(Calendar.MONTH));//获取月份
|
||||||
|
String day=String.valueOf(ca.get(Calendar.DATE));//获取日
|
||||||
|
String minute=String.valueOf(ca.get(Calendar.MINUTE));//分
|
||||||
|
String hour=String.valueOf(ca.get(Calendar.HOUR));//小时
|
||||||
|
String second=String.valueOf(ca.get(Calendar.SECOND));//秒
|
||||||
|
return year+month+day+hour+minute+second;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue