|
|
@ -57,12 +57,12 @@ public class CustomServiceImpl implements CustomService {
|
|
|
|
if (report != null) {
|
|
|
|
if (report != null) {
|
|
|
|
throw new BadRequestException("report record exist");
|
|
|
|
throw new BadRequestException("report record exist");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CustomReport customReport = new CustomReport(UUID.randomUUID().toString(),addCustomVO.getOrder_id(), addCustomVO.getMch_custom_id(), addCustomVO.getMch_custom_name(),
|
|
|
|
CustomReport customReport = new CustomReport(UUID.randomUUID().toString(), addCustomVO.getOrder_id(), addCustomVO.getMch_custom_id(), addCustomVO.getMch_custom_name(),
|
|
|
|
addCustomVO.getCustom());
|
|
|
|
addCustomVO.getCustom());
|
|
|
|
customReport.addExtMchCustom(addCustomVO.getMch_ext_custom_id(), addCustomVO.getMch_ext_custom_name());
|
|
|
|
customReport.addExtMchCustom(addCustomVO.getMch_ext_custom_id(), addCustomVO.getMch_ext_custom_name());
|
|
|
|
if (!CollectionUtils.isEmpty(addCustomVO.getSubOrders())) {
|
|
|
|
if (!CollectionUtils.isEmpty(addCustomVO.getSubOrders())) {
|
|
|
|
addCustomVO.getSubOrders().forEach(p -> {
|
|
|
|
addCustomVO.getSubOrders().forEach(p -> {
|
|
|
|
customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("order_fee").subtract(p.getBigDecimal("transport_fee")));
|
|
|
|
customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("order_fee").subtract(p.getBigDecimal("transport_fee")), p.getString("sub_order_no"));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JSONObject result = customSupport.saveCustom(customReport);
|
|
|
|
JSONObject result = customSupport.saveCustom(customReport);
|
|
|
|