Merge remote-tracking branch 'remotes/origin/dev' into test

yun-zuoyi
Silliter 6 years ago
commit de5760bba1

@ -1,7 +1,21 @@
package cn.estsh.i3plus.pojo.base.dynamic;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @Description :
@ -10,24 +24,46 @@ import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
* @CreateDate : 2019-01-24 15:56
* @Modify:
**/
public class DynamicEntity extends BaseBean {
public class DynamicEntity extends BaseBean implements Serializable {
public static final Logger LOGGER = LoggerFactory.getLogger(DynamicEntity.class);
public String tableName;
/*private String uri;
private String method;
private String uri;
private Object[] args;
private Object result;
private String operator;
private String appName;
private String appName;*/
public List<String> propertyList;
public DynamicEntity(){
try {
this.setPropertyList(new ArrayList<>());
initDynamic();
} catch (Exception e) {
e.printStackTrace();
}
}
public DynamicEntity(String tableName){
this.tableName = tableName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
/**
*
*
* @param method
* @param uri
* @param args
* @param result
* @return
*/
*//*
public DynamicEntity get(String method, String uri, Object[] args, Object result, String operator, String appName) {
setMethod(method);
setUri(uri);
@ -84,10 +120,160 @@ public class DynamicEntity extends BaseBean {
public void setAppName(String appName) {
this.appName = appName;
}*/
/**
* 便
* @throws InvocationTargetException
* @throws IllegalAccessException
* @throws NoSuchMethodException
*/
public void initDynamic() {
Field[] fields = this.getClass().getDeclaredFields();
Method setMethod = null;
String setMethodName,propName;
Object fieldVal = null;
for(Field f : fields) {
propName = f.getName().replace("$cglib_prop_", "");
if(!"LOGGER".equals(propName) && !"propertyList".equals(propName)) {
this.getPropertyList().add(propName); //添加到属性list中
setMethodName = "set" + propName.substring(0,1).toUpperCase() + propName.substring(1);
f.setAccessible(true);
try {
fieldVal = f.get(this);
} catch (IllegalAccessException e) {
fieldVal = null;
}
if(fieldVal == null) {
if (f.getType() == Integer.class) {
fieldVal = 0;
} else if (f.getType() == Long.class) {
fieldVal = 0L;
} else if (f.getType() == Float.class) {
fieldVal = 0.0f;
} else if (f.getType() == Double.class) {
fieldVal = 0.0d;
} else {
fieldVal = "";
}
}
try {
setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{f.getType()});
setMethod.invoke(this, fieldVal);
} catch (NoSuchMethodException e) {
LOGGER.error("没有方法:{}", setMethodName, e);
} catch (IllegalAccessException e) {
LOGGER.error("入参出错:{}:{}:{}", f, f.getType(), fieldVal, e);
} catch (InvocationTargetException e) {
LOGGER.error("方法返回出错:{}", setMethodName, e);
}
}
}
}
@Override
public String toString() {
return ReflectionToStringBuilder.toString(this);
String result = "{";
Object fieldVal = null;
Field[] fields = this.getClass().getDeclaredFields();
String fieldName;
for(Field f : fields) {
fieldName = f.getName().replace("$cglib_prop_", "");
if(!"LOGGER".equals(fieldName) && !"propertyList".equals(fieldName)) {
f.setAccessible(true);
fieldVal = new Object();
try {
fieldVal = f.get(this);
} catch (IllegalAccessException e) {
fieldVal = null;
}
if (fieldVal == null) {
if (f.getType() == Integer.class || f.getType() == Long.class) {
fieldVal = 0;
} else if (f.getType() == Float.class || f.getType() == Double.class) {
fieldVal = 0.0;
} else {
fieldVal = "";
}
}
result += "\"" + fieldName + "\":\"" + fieldVal + "\",";
}
}
if(fields.length > 0) {
result = result.substring(0,result.length()-1);
}
result += "}";
return result;
}
/**
*
* @param propName
* @param val
* @throws InvocationTargetException
* @throws IllegalAccessException
* @throws NoSuchMethodException
*/
public void setDynProperty(String propName,Object val){
//初始化set方法
String setMethodName = "set" + propName.substring(0, 1).toUpperCase() + propName.substring(1);
//获取方法
Method setMethod = null;
try {
setMethod = this.getClass().getDeclaredMethod(setMethodName, new Class[]{val.getClass()});
setMethod.invoke(this, val);
} catch (NoSuchMethodException e) {
LOGGER.error("没有方法:{}",setMethodName,e);
} catch (IllegalAccessException e) {
LOGGER.error("入参出错:{}:{}",val,val.getClass(),e);
} catch (InvocationTargetException e) {
LOGGER.error("方法返回出错:{}",setMethodName,e);
}
}
/**
*
* @param propName
* @return
* @throws NoSuchMethodException
* @throws InvocationTargetException
* @throws IllegalAccessException
*/
public Object getDynProperty(String propName){
//初始化set方法
String setMethodName = "get" + propName.substring(0,1).toUpperCase() + propName.substring(1);
try {
//获取方法
Method getMethod = this.getClass().getDeclaredMethod(setMethodName);
//实现方法
return getMethod.invoke(this);
} catch (NoSuchMethodException e) {
LOGGER.error("没有方法:{}:{}",setMethodName,propName,e);
} catch (IllegalAccessException e) {
LOGGER.error("没有方法:{}:{}",setMethodName,propName,e);
} catch (InvocationTargetException e) {
LOGGER.error("方法返回出错:{}",setMethodName,e);
}
return null;
}
public List<String> getPropertyList() {
return propertyList;
}
public void setPropertyList(List<String> propertyList) {
this.propertyList = propertyList;
}
}

@ -1,45 +0,0 @@
package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* @Description : wms
* @Reference :
* @Author : jack.lv
* @CreateDate : 2019-3-8 15:53
* @Modify:
**/
public class DataAuthEnumUtil {
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_OBJ_TYPE {
WAREHOUSE("10", "WAREHOUSE", "仓库对象"),
ZONE("20", "ZONE", "存储区对象"),
LOCATE("30", "LOCATE", "库位对象");
private String code;
private String description;
String value;
DATA_OBJ_TYPE(String value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public String getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
}
}

@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @Modify:
**/
public class WmsEnumUtil {
/**
*
*/
@ -957,6 +958,40 @@ public class WmsEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SN_QUALITY_STATUS {
NORMAL(10, "合格"), ABNORMAL(20, "不合格"), ISOLATED(30, "隔离");
private int value;
private String description;
SN_QUALITY_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
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].description;
}
}
return tmp;
}
}
/**
*
* 1=10=20=30=40=50=60=70=
*/
@ -968,8 +1003,9 @@ public class WmsEnumUtil {
INSTOCKED(30, "入库"),
PICKED(40, "配料"),
OUT_STOCK(50, "出库"),
SCRAPED(60, "报废"),
COMMING(70, "在途");
FRAZE(60, "冻结"),
SCRAPED(70, "报废"),
COMMING(80, "在途");
private int value;
private String description;
@ -1239,6 +1275,41 @@ public class WmsEnumUtil {
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MOVE_DETAIL_STATUS {
CREATE(10, "创建"),
BE_HANDLE(20, "待处理"),
FINISH(30, "已处理");
private int value;
private String description;
MOVE_DETAIL_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
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].description;
}
}
return tmp;
}
}
/**
*
@ -1819,18 +1890,103 @@ public class WmsEnumUtil {
}
/**
*
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_OBJ_TYPE {
WAREHOUSE(10, "WAREHOUSE", "仓库对象"),
ZONE(20, "ZONE", "存储区对象"),
LOCATE(30, "LOCATE", "库位对象"),
MATERIAL(40, "MATERIAL", "物料对象");
private String code;
private String description;
int value;
DATA_OBJ_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
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].description;
}
}
return tmp;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_OBJ_OP_TYPE {
ADD(10, "ADD", "新增"),
DEL(20, "DEL", "删除"),
UPD(30, "UPD", "修改"),
QUERY(40, "QUERY", "查询");
private String code;
private String description;
int value;
DATA_OBJ_OP_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
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].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_ROLE_TYPE {
WAREHOUSE(1, "WAREHOUSE", "仓库"),
STOCK(2, "STOCK", "库存");
public enum TRANS_QUAN_GENERAL_TAG {
MINUS(-1, "MINUS", "一条:负"), ZERO(0, "ZERO", "一条0"), PLUS(1, "PLUS", "一条:正"), TWO(2, "TWO", "两条:一正一负");
private String code;
private String description;
int value;
DATA_ROLE_TYPE(int value, String code, String description) {
TRANS_QUAN_GENERAL_TAG(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
@ -1847,5 +2003,15 @@ public class WmsEnumUtil {
public String getDescription() {
return description;
}
public static TRANS_QUAN_GENERAL_TAG codeOf(String code) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].code.equals(code)) {
return values()[i];
}
}
return null;
}
}
}

@ -451,6 +451,32 @@ public class HqlPack {
* @param columnName
* @param result
*/
public static void getInOrPackString(String data,String columnName, StringBuffer result){
if (data != null && data.trim().length()>0) {
data = getSafeParam(data);
//判断最后一位是不是逗号
if(data.lastIndexOf(",") != (data.length()-1)){
data += ",";
}
String[] dataArray = data.substring(0, data.length()-1).split(",");
data = "";
for (int i = 0 ; i < dataArray.length ;i++) {
if(i == dataArray.length -1){
data += "'" + dataArray[i] + "'";
}else{
data += "'" + dataArray[i] + "',";
}
}
result.append(" or model."+columnName+" in ( "+ data+ " )");
}
}
/**
* in String
* @param data
* @param columnName
* @param result
*/
public static void getNotInPackString(String data,String columnName, StringBuffer result){
if (data != null && data.trim().length()>0) {
data = getSafeParam(data);

@ -0,0 +1,45 @@
package cn.estsh.i3plus.pojo.form.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 lombok.EqualsAndHashCode;
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 : 2019-02-27 10:53
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="bf_data_object")
@Api(value="数据对象表",description = "用来存储动态对象的相关属性")
public class BfDataObject extends BaseBean {
@Column(name="NAME")
@ApiParam(value ="中文名称")
private String objectName;
@Column(name="TABLE_NAME")
@ApiParam(value ="表名")
private String tableName;
@Column(name="is_view")
@ApiParam(value ="是否视图",access = "判断是否是视图,如果不是视图,则是表名")
//EnunmUtil.TRUE_OR_FALSE
private int isView;
}

@ -0,0 +1,53 @@
package cn.estsh.i3plus.pojo.form.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 lombok.EqualsAndHashCode;
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 : 2019-02-27 10:53
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="bf_data_object_property")
@Api(value="数据对象属性表",description = "数据对象的属性明细表")
public class BfDataObjectProperty extends BaseBean {
@Column(name="DATA_OBJECT_ID")
@ApiParam(value ="数据对象ID" , example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
//外键关联数据对象主键
private Long dataObjectId;
@Column(name="PROP_NAME")
@ApiParam(value ="属性中文名称")
private String propName;
@Column(name="PROP_OBJECT_NAME")
@ApiParam(value ="对象中的属性名")
//在动态对象中的属性名
private String propObjectName;
@Column(name="PROP_COLUMN_NAME")
@ApiParam(value ="属性字段名")
//属性在数据库中的字段名
private String propColumnName;
}

@ -0,0 +1,43 @@
package cn.estsh.i3plus.pojo.form.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
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 : 2019-02-27 10:53
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="bf_data_object")
@Api(value="数据对象表",description = "用来存储动态对象的相关属性")
public class BfDataObjectRefer extends BaseBean {
@Column(name="NAME")
@ApiParam(value ="中文名称")
private String objectName;
@Column(name="TABLE_NAME")
@ApiParam(value ="表名")
private String tableName;
@Column(name="is_view")
@ApiParam(value ="是否视图",access = "判断是否是视图,如果不是视图,则是表名")
//EnunmUtil.TRUE_OR_FALSE
private int isView;
}

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.platform.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
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 : yunhao
* @CreateDate : 2019-03-12 14:45
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_BARCODE_RULE")
@Api(value="条码规则",description = "条码规则")
public class SysBarcodeRule extends BaseBean {
@Column(name = "NAME")
@ApiParam(value = "规则名称")
private String name;
@Column(name = "BARCODE_RULE_CODE")
@ApiParam(value = "规则代码")
private String barcodeRuleCode;
@Column(name = "BARCODE_RULE")
@ApiParam(value = "条码规则")
private String barcodeRule;
@Column(name = "BARCODE_SEPARATOR")
@ApiParam(value = "条码分隔符")
private String barcodeSeparator;
@Column(name="BARCODE_RULE_DESCRIPTION")
@ApiParam(value ="条码规则描述")
private String barcodeRuleDescription;
}

