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