fix:
1.外销合同提交效验
This commit is contained in:
parent
2251109306
commit
a5bafa64d9
@ -250,11 +250,32 @@ public class SalesOrderSubmitValidator extends AbstractValidator {
|
|||||||
long groupcustomers = customer.getLong("yem_groupcustomers.id");
|
long groupcustomers = customer.getLong("yem_groupcustomers.id");
|
||||||
// 贷记单使用金额
|
// 贷记单使用金额
|
||||||
BigDecimal debcuseamt = dynamicObject.getBigDecimal("yem_debcuseamt");
|
BigDecimal debcuseamt = dynamicObject.getBigDecimal("yem_debcuseamt");
|
||||||
|
DynamicObject yemBdProducts = dataEntity.getDynamicObject("yem_bd_products");
|
||||||
|
Long along = 0L;
|
||||||
|
if (yemBdProducts!=null){
|
||||||
|
String number = yemBdProducts.getString("number");
|
||||||
|
if ("CC".equals(number)||"CCPJ".equals(number)){
|
||||||
|
DynamicObject loadSingle = BusinessDataServiceHelper.loadSingle("yem_bd_productsgroup", "id,number"
|
||||||
|
, new QFilter[]{new QFilter("number", QCP.equals, "CC")});
|
||||||
|
along = loadSingle.getLong("id");
|
||||||
|
}
|
||||||
|
if ("TLJ".equals(number)||"TLJPJ".equals(number)){
|
||||||
|
DynamicObject loadSingle = BusinessDataServiceHelper.loadSingle("yem_bd_productsgroup", "id,number"
|
||||||
|
, new QFilter[]{new QFilter("number", QCP.equals, "TLJ")});
|
||||||
|
along = loadSingle.getLong("id");
|
||||||
|
}
|
||||||
|
if ("ZZJ".equals(number)||"ZZJPJ".equals(number)){
|
||||||
|
DynamicObject loadSingle = BusinessDataServiceHelper.loadSingle("yem_bd_productsgroup", "id,number"
|
||||||
|
, new QFilter[]{new QFilter("number", QCP.equals, "ZZJ")});
|
||||||
|
along = loadSingle.getLong("id");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (debcuseamt.compareTo(BigDecimal.ZERO) == 0) continue;
|
if (debcuseamt.compareTo(BigDecimal.ZERO) == 0) continue;
|
||||||
QFilter qFilter = new QFilter("yem_spcapitalpool_a.yem_curr.id", QCP.equals, currId)
|
QFilter qFilter = new QFilter("yem_spcapitalpool_a.yem_curr.id", QCP.equals, currId)
|
||||||
.and("yem_spcapitalpool_a.yem_debcredtype", QCP.equals, debcred)
|
.and("yem_spcapitalpool_a.yem_debcredtype", QCP.equals, debcred)
|
||||||
.and("yem_spcapitalpool_a.yem_creditype.id", QCP.equals, debcredtype)
|
.and("yem_spcapitalpool_a.yem_creditype.id", QCP.equals, debcredtype)
|
||||||
.and("yem_customer.id", QCP.equals, groupcustomers);
|
.and("yem_customer.id", QCP.equals, groupcustomers)
|
||||||
|
.and("yem_bd_products.id",QCP.equals,along);
|
||||||
DynamicObject single = BusinessDataServiceHelper.loadSingle("yem_spcapitalpool", qFilter.toArray());
|
DynamicObject single = BusinessDataServiceHelper.loadSingle("yem_spcapitalpool", qFilter.toArray());
|
||||||
if (single == null) return;
|
if (single == null) return;
|
||||||
DynamicObjectCollection singleCollection = single.getDynamicObjectCollection("yem_spcapitalpool_a");
|
DynamicObjectCollection singleCollection = single.getDynamicObjectCollection("yem_spcapitalpool_a");
|
||||||
@ -346,6 +367,7 @@ public class SalesOrderSubmitValidator extends AbstractValidator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sb.append("测试");
|
||||||
if (sb.length() > 0) {
|
if (sb.length() > 0) {
|
||||||
sb.append("不允许提交!");
|
sb.append("不允许提交!");
|
||||||
this.addErrorMessage(dataEntitie, sb.toString());
|
this.addErrorMessage(dataEntitie, sb.toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user