@ -41,7 +41,7 @@ public class SysOrderNoRule extends BaseBean {
@ApiParam(value = "规则代码")
private String orderNoRuleCode;
@Column(name = "numberRule")
@Column(name = "ORDER_NO_RULE")
@ApiParam(value = "单号规则")
private String orderNoRule;

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.platform.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.platform.bean.SysBarcodeRule;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2019-03-12 16:02
* @Modify:
**/
public interface SysBarcodeRuleRepository extends BaseRepository<SysBarcodeRule, Long> {
}

@ -636,4 +636,34 @@ public class CoreHqlPack {
return result.toString();
}
/**
*
* @param sysBarcodeRule
* @return
*/
public static String packHqlSysBarcodeRuleCode(SysBarcodeRule sysBarcodeRule){
StringBuffer result = new StringBuffer();
// and
HqlPack.getStringEqualPack(sysBarcodeRule.getBarcodeRuleCode(),"barcodeRuleCode",result);
// not
HqlPack.getNumNOEqualPack(sysBarcodeRule.getId(),"id",result);
return result.toString();
}
/**
*
* @param sysBarcodeRule
* @return
*/
public static String packHqlSysBarcodeRule(SysBarcodeRule sysBarcodeRule){
StringBuffer result = new StringBuffer();
HqlPack.getStringLikerPack(sysBarcodeRule.getName(),"name",result);
HqlPack.getStringLikerPack(sysBarcodeRule.getBarcodeRuleCode(),"barcodeRuleCode",result);
return result.toString();
}
}

