fix:
销售出库生成贷记单字段赋值
This commit is contained in:
parent
ef9064e874
commit
58a1161cb8
@ -19,10 +19,10 @@ public class DebCredNewUnAuditValidator extends AbstractValidator {
|
||||
@Override
|
||||
public void validate() {
|
||||
ExtendedDataEntity[] dataEntities = this.getDataEntities();
|
||||
for(ExtendedDataEntity dataEntitie : dataEntities){
|
||||
for (ExtendedDataEntity dataEntitie : dataEntities) {
|
||||
DynamicObject dataEntity = dataEntitie.getDataEntity();
|
||||
String billno = dataEntity.getString("billno");
|
||||
if (billno.length()>4){
|
||||
if (billno.length() > 4) {
|
||||
BigDecimal bigDecimal = BigDecimal.ZERO;
|
||||
String modifiedString = billno.substring(0, billno.length() - 4);
|
||||
String substringed = billno.substring(billno.length() - 4);
|
||||
@ -31,13 +31,13 @@ public class DebCredNewUnAuditValidator extends AbstractValidator {
|
||||
String dynamicObjectString = dynamicObject.getString("billno");
|
||||
String substring = dynamicObjectString.substring(dynamicObjectString.length() - 4);
|
||||
BigDecimal decimal = BigDecimal.valueOf(Double.parseDouble(substring));
|
||||
if (decimal.compareTo(bigDecimal)>0){
|
||||
if (decimal.compareTo(bigDecimal) > 0) {
|
||||
bigDecimal = decimal;
|
||||
}
|
||||
}
|
||||
BigDecimal decimal = BigDecimal.valueOf(Double.parseDouble(substringed));
|
||||
if (decimal.compareTo(bigDecimal)!=0){
|
||||
this.addMessage(dataEntitie,"当前单不是最大单号,请从最大单号开始删除!!!");
|
||||
if (bigDecimal.compareTo(BigDecimal.ZERO) != 0 && decimal.compareTo(bigDecimal) != 0) {
|
||||
this.addMessage(dataEntitie, "当前单不是最大单号,请从最大单号开始删除!!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +112,11 @@ public class DeliverNoticeNewAuditOp extends AbstractOperationServicePlugIn {
|
||||
QFilter qFilter1 = new QFilter("number", QCP.equals, "JDJLX-0002");
|
||||
DynamicObject Object = BusinessDataServiceHelper.loadSingle("yem_bd_debcredtype", "id,number,name", qFilter1.toArray());
|
||||
debCredNote.set("yem_credittype", Object);
|
||||
if (yem_es_salesorder!=null){
|
||||
debCredNote.set("yem_accessories", yem_es_salesorder.getString("yem_accessories"));
|
||||
debCredNote.set("yem_wholemachine", yem_es_salesorder.getString("yem_wholemachine"));
|
||||
debCredNote.set("yem_sale_type",yem_es_salesorder.getString("yem_sale_type"));//出口
|
||||
}
|
||||
String debCredNoteNumber = debCredNote.getDynamicObjectType().getName();
|
||||
OperationResult save = OperationServiceHelper.executeOperate("save", debCredNoteNumber, new DynamicObject[]{debCredNote}, OperateOption.create());
|
||||
if (save.isSuccess()) {
|
||||
|
Loading…
Reference in New Issue
Block a user