|
|
@@ -12,6 +12,7 @@ import com.ylx.common.exception.ServiceException;
|
|
|
import com.ylx.common.utils.poi.ExcelUtil;
|
|
|
import com.ylx.massage.domain.TOrder;
|
|
|
import com.ylx.massage.domain.TTxRecord;
|
|
|
+import com.ylx.massage.enums.TTxRecordEnum;
|
|
|
import com.ylx.massage.service.TTxRecordService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -126,6 +127,25 @@ public class TTxRecordController extends BaseController {
|
|
|
@PostMapping(value = "pc/export")
|
|
|
public void export(HttpServletResponse response, Page<TTxRecord> page, TTxRecord record) {
|
|
|
Page<TTxRecord> pageRecord = recordService.page(page, record, this.getDeptId());
|
|
|
+ pageRecord.getRecords().forEach(r -> {
|
|
|
+ if(r.getnStatus().compareTo(TTxRecordEnum.PASS_ING.getCode())==0){
|
|
|
+ r.setnStatusShow(TTxRecordEnum.PASS_ING.getInfo());
|
|
|
+ }
|
|
|
+ if(r.getnStatus().compareTo(TTxRecordEnum.PASS.getCode())==0){
|
|
|
+ r.setnStatusShow(TTxRecordEnum.PASS.getInfo());
|
|
|
+ }
|
|
|
+ if(r.getnStatus().compareTo(TTxRecordEnum.NO_PASS.getCode())==0){
|
|
|
+ r.setnStatusShow(TTxRecordEnum.NO_PASS.getInfo());
|
|
|
+ }
|
|
|
+
|
|
|
+ //提现到账金额
|
|
|
+ r.setrPrice(r.getdPrice().multiply(r.getPercent()).
|
|
|
+ setScale(2, RoundingMode.DOWN));
|
|
|
+ //提现代扣税额
|
|
|
+ r.setWPrice(r.getdPrice().subtract(r.getrPrice()).
|
|
|
+ setScale(2, RoundingMode.DOWN));
|
|
|
+ r.setPercentShow(r.getPercent().multiply(new BigDecimal("100")).setScale(2, RoundingMode.DOWN).toPlainString()+"%");
|
|
|
+ });
|
|
|
ExcelUtil<TTxRecord> util = new ExcelUtil<>(TTxRecord.class);
|
|
|
util.exportExcel(response, pageRecord.getRecords(), "提现信息");
|
|
|
}
|
|
|
@@ -154,6 +174,12 @@ public class TTxRecordController extends BaseController {
|
|
|
}
|
|
|
Page<TTxRecord> pageResult = recordService.page(page, txRecord, this.getDeptId());
|
|
|
pageResult.getRecords().forEach(r -> {
|
|
|
+ //提现到账金额
|
|
|
+ r.setrPrice(r.getdPrice().multiply(r.getPercent()).
|
|
|
+ setScale(2, RoundingMode.DOWN));
|
|
|
+ //提现代扣税额
|
|
|
+ r.setWPrice(r.getdPrice().subtract(r.getrPrice()).
|
|
|
+ setScale(2, RoundingMode.DOWN));
|
|
|
r.setPercentShow(r.getPercent().multiply(new BigDecimal("100")).setScale(2, RoundingMode.DOWN).toPlainString()+"%");
|
|
|
});
|
|
|
return R.ok(pageResult);
|