lisai17@sina.com 2020-10-26 12:17:18 +08:00
parent 20ed652e0d
commit 8db40b5b69
2 changed files with 4 additions and 4 deletions

View File

@ -31,10 +31,6 @@ public class OrderInvalidVerifySyncService {
return Result.failed("只能对已收货的订单提出作废申请");
}
if (order.getInvoiceType() == 2) {
return Result.failed("专票作废只能由财务处理");
}
OrderInvalidVerify old = OrderInvalidVerify.dao.findFirst("select * from order_invalid_verify t \n" +
" where t.state = ? \n" +
" and t.order_sn = ? \n" +

View File

@ -121,6 +121,7 @@ public class OrderclusterSyncService extends BaseSyncService {
return Result.failed("未配置商品单价");
}
// 按客户查询未完成的订单量
List<Record> undonlist = OrderclusterService.me.undonlist(customer_id);
if (undonlist != null && !undonlist.isEmpty()) {
@ -129,13 +130,16 @@ public class OrderclusterSyncService extends BaseSyncService {
for(Record record : undonlist){
Date record_cutoff_time = record.getDate("cutoff_time");
// 判断日期不是已经存在
if(record_cutoff_time.getTime() == cutoff_time.getTime()){
return Result.failedstr("客户[%s][%s]在砂站[%s]还有未完成的配额", customerObj.getName(), DateTimeUtil.sdfymd.get().format(cutoff_time), SvrCacheData.SUP_CACHE.get(supermarket_id).getName());
}else{
// 累加总量
plan_total_weight = plan_total_weight.add(record.getBigDecimal("total_weight"));
}
}
// 按客户统计已完成量
BigDecimal overweight = OrderclusterService.me.getOverWeightByCustomer(customer_id); // 按客户找集团订单已完成量
if(plan_total_weight.subtract(overweight).multiply(unitprice).compareTo(prepayCustomer.getSurplus()) > 0 ){