yun-zuoyi
alwaysfrin 7 years ago
commit 6118568fd5

@ -96,16 +96,43 @@ public class BaseResultBean<Obj> {
} }
public static BaseResultBean buildBaseResultBean(boolean success,String msg){ public static BaseResultBean buildBaseResultBean(boolean success,String msg){
BaseResultBean rs = new BaseResultBean(); BaseResultBean rs = new BaseResultBean();
rs.success = success; rs.success = success;
if(success) { if (success) {
rs.msg = msg; rs.msg = msg;
rs.code = ResourceEnumUtil.MESSAGE.SUCCESS.getCode(); rs.code = ResourceEnumUtil.MESSAGE.SUCCESS.getCode();
}else { } else {
rs.code = ResourceEnumUtil.MESSAGE.FAIL.getCode(); rs.code = ResourceEnumUtil.MESSAGE.FAIL.getCode();
rs.errorMsg = msg; rs.errorMsg = msg;
} }
return rs; return rs;
} }
public BaseResultBean setResultList(List<Obj> resultList) {
this.resultList = resultList;
return this;
}
public BaseResultBean setResultObject(Obj resultObject) {
this.resultObject = resultObject;
return this;
}
public BaseResultBean setResultMap(Map<String, Object> resultMap) {
this.resultMap = resultMap;
return this;
}
public BaseResultBean setPager(Pager pager) {
this.pager = pager;
return this;
}
public BaseResultBean setListPager(ListPager<Obj> listPager) {
this.listPager = listPager;
this.setPager(listPager.getObjectPager());
this.setResultList(listPager.getObjectList());
return this;
}
} }

