[1211 天津麦格纳WMS-ASN到货看板 ]

yun-zuoyi
Aisiyu 5 years ago
parent 0216cf59c4
commit 2db034a7f8

@ -371,6 +371,8 @@ public interface BaseRepository <T, ID extends Serializable> extends JpaReposito
boolean isExitByProperty(String[] propertyNames, Object[] values);
boolean isExitByPropertyDemo(String[] propertyNames, Object[] values);
boolean isExitByHqlWhere(String hqlWhere,String[] propertyNames, Object[] values);
boolean isExitByHqlWhere(String hqlWhere);

@ -651,6 +651,34 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
}
public int findByPropertyCountDemo(String[] propertyNames, Object[] values) {
if(propertyNames.length != values.length){
throw new IllegalArgumentException("参数错误数量和值个数不匹配!propertyNames:" + propertyNames.length + ",values:" + values.length);
}
StringBuffer queryString = new StringBuffer();
queryString.append("select count(*) from " + persistentClass.getName() + " as model where 1=1 ");
for (int i = 0; i < propertyNames.length; i++) {
if(values[i] != null) {
queryString.append(" and model." + propertyNames[i] + "= :" + propertyNames[i]);
}
}
Query queryObject = entityManager.createQuery(queryString.toString(),Long.class);
for (int i = 0; i < propertyNames.length; i++) {
if(values[i] != null) {
queryObject.setParameter(propertyNames[i], values[i]);
}
}
try{
Long count = (Long) queryObject.getSingleResult();
return count == null ? 0 : count.intValue();
}catch(NoResultException e){
return 0;
}
}
@Override
public List<T> findByPropertyPage(String propertyName, Object value, String orderByStuff, Pager pager) {
if(pager != null){
@ -1439,6 +1467,11 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
}
@Override
public boolean isExitByPropertyDemo(String[] propertyNames, Object[] values) {
return findByPropertyCountDemo(propertyNames, values) > 0;
}
@Override
public boolean isExitByHqlWhere(String hqlWhere, String[] propertyNames, Object[] values) {
return findByHqlWhereCount(hqlWhere,propertyNames,values) > 0;
}

@ -112,6 +112,10 @@ public class WmsPOMaster extends BaseBean {
@ApiParam(value = "发货日期")
private String sendDate;
@Transient
@ApiParam(value = "实际到货时间")
private String arrDate;
@Column(name = "IS_SN")
@ApiParam(value = "是否生成条码", example = "1")
public Integer isSn;
@ -177,6 +181,14 @@ public class WmsPOMaster extends BaseBean {
private String partNo;
@Transient
@ApiParam("需求数量")
private Double qty;
@Transient
@ApiParam("实收数量")
private Double rcqty;
@Transient
private List<String> orderNoList;
@Column(name = "DOCK", columnDefinition = "varchar(50) default ''")
@ -211,6 +223,10 @@ public class WmsPOMaster extends BaseBean {
@ApiParam("容差")
private Integer delayHour;
@Transient
@ApiParam("当前状态")
private String nowStatus;
public WmsPOMaster() {

@ -110,6 +110,18 @@ public class WmsPOMasterDetails extends BaseBean {
@ApiParam("计划交货时间")
private String planTime;
@Transient
@ApiParam("当前状态")
private String nowStatus;
@Transient
@ApiParam(value = "实际到货日期")
private String arrDate;
@Transient
@ApiParam(value = "实际到货时间")
private String arrTime;
@Column(name = "ERP_AREA_NO")
@ApiParam("默认收货库存地")
private String erpAreaNo;
@ -154,6 +166,16 @@ public class WmsPOMasterDetails extends BaseBean {
private Boolean isSet = false;
@Transient
@ApiParam("道口,临时使用")
private String dock;
@Transient
@ApiParam("收货状态,临时使用")
private String receiveStatus;
@Transient
@ApiParam("供应商批次字段是否可编辑")
private Boolean isDateCodeEdit = true;
@ -287,4 +309,16 @@ public class WmsPOMasterDetails extends BaseBean {
this.rcQty = rcQty;
this.itemStatus = itemStatus;
}
public WmsPOMasterDetails(Integer poStatus,String dock,String orderNo,String vendorNo,String planDate,String planTime,Double qty,Double rcQty) {
this.orderNo = orderNo;
this.planDate=planDate;
this.planTime=planTime;
this.qty = qty;
this.rcQty = rcQty;
this.vendorNo=vendorNo;
this.dock=dock;
this.poStatus=poStatus;
}
}

@ -300,7 +300,10 @@ public class WmsHqlPack {
DdlPreparedPack.timeBuilder(wmsPOMaster.getCreateDateTimeStart(),
wmsPOMaster.getCreateDateTimeEnd(), "createDatetime", result, true);
}
if (StringUtils.isNotBlank(wmsPOMaster.getCreateDateTimeEnd())) {
DdlPreparedPack.timeBuilder(wmsPOMaster.getCreateDateTimeStart(),
wmsPOMaster.getCreateDateTimeEnd(), "createDatetime", result, true);
}
getStringBuilderPack(wmsPOMaster, result);
return result;

Loading…
Cancel
Save