alwaysfrin 7 years ago
commit 52d8fc86ad

@ -57,7 +57,7 @@ public abstract class BaseBean implements Serializable {
public Integer isValid; //EnumUtil.isValid;
@Column(name="create_user")
@ApiParam(value = "创建日期")
@ApiParam(value = "创建用户")
public String createUser;
@Column(name="create_date")
@ -108,4 +108,8 @@ public abstract class BaseBean implements Serializable {
}
return result;
}
public String getOrderByParam() {
return this.orderByParam == null ? "" : this.orderByParam;
}
}

@ -227,10 +227,13 @@ public class CommonEnumUtil {
/**
*
* 1
* 2使
* 2
* 3
* 4
* 5
* 6
* 7
* 8
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_STATUS {
@ -240,7 +243,8 @@ public class CommonEnumUtil {
RESIGNATION(4, "离职", "离职_RESIGNATION"),
EXPIRE(5, "服务到期", "服务到期_EXPIRE"),
LOCKING(6, "锁定", "fa cell-fa fa-lock"),
ENABLE(7, "启用", "fa fa-success cell-fa fa-check");
ENABLE(7, "启用", "fa fa-success cell-fa fa-check"),
DISABLE(8, "禁止", "fa fa-disabled cell-fa fa-times-circle");
private int value;
private String code;
@ -390,11 +394,12 @@ public class CommonEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IS_VAILD {
VAILD(1, "有效"), INVAILD(2, "无效");
private int value = 0;
private String description = null;
private int value;
private String description;
public int getValue() {
return value;
@ -426,8 +431,8 @@ public class CommonEnumUtil {
public enum ASC_OR_DESC {
ASC(1, "正序"), DESC(2, "倒序");
private int value = 0;
private String description = null;
private int value;
private String description;
public int getValue() {
return value;

@ -79,9 +79,8 @@ public class ImppEnumUtil {
}
}
/**
*
*
* 1.Java Class
* 2.Http URL
* 3.CODE
@ -222,7 +221,6 @@ public class ImppEnumUtil {
}
}
/**
*
* 1.INSERT
@ -634,7 +632,6 @@ public class ImppEnumUtil {
}
}
/**
*
* 1.SYSTEM

@ -1,5 +1,7 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* @Description :
* @Reference :
@ -8,4 +10,70 @@ package cn.estsh.i3plus.pojo.base.enumutil;
* @Modify:
**/
public class WmsEnumUtil {
/**
*
* 1: success_queue
* 2: fail_queue
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_NAME{
SUCCESS_QUEUE(1,"success_queue","成功消息队列"),
FAIL_QUEUE(1,"fail_queue","成功消息队列");
private int value;
private String name;
private String description;
QUEUE_NAME() {
}
QUEUE_NAME(int value, String name, String description) {
this.value = value;
this.name = name;
this.description = description;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public String getDescription() {
return 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].name;
}
}
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].name.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -80,7 +80,7 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
* in
* @param ids
*/
public void deleteByIds(long[] ids);
public void deleteByIds(Long[] ids);
/**
*

@ -144,7 +144,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public void deleteByIds(long[] ids) {
public void deleteByIds(Long[] ids) {
if(ids != null && ids.length > 0){
String hql = "delete from " + persistentClass.getName() + " model where model.id in(:ids) ";
Query query = entityManager.createQuery(hql);

@ -62,7 +62,7 @@ public class HqlPack {
* @param showTaday true:false:
* @param isShowTime
*/
public static void timeBuilder( String date, String columnName, StringBuffer result, Boolean showTaday,boolean isShowTime) {
public static void timeBuilder( String date, String columnName, StringBuffer result, Boolean showTaday,boolean isShowTime) {
if(date != null && date.trim().length() > 0){
date = getSafeParam(date);

@ -64,4 +64,13 @@ public class RefRoleMenu extends BaseBean {
@ApiParam(value ="角色名称" , access ="角色名称")
private String redRoleName;
public RefRoleMenu() {
}
public RefRoleMenu(Long menuId, String redMenuName, Long roleId, String redRoleName) {
this.menuId = menuId;
this.redMenuName = redMenuName;
this.roleId = roleId;
this.redRoleName = redRoleName;
}
}

@ -37,7 +37,16 @@ public class SysFile extends BaseBean {
@ApiParam(value ="用户ID" , example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long userId;
public Long getUserId() {
if(userId != null) {
return userId.longValue();
}else{
return userId;
}
}
@Column(name="FILE_PATH")
@ApiParam(value ="文件路径")
private String filePath;
@ -47,8 +56,8 @@ public class SysFile extends BaseBean {
private String fileOriginalName;
@Column(name="FILE_TYPE_ID")
@ApiParam(value ="文件类型ID(字典)")
private String fileTypeId;
@ApiParam(value ="文件类型ID")
private Long fileTypeId;
@Column(name="FILE_TYPE_NAME")
@ApiParam(value ="文件类型名称")

@ -24,9 +24,9 @@ import java.util.List;
**/
@Data
@Entity
@Table(name="SYS_MENU")
@DynamicInsert
@DynamicUpdate
@Table(name="SYS_MENU")
@Api(value="系统功能",description = "系统功能")
public class SysMenu extends BaseBean {

@ -6,6 +6,8 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -18,9 +20,11 @@ import javax.persistence.Table;
* @CreateDate : 2018-10-11 11:02
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name="SYS_ROLE")
@Data
@Api(value="用户角色表",description = "用户权限角色。")
public class SysRole extends BaseBean {

@ -6,6 +6,8 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -19,9 +21,11 @@ import java.util.List;
* @CreateDate : 2018-10-11 11:02
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name="sys_user")
@Data
@Api(value="用户登陆表",description = "用户登陆系统账户。")
public class SysUser extends BaseBean {

@ -47,7 +47,6 @@ public class TaskTime extends BaseBean {
}
}
@Column(name="RED_TIME_NAME")
@ApiParam(value ="时间表达式名称")
private String redTimeName;
@ -90,7 +89,7 @@ public class TaskTime extends BaseBean {
@Column(name="TASK_STATUS")
@ApiParam(value ="任务状态1.正常2.禁用)" , example ="1")
private Integer taskStatus = 1;
private Integer taskStatus;
@Column(name="LAST_RUN_DATE_TIME")
@ApiParam(value ="最后运行时间" , access ="最后运行时间")

@ -230,4 +230,75 @@ public class CoreHqlPack {
return result.toString();
}
/**
*
* @param sysFile
* @return
*/
public static String packHqlSysFile(SysFile sysFile) {
StringBuffer result = new StringBuffer();
// hql拼接
HqlPack.getStringLikerPack(sysFile.getName(),"name",result);
HqlPack.getNumEqualPack(sysFile.getFileTypeId(),"fileTypeId",result);
HqlPack.getStringLikerPack(sysFile.getCreateUser(),"createUser",result);
HqlPack.timeBuilder(sysFile.getCreateDatetime(),"createDatetime",result,false,false);
return result.toString();
}
/**
*
* @param taskTimeExpression
* @return
*/
public static String packHqlTaskTimeExpression(TaskTimeExpression taskTimeExpression) {
StringBuffer result = new StringBuffer();
// hql拼接
HqlPack.getStringLikerPack(taskTimeExpression.getName(),"name",result);
return result.toString();
}
/**
*
* @param taskTime
* @return
*/
public static String packHqlTaskTime(TaskTime taskTime){
StringBuffer result = new StringBuffer();
// hql拼接
HqlPack.getStringLikerPack(taskTime.getName(),"name",result);
HqlPack.getNumEqualPack(taskTime.getTaskStatus(),"taskStatus",result);
HqlPack.getNumEqualPack(taskTime.getTimeId(),"timeId",result);
return result.toString();
}
/**
*
* @param user
* @return
*/
public static String packHqlSysUser(SysUser user){
StringBuffer result = new StringBuffer();
// hql拼接
HqlPack.getStringLikerPack(user.getName(),"name",result);
HqlPack.getStringLikerPack(user.getUserLoginName(),"userLoginName",result);
HqlPack.getStringLikerPack(user.getUserEmail(),"userEmail",result);
HqlPack.getStringLikerPack(user.getUserEmpNo(),"userEmpNo",result);
HqlPack.getStringLikerPack(user.getUserPhone(),"userPhone",result);
HqlPack.getNumLikerPack(user.getUserStatusId(),"userStatusId",result);
HqlPack.getNumLikerPack(user.getDepartmentId(),"departmentId",result);
HqlPack.getNumEqualPack(user.getPositionId(),"positionId",result);
HqlPack.getNumEqualPack(user.getRoleId(),"roleId",result);
HqlPack.getNumEqualPack(user.getIsValid(),"isValid",result);
return result.toString();
}
}

@ -0,0 +1,60 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-09-04 15:58
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name="WH_STOCK_AREA")
@Api("仓库区域")
public class StockArea extends BaseBean {
@Column(name="AREA_CODE")
@ApiParam("仓库区域代码")
public String areaCode;
@Column(name="AREA_NAME")
@ApiParam("仓库区域名称")
public String areaName;
@Column(name="WH_ID")
@ApiParam(value = "仓库编号", example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
public Long whId;
@Column(name="WH_CODE_RDD")
@ApiParam("仓库代码")
public String whCodeRdd;
@Column(name="WH_NAME_RDD")
@ApiParam("仓库名称")
public String whNameRdd;
public Long getWhId() {
if(whId != null) {
return whId.longValue();
}else{
return whId;
}
}
}

@ -0,0 +1,59 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : alwaysfrin
* @CreateDate : 2018-09-04 15:58
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name="WH_STOCK_LOC")
@Api("仓库库位")
public class StockLocation extends BaseBean {
@Column(name="LOC_CODE")
@ApiParam("仓库库位代码")
public String locCode;
@Column(name="LOC_NAME")
@ApiParam("仓库库位名称")
public String locName;
@Column(name="AREA_ID")
@ApiParam(value = "库区编号", example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
public Long areaId;
@Column(name="AREA_CODE_RDD")
@ApiParam("库区代码")
public String areaCodeRdd;
@Column(name="AREA_NAME_RDD")
@ApiParam("库区名称")
public String areaNameRdd;
public Long getAreaId() {
if(areaId != null) {
return areaId.longValue();
}else{
return areaId;
}
}
}

@ -0,0 +1,68 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2018-11-02 9:33
* @Modify:
**/
@Data
@Entity
@Table(name="WMS_BUTTON")
@DynamicInsert
@DynamicUpdate
@Api(value="元数据按钮信息表",description = "元数据按钮信息表")
public class WmsButton extends BaseBean {
@Column(name = "CODE")
@ApiParam(value = "元数据编码")
private String code;
@Column(name = "NAME")
@ApiParam(value = "按钮名称")
private String name;
@Column(name = "ICON")
@ApiParam(value = "图标")
private String icon;
@Column(name = "UI")
@ApiParam(value = "按钮UI路径")
private String ui;
@Column(name = "BS")
@ApiParam(value = "按钮BS路径")
private String bs;
@Column(name = "URL")
@ApiParam(value = "服务端URL")
private String url;
@Column(name = "ORDER_NUM")
@ApiParam(value = "排序号",example = "1")
private Integer orderNum;
@Column(name = "GROUP_NUM")
@ApiParam(value = "分组号",example = "1")
private Integer groupNum;
@Column(name = "IS_BASE")
@ApiParam(value = "是否基础功能",example = "2")
private Integer isBase;
@Column(name = "IS_HIDE")
@ApiParam(value = "是否删除",example = "2")
private Integer isHide;
}

@ -0,0 +1,125 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : amy
* @CreateDate : 2018-11-02 10:00
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "WMS_FIELD")
@Api("元数据字段表")
public class WmsField extends BaseBean{
@Column(name = "OBJECT_CODE")
@ApiParam("对象编码")
private String objectCode;
@Column(name = "FIELD_NUM")
@ApiParam(value = "表单分组序号",example = "-1")
private Integer fieldNum;
@Column(name = "ORDER_NUM")
@ApiParam(value = "排序索引",example = "-1")
private Integer orderNum;
@Column(name = "FIELD_SET")
@ApiParam("表单分组")
private String fieldSet;
@Column(name = "TABLE_NAME")
@ApiParam("字段表名")
private String tableName;
@Column(name = "FIELD_EN")
@ApiParam("英文名")
private String fieldEn;
@Column(name = "FIELD_CN")
@ApiParam("中文名")
private String fieldCn;
@Column(name = "TYPE")
@ApiParam("控件类型")
private String type;
@Column(name = "EXP")
@ApiParam("控件表达式")
private String exp;
@Column(name = "IS_QUERY")
@ApiParam(value = "是否可查询", example = "2")
private Integer isQuery;
@Column(name = "IS_SHOW")
@ApiParam(value = "是否可显", example = "1")
private Integer isShow;
@Column(name = "IS_DISABLE")
@ApiParam(value = "是否禁用", example = "2")
private Integer isDisable;
@Column(name = "IS_ORDER")
@ApiParam(value = "是否可排序", example = "1")
private Integer isOrder;
@Column(name = "IS_EDIT")
@ApiParam(value = "是否可编辑字段", example = "1")
private Integer isEdit;
@Column(name = "IS_REQURIED")
@ApiParam(value = "是否必填", example = "1")
private Integer isRequried;
@Column(name = "IS_MULTIPLE")
@ApiParam(value = "是否多选项", example = "2")
private Integer isMultiple;
@Column(name = "PLACEHOLDER")
@ApiParam("输入提示")
private String placeholder;
@Column(name = "VALIDATOR")
@ApiParam(value = "是否可编辑字段", example = "2")
private Integer validator;
@Column(name = "DEFAULTER")
@ApiParam("默认值")
private String defaulter;
@Column(name = "ADD_STATUS")
@ApiParam("状态")
private Integer addStatus;
@Column(name = "DATA_TYPE")
@ApiParam("数据类型")
private Integer dataType;
@Column(name = "DATA_TYPE_NAME")
@ApiParam("数据类型名称")
private String dataTypeName;
@Column(name = "DATA_SIZE")
@ApiParam("整数位长度")
private Integer dataSize;
@Column(name = "DATA_DECIMAL")
@ApiParam("小数位长度")
private Integer dataDecimal;
}

@ -0,0 +1,88 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : amy
* @CreateDate : 2018-11-02 10:37
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "WMS_OBJECT")
@Api("元数据信息表")
public class WmsObject extends BaseBean {
@Column(name = "CODE")
@ApiParam("对象编码")
private String code;
@Column(name = "NAME")
@ApiParam("对象名称")
private String name;
@Column(name = "VIEW_NAME")
@ApiParam("查询数据视图")
private String viewName;
@Column(name = "TABLE_NAME")
@ApiParam("保存数据主表")
private String tableName;
@Column(name = "PK_NAME")
@ApiParam("主键")
private String pkName;
@Column(name = "DATA_SOURCE")
@ApiParam("数据源")
private String dataSource;
@Column(name = "IS_SINGLE")
@ApiParam(value = "是否单选", example = "1")
private Integer isSingle;
@Column(name = "IS_CELL_EDIT")
@ApiParam(value = "是否可行内编辑", example = "2")
private Integer isCellEdit;
@Column(name = "IS_SHOW_NUM")
@ApiParam(value = "是否显示行号", example = "1")
private Integer isShowNum;
@Column(name = "IS_FIRST_LOAD")
@ApiParam(value = "是否初始加载", example = "1")
private Integer isFirstLoad;
@Column(name = "FILTER")
@ApiParam("初始数据过滤条件")
private String filter;
@Column(name = "DEFAULT_ORDER")
@ApiParam("默认排序字段(desc)")
private String defaultOrder;
@Column(name = "BIZ_INTERCEPT")
@ApiParam("自定义业务拦截")
private String bizIntercept;
@ApiParam("元数据字段列表")
private transient List<WmsField> fiedList;
@ApiParam("自定义按钮列表")
private transient List<WmsButton> btnList;
}

@ -0,0 +1,132 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jessica.chen
* @CreateDate : 2018-11-02 11:06
* @Modify:
**/
@Data
@Entity
@Table(name="WMS_STOCK_QUANT")
@DynamicInsert
@DynamicUpdate
@Api(value="库存表",description = "库存表")
public class WmsStockQuant extends BaseBean{
@Column(name="CUST_ID")
@ApiParam(value ="客户编号",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long custId;
@Column(name="CUST_CODE")
@ApiParam(value ="客户代码")
private String custCode;
@Column(name="SUPP_ID")
@ApiParam(value ="供应商编号",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long suppId;
@Column(name="SUPP_CODE")
@ApiParam(value ="供应商代码")
private String suppCode;
@Column(name="PART_ID")
@ApiParam(value ="零件id", example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long partId;
@Column(name="PART_NO")
@ApiParam(value ="零件编号")
private String partNo;
@Column(name="PART_NAME_RDD")
@ApiParam(value ="零件名称")
private String partNameRdd;
@Column(name="UNIT")
@ApiParam(value ="采购单位")
private String unit;
@Column(name="QIT")
@ApiParam(value ="库存数")
private Double qit;
@Column(name="ERP_WAREHOUSE")
@ApiParam(value ="收货库存地")
private String erpWareHouse;
@Column(name="WH_ID")
@ApiParam(value ="仓库编号",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long whId;
@Column(name="WH_CODE")
@ApiParam(value ="仓库代码")
private String whCode;
@Column(name="LOC_ID")
@ApiParam(value ="库位编号",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long locId;
@Column(name="LOC_CODE")
@ApiParam(value ="库位代码")
private String locCode;
public Long getCustId() {
if(custId != null) {
return custId.longValue();
}else{
return custId;
}
}
public Long getSuppId() {
if(suppId != null) {
return suppId.longValue();
}else{
return suppId;
}
}
public Long getPartId() {
if(partId != null) {
return partId.longValue();
}else{
return partId;
}
}
public Long getWhId() {
if(whId != null) {
return whId.longValue();
}else{
return whId;
}
}
public Long getLocId() {
if(locId != null) {
return locId.longValue();
}else{
return locId;
}
}
}

@ -37,11 +37,11 @@ public class WmsTrans extends BaseBean{
private String sn;
@Column(name="PART_ID")
@ApiParam(value ="零件id")
@ApiParam(value ="零件id",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long partId;
@Column(name="PART_No")
@Column(name="PART_NO")
@ApiParam(value ="零件编号")
private String partNo;
@ -50,7 +50,7 @@ public class WmsTrans extends BaseBean{
private String partNameRdd;
@Column(name="TRANS_STATUS")
@ApiParam(value ="交易状态")
@ApiParam(value ="交易状态",example = "1")
private Integer transStatus;
@Column(name="QTY")
@ -70,7 +70,7 @@ public class WmsTrans extends BaseBean{
private String unit;
@Column(name="LOC_ID")
@ApiParam(value ="库位id")
@ApiParam(value ="库位id",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long locId;
@ -78,8 +78,15 @@ public class WmsTrans extends BaseBean{
@ApiParam(value ="库位代码")
private String locCode;
@ApiParam(value ="目标库位id")
@JsonSerialize(using = ToStringSerializer.class)
private transient Long targetLocId;
@ApiParam(value ="目标库位代码")
private transient String targetLocCode;
@Column(name="GROUP_ID")
@ApiParam(value ="分组id")
@ApiParam(value ="分组id",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long groupId;

@ -0,0 +1,44 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jimmy.zeng
* @CreateDate : 2018-11-04 12:19
* @Modify:
**/
@Data
@Entity
@Table(name="WMS_TRANS_CODE")
@DynamicInsert
@DynamicUpdate
@Api(value="交易代码方法表",description = "交易代码方法表")
public class WmsTransCode extends BaseBean{
@Column(name="TRANS_CODE")
@ApiParam(value ="交易代码")
private String transCode;
@Column(name="CLASS_PATH")
@ApiParam(value ="类路径")
private String classPath;
@Column(name="ATTRIBUTE")
@ApiParam(value ="属性")
private String attribute;
@Column(name="METHOD_NAME")
@ApiParam(value ="方法名")
private String methodName;
}

@ -37,11 +37,11 @@ public class WmsTransRcd extends BaseBean{
private String sn;
@Column(name="PART_ID")
@ApiParam(value ="零件id")
@ApiParam(value ="零件id",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long partId;
@Column(name="PART_No")
@Column(name="PART_NO")
@ApiParam(value ="零件编号")
private String partNo;
@ -50,7 +50,7 @@ public class WmsTransRcd extends BaseBean{
private String partNameRdd;
@Column(name="TRANS_STATUS")
@ApiParam(value ="交易状态")
@ApiParam(value ="交易状态",example = "1")
private Integer transStatus;
@Column(name="QTY")
@ -70,7 +70,7 @@ public class WmsTransRcd extends BaseBean{
private String unit;
@Column(name="LOC_ID")
@ApiParam(value ="库位id")
@ApiParam(value ="库位id",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long locId;
@ -79,10 +79,14 @@ public class WmsTransRcd extends BaseBean{
private String locCode;
@Column(name="GROUP_ID")
@ApiParam(value ="分组id")
@ApiParam(value ="分组id",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long groupId;
@ApiParam(value ="库存数")
private transient Double qit;
public Long getLocId() {
if(locId != null) {
return locId.longValue();

@ -1,8 +1,6 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -30,7 +28,6 @@ public class WmsTransType extends BaseBean{
@Column(name="TRANS_CODE")
@ApiParam(value ="交易代码")
@JsonSerialize(using = ToStringSerializer.class)
private String transCode;
@Column(name="TRANS_NAME")

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.StockArea;
import cn.estsh.i3plus.pojo.wms.bean.WmsTransType;
/**
* @Description :
* @Reference :
* @Author : jessica.chen
* @CreateDate : 2018-11-04 12:02
* @Modify:
**/
public interface StockAreaRepository extends BaseRepository<StockArea, Long> {
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.StockArea;
import cn.estsh.i3plus.pojo.wms.bean.StockLocation;
/**
* @Description :
* @Reference :
* @Author : jessica.chen
* @CreateDate : 2018-11-04 14:33
* @Modify:
**/
public interface StockLocationRepository extends BaseRepository<StockLocation, Long> {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsButton;
/**
* @Description :()
* @Reference :
* @Author : hansen.ke
* @CreateDate : 2018-11-02 10:22
* @Modify:
**/
public interface WmsButtonRepository extends BaseRepository<WmsButton,Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsField;
import org.springframework.stereotype.Service;
/**
* @Description :
* @Reference :
* @Author : amy
* @CreateDate : 2018-11-02 11:24
* @Modify:
**/
@Service
public interface WmsFieldRepository extends BaseRepository<WmsField, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsObject;
import org.springframework.stereotype.Service;
/**
* @Description :
* @Reference :
* @Author : amy
* @CreateDate : 2018-11-02 11:23
* @Modify:
**/
@Service
public interface WmsObjectRepository extends BaseRepository<WmsObject, Long> {
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsStockQuant;
import cn.estsh.i3plus.pojo.wms.bean.WmsTransRcd;
/**
* @Description :
* @Reference :
* @Author : jessica.chen
* @CreateDate : 2018-11-02 17:08
* @Modify:
**/
public interface WmsStockQuantRepository extends BaseRepository<WmsStockQuant, Long> {
}

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsTrans;
import cn.estsh.i3plus.pojo.wms.bean.WmsTransCode;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jimmy.zeng
* @CreateDate : 2018-11-04 14:47
* @Modify:
**/
@Repository
public interface WmsTransCodeRepository extends BaseRepository<WmsTransCode, Long> {
@Query("from WmsTransCode wtc where wtc.transCode =:code and wtc.isValid = 1")
WmsTransCode findWmsTransCodeByCode(@Param("code") String code);
}

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsTransRcd;
import org.springframework.stereotype.Repository;
/**
* @Description :
@ -10,5 +11,6 @@ import cn.estsh.i3plus.pojo.wms.bean.WmsTransRcd;
* @CreateDate : 2018-11-02 9:50
* @Modify:
**/
@Repository
public interface WmsTransRcdRepository extends BaseRepository<WmsTransRcd, Long> {
}

@ -2,6 +2,10 @@ package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsTrans;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
/**
* @Description :
@ -10,5 +14,10 @@ import cn.estsh.i3plus.pojo.wms.bean.WmsTrans;
* @CreateDate : 2018-11-02 9:49
* @Modify:
**/
@Repository
public interface WmsTransRepository extends BaseRepository<WmsTrans, Long> {
@Modifying
@Query("delete from WmsTrans w where w.groupId =:groupId and w.isValid = 1")
void deleteByGroupId(@Param("groupId") Long groupId);
}

@ -11,5 +11,6 @@ import org.springframework.stereotype.Repository;
* @CreateDate : 2018-11-02 9:49
* @Modify:
**/
@Repository
public interface WmsTransTypeRepository extends BaseRepository<WmsTransType, Long> {
}

@ -1,8 +1,10 @@
package cn.estsh.i3plus.pojo.wms.sqlpack;
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.wms.bean.*;
import cn.estsh.i3plus.pojo.wms.bean.InterfaceDevice;
import cn.estsh.i3plus.pojo.wms.bean.WareHouse;
import cn.estsh.i3plus.pojo.wms.bean.WmsTrans;
import cn.estsh.i3plus.pojo.wms.bean.WmsTransType;
/**
@ -30,6 +32,19 @@ public class WmsHqlPack {
return result.toString();
}
public static String packHqlWmsButton(WmsButton wmsButton) {
StringBuffer result = new StringBuffer();
// 功能名称name
HqlPack.getStringLikerPack(wmsButton.getName(),"name", result);
// 前端实现ui
HqlPack.getStringLikerPack(wmsButton.getUi(),"ui", result);
// URI权限规则bs
HqlPack.getStringLikerPack(wmsButton.getBs(),"bs", result);
return result.toString();
}
/**
*
* @return
@ -42,12 +57,67 @@ public class WmsHqlPack {
return null;
}
/**
*
* @param wmsObject
* @return
*/
public static String packHqlWmsObject(WmsObject wmsObject){
StringBuffer result = new StringBuffer();
// 编码
HqlPack.getStringLikerPack(wmsObject.getCode(),"code",result);
// 名称
HqlPack.getStringEqualPack(wmsObject.getName(),"name",result);
// 数据主表
HqlPack.getStringEqualPack(wmsObject.getTableName(),"tableName",result);
// 自定义业务拦截
HqlPack.getStringEqualPack(wmsObject.getBizIntercept(),"bizIntercept",result);
return result.toString();
}
/**
*
* @param wmsField
* @return
*/
public static String packHqlWmsField(WmsField wmsField){
StringBuffer result = new StringBuffer();
// 编码
HqlPack.getStringLikerPack(wmsField.getObjectCode(),"objectCode",result);
HqlPack.getStringLikerPack(wmsField.getTableName(),"tableName",result);
return result.toString();
}
/**
*
* @param wmsTransType
* @return
*/
public static String packHqlWmsTransType(WmsTransType wmsTransType) {
StringBuffer result = new StringBuffer();
//查询参数封装
HqlPack.getStringEqualPack(wmsTransType.getTransCode(),"transCode",result);
HqlPack.getStringEqualPack(wmsTransType.getTransName(),"transName",result);
HqlPack.getStringLikerPack(wmsTransType.getTransCode(),"transCode",result);
HqlPack.getStringLikerPack(wmsTransType.getTransName(),"transName",result);
return result.toString();
}
/**
*
* @param wmsTrans
* @return
*/
public static String packHqlWmsTrans(WmsTrans wmsTrans) {
StringBuffer result = new StringBuffer();
//查询参数封装
HqlPack.getStringEqualPack(wmsTrans.getTransCode(),"transCode",result);
HqlPack.getNumEqualPack(wmsTrans.getSn(),"sn",result);
HqlPack.timeBuilder(wmsTrans.getCreateDatetime(),null,"createDatetime",result,true);
return result.toString();
}

Loading…
Cancel
Save