至不允许小于等于从
从不能小于前一行的至
This commit is contained in:
parent
3b506f4cca
commit
281f5c5207
@ -6,19 +6,14 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.datamodel.IDataModel;
|
||||
import kd.bos.entity.datamodel.events.ChangeData;
|
||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
|
||||
import kd.bos.form.IFormView;
|
||||
import kd.bos.form.control.Control;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||
import kd.bos.ksql.util.StringUtil;
|
||||
import kd.bos.orm.query.QCP;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.sdk.plugin.Plugin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.EventObject;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 装箱核算运输费用
|
||||
@ -102,7 +97,50 @@ public class TransportCostsFormPlugIn extends AbstractBillPlugIn implements Befo
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "yem_from":
|
||||
yemFrom(e);
|
||||
break;
|
||||
case"yem_reach":
|
||||
yemReach(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 至不允许小于等于从
|
||||
* @param e
|
||||
*/
|
||||
private void yemReach(PropertyChangedArgs e) {
|
||||
ChangeData changeData = e.getChangeSet()[0];
|
||||
int rowIndex = changeData.getRowIndex();
|
||||
if (rowIndex - 1 < 0) {
|
||||
return;
|
||||
}
|
||||
int parentRowIndex = changeData.getParentRowIndex();
|
||||
BigDecimal newValue = (BigDecimal) changeData.getNewValue();
|
||||
DynamicObjectCollection yemBdLogistics = this.getModel().getEntryEntity("yem_bd_logistics");
|
||||
BigDecimal bigDecimal = yemBdLogistics.get(parentRowIndex).getDynamicObjectCollection("yem_subentryentity").get(rowIndex - 1).getBigDecimal("yem_from");
|
||||
if (bigDecimal.compareTo(newValue) >= 0) {
|
||||
this.getView().showMessage("!!!!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从不能小于前一行的至
|
||||
* @param e
|
||||
*/
|
||||
private void yemFrom(PropertyChangedArgs e) {
|
||||
ChangeData changeData = e.getChangeSet()[0];
|
||||
int rowIndex = changeData.getRowIndex();
|
||||
if (rowIndex - 1 < 0) {
|
||||
return;
|
||||
}
|
||||
int parentRowIndex = changeData.getParentRowIndex();
|
||||
BigDecimal newValue = (BigDecimal) changeData.getNewValue();
|
||||
DynamicObjectCollection yemBdLogistics = this.getModel().getEntryEntity("yem_bd_logistics");
|
||||
BigDecimal bigDecimal = yemBdLogistics.get(parentRowIndex).getDynamicObjectCollection("yem_subentryentity").get(rowIndex - 1).getBigDecimal("yem_reach");
|
||||
if (bigDecimal.compareTo(newValue) > 0) {
|
||||
this.getView().showMessage("!!!!");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user