master
kira 6 years ago
parent f7325509e7
commit 7993e3f2c8

@ -14,8 +14,16 @@ public class AddCustomVO {
private String custom;
private String mch_custom_no;
private boolean has_sub;
private String mch_custom_name;
private List<JSONObject> subOrders;
public String getMch_custom_name() {
return mch_custom_name;
}
public void setMch_custom_name(String mch_custom_name) {
this.mch_custom_name = mch_custom_name;
}
public String getOrder_id() {
return order_id;

@ -12,7 +12,7 @@ public interface CustomService {
JSONObject findOneWithDetail(String report_id);
void add(String orderId, String mchCustomId, String custom, List<JSONObject> subOrders);
void add(String orderId, String mchCustomId, String custom, String mchCustomName, List<JSONObject> subOrders);
boolean check(int client_id, String channel);

@ -39,8 +39,8 @@ public class CustomServiceImpl implements CustomService {
}
@Override
public void add(String orderId, String mchCustomId, String custom, List<JSONObject> subOrders) {
CustomReport customReport = new CustomReport(orderId, mchCustomId, custom);
public void add(String orderId, String mchCustomId, String custom,String mchCustomName, List<JSONObject> subOrders) {
CustomReport customReport = new CustomReport(orderId, mchCustomId, mchCustomName,custom);
if (!CollectionUtils.isEmpty(subOrders)) {
subOrders.forEach(p -> {
customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("order_fee").subtract(p.getBigDecimal("transport_fee")));

@ -43,7 +43,7 @@ public class CustomController {
@RequestMapping(value = "",method = RequestMethod.POST)
@ResponseBody
public void add(@RequestBody AddCustomVO addCustomVO) {
customService.add(addCustomVO.getOrder_id(),addCustomVO.getMch_custom_no(),addCustomVO.getCustom(),addCustomVO.getSubOrders());
customService.add(addCustomVO.getOrder_id(),addCustomVO.getMch_custom_no(),addCustomVO.getCustom(),addCustomVO.getMch_custom_name(),addCustomVO.getSubOrders());
}
@RequestMapping(value = "/channelCustom",method = RequestMethod.GET)

@ -25,6 +25,13 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="mch_custom_name">Merchant Custom Record Name</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.mch_custom_name" id="mch_custom_name" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="has_sub">Split</label>
<div class="col-sm-6">

@ -7,21 +7,28 @@
<form class="form-horizontal" novalidate name="rate_form">
<div class="form-group">
<label class="control-label col-sm-4" for="custom">海关</label>
<label class="control-label col-sm-4" for="custom">Customs</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.custom" id="custom" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="mch_custom_no">备案号</label>
<label class="control-label col-sm-4" for="mch_custom_no">Customs No</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.mch_custom_no" id="mch_custom_no" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="has_sub">是否拆单</label>
<label class="control-label col-sm-4" for="mch_custom_name">Merchant Custom Record Name</label>
<div class="col-sm-6">
<input class="form-control" ng-model="custom.mch_custom_name" id="mch_custom_name" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="has_sub">Split</label>
<div class="col-sm-6">
<input ng-model="custom.has_sub" id="has_sub" type="checkbox">
</div>
@ -34,8 +41,8 @@
<table class="table table-striped">
<thead>
<tr>
<th>海关金额</th>
<th>运费金额</th>
<th>Order Amount</th>
<th>Transport Fee</th>
<!--<th>消费者名称</th>-->
<!--<th>消费者ID</th>-->
</tr>

Loading…
Cancel
Save