yun-zuoyi
gragon.xu 6 years ago
commit ded9b1c37f

@ -439,7 +439,7 @@ public class BlockReportEnumUtil {
}else if(type.equals(TEMPLATE_TYPE.ECHARTS_BAR)){ // 饼图 只需要名称 和值 }else if(type.equals(TEMPLATE_TYPE.ECHARTS_BAR)){ // 饼图 只需要名称 和值
return new String[]{"name","value"}; return new String[]{"name","value"};
}else if(type.equals(TEMPLATE_TYPE.ECHARTS_LINE)){ // 饼图 只需要名称 和值 }else if(type.equals(TEMPLATE_TYPE.ECHARTS_LINE)){ // 饼图 只需要名称 和值
return new String[]{"name","value","xAxis"}; return new String[]{"xAxis","name","value"};
}else if(type.equals(TEMPLATE_TYPE.ECHARTS_TREEMAP)){ // 饼图 只需要名称 和值 }else if(type.equals(TEMPLATE_TYPE.ECHARTS_TREEMAP)){ // 饼图 只需要名称 和值
return new String[]{"name","value"}; return new String[]{"name","value"};
} }

@ -0,0 +1,45 @@
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;
}
}
}

@ -1048,8 +1048,6 @@ public class ImppEnumUtil {
} }
} }
//messageReceiverType
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MESSAGE_RECEIVER_TYPE { public enum MESSAGE_RECEIVER_TYPE {
INTERNAL(1, "内部人员接收"), INTERNAL(1, "内部人员接收"),

@ -300,6 +300,54 @@ public class WmsEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RC_ORDER_STATUS {
CREATE(10, "新建"),
RECEIPT(20, "收货中"),
RECEIPT_FINISH(30, "收货完成"),
CLOSED(40, "已关闭"),
CANCELLED(50, "已取消");
private int value;
private String description;
RC_ORDER_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;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* PO * PO
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -597,14 +645,15 @@ public class WmsEnumUtil {
ALLOCATION(40, "ALLOCATION", "调拨"), ALLOCATION(40, "ALLOCATION", "调拨"),
SCATTERED_OUT(50, "SCATTERED_OUT", "零星出库"), SCATTERED_OUT(50, "SCATTERED_OUT", "零星出库"),
SCATTERED_IN(60, "SCATTERED_IN", "零星入库"), SCATTERED_IN(60, "SCATTERED_IN", "零星入库"),
NC_WAREHOSING(70, "NC_WAREHOSING", "NC入库"), NC_WAREHOSING_IN(70, "NC_WAREHOSING", "NC入库"),
SUPPLIER_RETURN(80, "SUPPLIER_RETURN", "供应商退货"), SUPPLIER_RETURN(80, "SUPPLIER_RETURN", "供应商退货"),
CUSTOMER_RETURN(90, "CUSTOMER_RETURN", "客户退货"), CUSTOMER_RETURN(90, "CUSTOMER_RETURN", "客户退货"),
PRODUCT_RETURN(100, "PRODUCT_RETURN", "生产退料"), PRODUCT_RETURN(100, "PRODUCT_RETURN", "生产退料"),
INSTRUCTION_MOVE(110, "INSTRUCTION_MOVE", "指令移库"), INSTRUCTION_MOVE(110, "INSTRUCTION_MOVE", "指令移库"),
SCRAPPING_OUT(120, "SCRAPPING_OUT", "报废出库"), SCRAPPING_OUT(120, "SCRAPPING_OUT", "报废出库"),
RECEIVING_IN(130, "RECEIVING_IN", "收货入库"), RECEIVING_IN(130, "RECEIVING_IN", "收货入库"),
OUTSOURCING_BACK(140, "OUTSOURCING_BACK", "委外退回"); OUTSOURCING_BACK(140, "OUTSOURCING_BACK", "委外退回"),
NC_WAREHOSING_OUT(150, "NC_WAREHOSING_OUT", "NC出库");
private int value; private int value;
private String code; private String code;

@ -23,4 +23,10 @@ public class TransSnModle extends BaseComponetsParam{
@ApiParam(value = "是否分组") @ApiParam(value = "是否分组")
public int isGroup; public int isGroup;
@ApiParam(value = "物料")
public String partNo;
@ApiParam(value = "分组编号")
public String packageNo;
} }

@ -89,6 +89,11 @@ public class BrPojoAttr extends BaseBean {
@ApiParam(value ="聚合类型",example = "-1") @ApiParam(value ="聚合类型",example = "-1")
private Integer aggregationType; private Integer aggregationType;
@Column(name="AGGREGATION_ID")
@ApiParam(value ="聚合类型",example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
private Long aggregationId;
@Column(name="ATTR_SORT") @Column(name="ATTR_SORT")
@ApiParam(value ="字段排序") @ApiParam(value ="字段排序")
private Integer attrSort; private Integer attrSort;

@ -78,10 +78,10 @@ public class ReportHqlPack {
// 查询参数封装 // 查询参数封装
HqlPack.getNumEqualPack(template.getTemplateType(),"templateType",result); HqlPack.getNumEqualPack(template.getTemplateType(),"templateType",result);
if(template.getTemplateStatus() != null && if(template.getTemplateStatus() != null &&
template.getTemplateStatus().intValue() == BlockReportEnumUtil.TEMPLATE_STATUS.SAVE_TEMPLATE_FULFIL.getValue()){ template.getTemplateStatus().intValue() == BlockReportEnumUtil.TEMPLATE_STATUS.SAVE_TEMPLATE_ATTR_CONFIRM.getValue()){
HqlPack.getNumEqualPack(template.getTemplateStatus(),"templateStatus",result); HqlPack.getNumEqualPack(template.getTemplateStatus(),"templateStatus",result);
}else { }else {
HqlPack.getNumSmallerPack(BlockReportEnumUtil.TEMPLATE_STATUS.SAVE_TEMPLATE_FULFIL.getValue(),"templateStatus",result); HqlPack.getNumSmallerPack(BlockReportEnumUtil.TEMPLATE_STATUS.SAVE_TEMPLATE_ATTR_CONFIRM.getValue(),"templateStatus",result);
} }
HqlPack.getStringLikerPack(template.getName(),"name",result); HqlPack.getStringLikerPack(template.getName(),"name",result);

@ -51,7 +51,7 @@ public class WmsStockSn extends BaseBean {
private String partNameRdd; private String partNameRdd;
@Column(name = "LOT_NO") @Column(name = "LOT_NO")
@ApiParam("批次编码") @ApiParam("收货日期(批次编码")
public String lotNo; public String lotNo;
@Column(name = "DATE_CODE") @Column(name = "DATE_CODE")
@ -98,14 +98,13 @@ public class WmsStockSn extends BaseBean {
@ApiParam(value = "数量", example = "0") @ApiParam(value = "数量", example = "0")
private Double qty; private Double qty;
/** /**
* 1=,10=,20=,30=退 * :10=,20=,30=
*/ */
@Column(name = "QC_STATUS") @Column(name = "QC_STATUS")
@ApiParam(value = "质检状态", example = "0") @ApiParam(value = "质检状态", example = "0")
private Integer qcStatus; private Integer qcStatus;
/** /**
* :1=,10=,20=,30=,40=,50=, * 1=10=20=30=40=50=60=70=
* 60=,70=,80=,90=,100=
*/ */
@Column(name = "SN_STATUS") @Column(name = "SN_STATUS")
@ApiParam(value = "条码状态", example = "0") @ApiParam(value = "条码状态", example = "0")

@ -0,0 +1,19 @@
package cn.estsh.i3plus.pojo.wms.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WareHouse;
import cn.estsh.i3plus.pojo.wms.bean.WmsDataAuth;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Description : wms
* @Reference :
* @Author : jack.lv
* @CreateDate : 2019-03-08 14:47
* @Modify:
**/
@Repository
public interface WmsDataAuthRepository extends BaseRepository<WmsDataAuth, Long> {
}

@ -2,13 +2,18 @@ package cn.estsh.i3plus.pojo.wms.sqlpack;
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 cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.DataAuthEnumUtil;
import cn.estsh.i3plus.pojo.base.tool.HqlPack; import cn.estsh.i3plus.pojo.base.tool.HqlPack;
import cn.estsh.i3plus.pojo.base.tool.SqlPack; import cn.estsh.i3plus.pojo.base.tool.SqlPack;
import cn.estsh.i3plus.pojo.wms.bean.*; import cn.estsh.i3plus.pojo.wms.bean.*;
import com.google.common.base.Strings;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/** /**
* @Description : * @Description :
@ -1313,8 +1318,8 @@ public class WmsHqlPack {
public static String packHqlWmsStockSnLike(WmsStockSn wmsStockSn) { public static String packHqlWmsStockSnLike(WmsStockSn wmsStockSn) {
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();
HqlPack.getStringLikerPack(wmsStockSn.getSn(),"sn", result); HqlPack.getStringLikerPack(wmsStockSn.getSn(),"sn", result);
HqlPack.getOrderByPack(new Object[]{2}, new String[]{"createDatetime"}, result);
getStringBuilderPack(wmsStockSn, result); getStringBuilderPack(wmsStockSn, result);
HqlPack.getOrderByPack(new Object[]{2}, new String[]{"createDatetime"}, result);
return result.toString(); return result.toString();
} }
@ -1330,4 +1335,65 @@ public class WmsHqlPack {
getStringBuilderPack(wmsStockQuan, result); getStringBuilderPack(wmsStockQuan, result);
return result.toString(); return result.toString();
} }
/**
* id
* @param roleIds
* @return
*/
public static String packHqlWmsDataAuth(List<String> roleIds) {
StringBuffer result = new StringBuffer();
String data = String.join(",", roleIds);
// 参数数组 [1,2,3] -> "1,2,3"
HqlPack.getInPack(data,"roleCode",result);
getStringBuilderPack(new WmsDataAuth(), result);
return result.toString();
}
/**
* sql
* @param groupDataAuth
* @return
*/
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(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);
return result.toString();
}
/**
* in sql
* @param columnName
* @param vals
* @return
*/
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);
getStringBuilderPack(bean, result);
return result.toString();
}
} }

Loading…
Cancel
Save