@ -382,7 +382,7 @@ public class CommonEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_STATUS { public enum DATA_STATUS {
ENABLE(1, "启用", "fa fa-success cell-fa fa-check"), ENABLE(1, "启用", "fa fa-success cell-fa fa-check"),
DISABLE(2, "禁", "fa fa-disabled cell-fa fa-times-circle"), DISABLE(2, "禁", "fa fa-disabled cell-fa fa-times-circle"),
LOCKING(3, "锁定", "fa cell-fa fa-lock"); LOCKING(3, "锁定", "fa cell-fa fa-lock");
private int value; private int value;
@ -615,35 +615,195 @@ public class CommonEnumUtil {
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CLOUD_STATUS { public enum CLOUD_APP_STATUS {
REGISTERED(1, "注册"), UP(1,"UP" ,"在线"),
DISCONNECT(2, "断开"); DOWN(2, "DOWN","断线");
private int value; private int value;
private String code;
private String description; private String description;
private CLOUD_APP_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() { public int getValue() {
return value; return value;
} }
public String getCode() {
return code;
}
public String getDescription() { public String getDescription() {
return description; return description;
} }
private CLOUD_STATUS(int value, String description) { public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static int codeOfValue(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
* return "Windows";
* return "Mac";
* return "Unix";
* return "Android";
* return "IPhone";
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum LOG_LOGIN_PLATFORM {
WINDOWS(1, "Windows", "Windows 操作系统"),
MAC(2, "Mac", "Mac 操作系统"),
UNIX(3, "Unix", "Linux 操作系统"),
ANDROID(4, "Android", "Android 操作系统"),
IPHONE(5, "IPhone", "IPhone 操作系统");
private int value;
private String name;
private String description;
LOG_LOGIN_PLATFORM() {
}
LOG_LOGIN_PLATFORM(int value, String name, String description) {
this.value = value; this.value = value;
this.name = name;
this.description = description; this.description = description;
} }
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getName() {
return name;
}
public static String valueOf(int val) { public static String valueOf(int val) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) { if (values()[i].value == val) {
tmp = values()[i].description; tmp = values()[i].getName();
}
}
return tmp;
}
/**
* -1
* @param desc
* @return
*/
public static int descOf(String desc) {
int tmp = -1;
for (int i = 0; i < values().length; i++) {
if (values()[i].name.equals(desc)) {
tmp = values()[i].value;
} }
} }
return tmp; return tmp;
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_LOGIN_STATUS {
LOGIN_SUCCESS(1, "登录成功", "登录成功"),
WRONG_PASSWORD(3, "密码错误", "Linux 密码错误"),
WRONG_USERNAME_OR_PASSWORD(2, "用户名或密码错误", "用户名或密码错误"),
USER_LOGIN_LOCKING(4, "账号已锁定", "账号已锁定"),
USER_INFO_NULL(5, "用户信息不存在", "用户信息不存在"),
SYSTEM_ERROR(6, "系统异常", "系统异常");
private int value;
private String name;
private String description;
USER_LOGIN_STATUS() {
}
USER_LOGIN_STATUS(int value, String name, String description) {
this.value = value;
this.name = name;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getName() {
return name;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].getName();
}
}
return tmp;
}
public static int descOf(String desc) {
int tmp = -1;
for (int i = 0; i < values().length; i++) {
if (values()[i].name.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
} }

@ -209,6 +209,16 @@ public class ImppEnumUtil {
return tmp; return tmp;
} }
public static String valueOfName(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].name;
}
}
return tmp;
}
public static String codeOfDescription(String code) { public static String codeOfDescription(String code) {
String tmp = null; String tmp = null;
for (int i = 0; i < values().length; i++) { for (int i = 0; i < values().length; i++) {

@ -0,0 +1,38 @@
package cn.estsh.i3plus.pojo.model.wms;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
/**
* @Description :
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2018-12-17 11:39
* @Modify:
**/
@Data
public abstract class BaseComponetsParam implements Serializable {
@ApiParam(value = "单据号")
public String orderNo;
@ApiParam(value = "单据类型")
public String orderType;
@ApiParam(value = "条码")
public String sn;
@ApiParam(value = "条码类型")
public String snType;
@ApiParam(value = "用户编号")
public String userNo;
@ApiParam(value = "设备编号")
public String fixNo;
@ApiParam(value = "工厂代码")
public String organizeCode;
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.model.wms;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2018-12-17 11:50
* @Modify:
**/
@Data
public class TransSnModle extends BaseComponetsParam{
@ApiParam(value = "移动单号")
public String moveNo;
@ApiParam(value = "交易类型代码")
public String transTypeCode;
}

@ -48,6 +48,10 @@ public class SysLogUserLogin extends BaseBean {
@ApiParam(value ="登录IP" , access ="登录IP") @ApiParam(value ="登录IP" , access ="登录IP")
private String logLoginHost; private String logLoginHost;
@Column(name="LOG_LOGIN_BROWSER")
@ApiParam(value ="登录浏览器" , access ="登录的浏览器")
private String logLoginBrowser;
@Column(name="LOG_LOGIN_DATE_TIME") @Column(name="LOG_LOGIN_DATE_TIME")
@ApiParam(value ="登录时间" , access ="登录时间") @ApiParam(value ="登录时间" , access ="登录时间")
private String logLoginDateTime; private String logLoginDateTime;

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.platform.platbean; package cn.estsh.i3plus.pojo.platform.platbean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -33,6 +34,14 @@ public class SysLogException extends BaseBean {
@ApiParam(value ="系统模块(枚举)", example = "1") @ApiParam(value ="系统模块(枚举)", example = "1")
private Integer excModule; private Integer excModule;
private String excModuleName;
public String getExcModuleName(){
if(this.excModule != null){
return CommonEnumUtil.SOFT_TYPE.valueOfDescription(this.excModule);
}
return excModuleName;
}
@Column(name="EXC_CLASS_NAME") @Column(name="EXC_CLASS_NAME")
@ApiParam(value ="异常类名") @ApiParam(value ="异常类名")
private String excClassName; private String excClassName;

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.platform.platbean; package cn.estsh.i3plus.pojo.platform.platbean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -35,6 +36,14 @@ public class SysLogOperate extends BaseBean {
@ApiParam(value ="系统模块(枚举)", example = "1") @ApiParam(value ="系统模块(枚举)", example = "1")
private Integer operateModule; private Integer operateModule;
private String operateModuleName;
public String getOperateModuleName(){
if(this.operateModule != null){
return CommonEnumUtil.SOFT_TYPE.valueOfDescription(this.operateModule);
}
return operateModuleName;
}
//ImppEnumUtil.OPERATE_TYPE枚举 //ImppEnumUtil.OPERATE_TYPE枚举
@Column(name="OPERATE_TYPE") @Column(name="OPERATE_TYPE")
@ApiParam(value ="操作类型" , example = "-1") @ApiParam(value ="操作类型" , example = "-1")

@ -832,6 +832,7 @@ public class WmsHqlPack {
HqlPack.getStringEqualPack(wmsMoveMaster.getOrderNo(), "orderNo", result); HqlPack.getStringEqualPack(wmsMoveMaster.getOrderNo(), "orderNo", result);
HqlPack.getNumEqualPack(wmsMoveMaster.getOrderStatus(),"orderStatus",result); HqlPack.getNumEqualPack(wmsMoveMaster.getOrderStatus(),"orderStatus",result);
HqlPack.getStringEqualPack(wmsMoveMaster.getTransTypeCode(), "transTypeCode", result);
getStringBuilderPack(wmsMoveMaster, result); getStringBuilderPack(wmsMoveMaster, result);
return result.toString(); return result.toString();

Loading…
Cancel
Save