@ -165,4 +165,20 @@ public class ReportHqlPack {
return result.toString();
}
/**
*
* @param brElement
* @return
*/
public static String packHqlBrElementName(BrElement brElement){
StringBuffer result = new StringBuffer();
// and
HqlPack.getStringEqualPack(brElement.getElementName(),"elementName",result);
// not
HqlPack.getNumNOEqualPack(brElement.getId(),"id",result);
return result.toString();
}
}

@ -58,11 +58,11 @@ public class WmsASNMasterDetails extends BaseBean {
@Column(name = "ZDATE")
@ApiParam("计划交货日期")
public String zDate;
public String planDate;
@Column(name = "ZTIME")
@ApiParam("计划交货时间")
public String zTime;
public String planTime;
/**
* :N=,C=,R=

@ -43,4 +43,8 @@ public class WmsActionModule extends BaseBean {
@Column(name="AM_TYPE")
@ApiParam(value = "组件类型", example = "0")
public Integer amType;
@Column(name="OP_TYPE_CODE")
@ApiParam(value = "作业类型", example = "0")
public Integer opTypeCode;
}

@ -62,4 +62,7 @@ public class WmsCSOrderMaster extends BaseBean {
@ApiParam(value = "盘点明细集")
public List<WmsCSOrderDetails> wmsCSOrderDetailsList;
@Column(name = "IS_TASK")
@ApiParam(value = "是否生产任务", example = "1")
public Integer isTask;
}

@ -63,7 +63,7 @@ public class WmsCheckFactRecord extends BaseBean {
@Column(name="REMARK")
@ApiParam("备注")
public String reMark;
public String remark;
@Column(name="PLAN_QTY")
@ApiParam(value = "应收数量", example = "0")

@ -101,8 +101,4 @@ public class WmsDocMovementMaster extends BaseBean {
@Column(name = "PRIORITY")
@ApiParam(value = "优先级", example = "1")
public Integer priority;
@Transient
@ApiParam(value = "移库单明细集合")
private List<WmsDocMovementDetails> wmsDocMovementDetailsList;
}

@ -62,7 +62,7 @@ public class WmsMoveSn extends BaseBean {
@Column(name="REMARK")
@ApiParam("备注")
public String reMark;
public String remark;
@Column(name="LOT_NO")
@ApiParam("批次编号")
@ -132,6 +132,14 @@ public class WmsMoveSn extends BaseBean {
@ApiParam(value = "目的条码状态", example = "1")
public Integer destSnStatus;
@Column(name="DATE_CODE")
@ApiParam("生产日期")
public String dateCode;
@Column(name="FIX_LOT_NO")
@ApiParam("特殊批次")
public String fixLotNo;
public WmsMoveSn(){}
public WmsMoveSn(String partNo, Long finishedCounts ,Long waitingCounts){

@ -3,6 +3,8 @@ package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
@ -45,14 +47,6 @@ public class WmsOpType extends BaseBean {
@ApiParam(value = "序号", example = "0")
private Integer seq;
@Column(name = "TM_ID")
@ApiParam(value = "交易处理组件ID", example = "0")
private Integer tmId;
@Column(name = "DATA_SRC")
@ApiParam("数据来源")
private String dataSrc;
@Column(name = "ORDER_MIN")
@ApiParam(value = "单据处理下限", example = "0")
private Integer orderMin;
@ -103,7 +97,12 @@ public class WmsOpType extends BaseBean {
@ApiParam(value = "是否允许多人操作", example = "0")
private Integer isMuliti;
@Transient
@ApiParam(value = "单据集")
private List<Map<String, List>> orderList;
@Column(name = "TM_ID")
@ApiParam(value = "处理组件编号")
@JsonSerialize(using = ToStringSerializer.class)
private Long tmId;
@Column(name = "DATA_SRC")
@ApiParam("数据来源")
private String dataSrc;
}

@ -61,7 +61,7 @@ public class WmsQCDetails extends BaseBean {
@Column(name = "REMARK")
@ApiParam("备注")
public String reMark;
public String remark;
@Column(name = "FACT_QTY")

@ -50,7 +50,7 @@ public class WmsQCMaster extends BaseBean {
@Column(name = "REMARK")
@ApiParam("备注")
public String reMark;
public String remark;
@Column(name = "CUSTOMER_NO")
@ApiParam("客户编号")

@ -52,6 +52,10 @@ public class WmsStockQuan extends BaseBean {
@ApiParam("单位")
public String unit;
@Column(name = "CUST_NO")
@ApiParam(value = "客户编码")
private String custNo;
@Column(name = "QTY")
@ApiParam(value = "可用数量", example = "0")
public Double qty;

@ -46,7 +46,7 @@ public class WmsTaskInfo extends BaseBean {
@Column(name = "REMARK")
@ApiParam("备注")
public String reMark;
public String remark;
/**
* :1=,10=,20=
@ -57,7 +57,7 @@ public class WmsTaskInfo extends BaseBean {
@Column(name = "TRANS_TYPE_CODE")
@ApiParam("交易类型")
private String transTypeCode;
public String transTypeCode;
@Column(name = "PRE_USE_TIME")
@ApiParam(value = "预计作业时间(分钟)", example = "1")

@ -25,7 +25,7 @@ import javax.persistence.Table;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_TASK_SRC")
@Api("作业任务表")
@Api("作业任务数据来源表")
public class WmsTaskSrc extends BaseBean {
@Column(name = "OP_TYPE_CODE")
@ -51,6 +51,7 @@ public class WmsTaskSrc extends BaseBean {
@Column(name = "TRANS_CODE")
@ApiParam("默认交易类型")
public String transCode;
@Column(name = "IS_ONE_STEP")
@ApiParam("是否一步法")
public Integer isOneStep;

@ -45,11 +45,11 @@ public class WmsTransQuan extends BaseBean {
private String locateNo;
@Column(name = "PART_NO")
@ApiParam(value = "零件编号")
@ApiParam(value = "物料编码")
private String partNo;
@Column(name = "PART_NAME_RDD")
@ApiParam(value = "零件名称")
@ApiParam(value = "物料名称")
private String partNameRdd;
@Column(name = "UNIT")
@ -95,4 +95,8 @@ public class WmsTransQuan extends BaseBean {
@Column(name = "CUST_NO")
@ApiParam(value = "客户编号")
private String custNo;
@Column(name = "ERROR_MESSAGE")
@ApiParam(value = "错误信息")
private String errorMessage;
}

@ -12,6 +12,5 @@ import org.springframework.stereotype.Repository;
* @CreateDate : 2019-03-06 14:41
* @Modify:
**/
@Repository
public interface WmsTaskSrcRepository extends BaseRepository<WmsTaskSrc, Long> {
}

@ -2,14 +2,14 @@ package cn.estsh.i3plus.pojo.wms.sqlpack;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.DataAuthEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.base.tool.SqlPack;
import cn.estsh.i3plus.pojo.wms.bean.*;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Strings;
import org.apache.commons.lang3.StringUtils;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -58,8 +58,8 @@ public class WmsHqlPack {
HqlPack.getNumEqualPack(wmsPOMasterDetails.getItem(), "item", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getPartNo(), "partNo", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getPartNameRdd(), "partNameRdd", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getZTime(), "zTime", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getZDate(), "zDate", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getZTime(), "planTime", result);
HqlPack.getStringLikerPack(wmsPOMasterDetails.getZDate(), "planDate", result);
getStringBuilderPack(wmsPOMasterDetails, result);
@ -585,8 +585,8 @@ public class WmsHqlPack {
HqlPack.getNumEqualPack(wmsASNMasterDetails.getQty(), "qty", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getPoItem(), "poItem", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getUnit(), "unit", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getZDate(), "zDate", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getZTime(), "zTime", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getPlanDate(), "planDate", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getPlanTime(), "planTime", result);
HqlPack.getNumEqualPack(wmsASNMasterDetails.getItemStatus(), "itemStatus", result);
HqlPack.getStringEqualPack(wmsASNMasterDetails.getPackAge(), "packAge", result);
HqlPack.getNumEqualPack(wmsASNMasterDetails.getIsFree(), "isFree", result);
@ -645,7 +645,7 @@ public class WmsHqlPack {
HqlPack.getStringLikerPack(wmsTaskInfo.getMoveNo(), "moveNo", result);
HqlPack.getStringLikerPack(wmsTaskInfo.getUserNo(), "userNo", result);
HqlPack.getStringLikerPack(wmsTaskInfo.getOpTypeCode(), "opTypeCode", result);
HqlPack.getStringLikerPack(wmsTaskInfo.getReMark(), "reMark", result);
HqlPack.getStringLikerPack(wmsTaskInfo.getRemark(), "remark", result);
HqlPack.getNumEqualPack(wmsTaskInfo.getTaskStatus(), "taskStatus", result);
getStringBuilderPack(wmsTaskInfo, result);
@ -1338,14 +1338,13 @@ public class WmsHqlPack {
/**
* id
* @param roleIds
* @return
*/
public static String packHqlWmsDataAuth(List<String> roleIds) {
public static String packHqlWmsDataAuth(WmsDataAuth dataAuth, List<String> roleIds) {
StringBuffer result = new StringBuffer();
HqlPack.getStringEqualPack(dataAuth.getDataObj() ,"dataObj", result);
String data = String.join(",", roleIds);
// 参数数组 [1,2,3] -> "1,2,3"
HqlPack.getInPack(data,"roleCode",result);
HqlPack.getInPackString(data, "roleCode", result);
getStringBuilderPack(new WmsDataAuth(), result);
return result.toString();
}
@ -1358,25 +1357,30 @@ public class WmsHqlPack {
public static String packHqlWmsTaskDetail(Map<String ,List<WmsDataAuth>> groupDataAuth) {
StringBuffer result = new StringBuffer();
Set<Map.Entry<String, List<WmsDataAuth>>> entries = groupDataAuth.entrySet();
String warehouse = DataAuthEnumUtil.DATA_OBJ_TYPE.WAREHOUSE.getValue();
String locate = DataAuthEnumUtil.DATA_OBJ_TYPE.LOCATE.getValue();
String zone = DataAuthEnumUtil.DATA_OBJ_TYPE.ZONE.getValue();
//拼sql
entries.stream().filter(o->!Strings.isNullOrEmpty(o.getKey())).forEach(o->{
List<WmsDataAuth> value = o.getValue();
List<String> vList = value.stream().map(x -> x.getDataObjValue()).collect(Collectors.toList());
String data = String.join(",", vList);
if(warehouse.equals(o.getKey())){
// 参数数组 [1,2,3] -> "1,2,3"
HqlPack.getInPack(data,"destWhNo",result);
if (StringUtils.isNotBlank(data)) {
List<Map> mapList = JSONObject.parseArray(data, Map.class);
if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.WAREHOUSE.getValue() + "", o.getKey())) {
for (Map whNoItem : mapList) {
HqlPack.getInOrPackString(whNoItem.get("WH_CODE").toString(), "destWhNo", result);
}
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.LOCATE.getValue() + "", o.getKey())) {
for (Map locateNoItem : mapList) {
HqlPack.getInOrPackString(locateNoItem.get("LOCATE_NO").toString(), "destLocateNo", result);
}
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.ZONE.getValue() + "", o.getKey())) {
for (Map zoneNoItem : mapList) {
HqlPack.getInOrPackString(zoneNoItem.get("ZONE_CODE").toString(), "destZoneNo", result);
}
} else if (StringUtils.equalsIgnoreCase(WmsEnumUtil.DATA_OBJ_TYPE.MATERIAL.getValue() + "", o.getKey())) {
for (Map zoneNoItem : mapList) {
HqlPack.getInOrPackString(zoneNoItem.get("PART_NO").toString(), "partNo", result);
}
if(locate.equals(o.getKey())){
// 参数数组 [1,2,3] -> "1,2,3"
HqlPack.getInPack(data,"destLocateNo",result);
}
if(zone.equals(o.getKey())){
// 参数数组 [1,2,3] -> "1,2,3"
HqlPack.getInPack(data,"destZoneNo",result);
}
});
getStringBuilderPack(new WmsDataAuth(), result);
@ -1392,7 +1396,7 @@ public class WmsHqlPack {
public static String packHqlAndIn(BaseBean bean,String columnName,List<String> vals) {
StringBuffer result = new StringBuffer();
String data = String.join(",", vals);
HqlPack.getInPack(data,columnName,result);
HqlPack.getInPackString(data,columnName,result);
getStringBuilderPack(bean, result);
return result.toString();
}

Loading…
Cancel
Save