|
|
|
@@ -98,35 +98,41 @@ public class NeuPosAdminController extends BaseController { |
|
|
|
return new ResultData(maplist); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("集团类型流水总数") |
|
|
|
@GetMapping("payTypeOrderSum") |
|
|
|
@GetMapping("exportPayTypeOrderlist") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), |
|
|
|
@ApiImplicitParam(name = "tenantId", value = "租户号", dataType = "String", paramType = "query", required = true)}) |
|
|
|
public ResultData payTypeOrderSum(@ModelAttribute NeuPosOrderMasterExt example,String tenantId) { |
|
|
|
public void exportPayTypeOrderSum(@ModelAttribute NeuPosOrderMasterExt example,String tenantId, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
if (!tenantValid(tenantId)) { |
|
|
|
return new ResultData(Result.ERROR,"未安装POS系统"); |
|
|
|
return; |
|
|
|
} |
|
|
|
setDate(example); |
|
|
|
example.setOrgId(24); |
|
|
|
List<Map> maplist = neuPosOrderService.queryShopPayOrderSum(example); |
|
|
|
return new ResultData(maplist); |
|
|
|
PageInfo<Map> maplist = neuPosOrderService.queryShopPayOrderList(example,1,10000); |
|
|
|
if (null != maplist && null != maplist.getList()) { |
|
|
|
neuPosOrderService.exportData(maplist.getList(),new String[] {"支付方式","消费金额","折扣金额","消费笔数","退款金额","退款笔数","实收金额"}, |
|
|
|
new String[] {"payTypeName","payAmount","discountAmount","payCount","refundAmount","refundCount","amount"},"pos交易汇总",new NeuPosSumDataBVo(), request, response); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("exportPayTypeOrderSum") |
|
|
|
|
|
|
|
@ApiOperation("集团类型流水总数") |
|
|
|
@GetMapping("payTypeOrderSum") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "tenantId", value = "租户号", dataType = "String", paramType = "query", required = true)}) |
|
|
|
public void exportPayTypeOrderSum(@ModelAttribute NeuPosOrderMasterExt example,String tenantId, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
public ResultData payTypeOrderSum(@ModelAttribute NeuPosOrderMasterExt example,String tenantId) { |
|
|
|
if (!tenantValid(tenantId)) { |
|
|
|
return; |
|
|
|
return new ResultData(Result.ERROR,"未安装POS系统"); |
|
|
|
} |
|
|
|
setDate(example); |
|
|
|
example.setOrgId(24); |
|
|
|
List<Map> maplist = neuPosOrderService.queryShopPayOrderSum(example); |
|
|
|
if (null != maplist) { |
|
|
|
neuPosOrderService.exportData(maplist,"pos交易汇总",new NeuPosSumDataBVo(), request, response); |
|
|
|
} |
|
|
|
return new ResultData(maplist); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("流水记录") |
|
|
|
@GetMapping("orderlist") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@@ -157,10 +163,10 @@ public class NeuPosAdminController extends BaseController { |
|
|
|
PageInfo<Map> maplist = neuPosOrderService.queryOrderList(example,1,60000); |
|
|
|
|
|
|
|
List<Map> payTypeMap = neuPosOrderService.selectPayTypeList(); |
|
|
|
Map<Integer,String> typeMap = new HashMap<Integer,String>(); |
|
|
|
Map<String,String> typeMap = new HashMap<String,String>(); |
|
|
|
for (Map payt:payTypeMap) { |
|
|
|
String payttye = (String)payt.get("pay_type"); |
|
|
|
typeMap.put(Integer.parseInt(payttye), (String)payt.get("name")); |
|
|
|
typeMap.put(payttye, (String)payt.get("name")); |
|
|
|
} |
|
|
|
if (null != maplist && null != maplist.getList()) { |
|
|
|
maplist.getList().parallelStream().forEach(c -> { |
|
|
|
@@ -168,7 +174,8 @@ public class NeuPosAdminController extends BaseController { |
|
|
|
c.put("payTypeName",typeMap.get(c.get("payType"))); |
|
|
|
} |
|
|
|
}); |
|
|
|
neuPosOrderService.exportData(maplist.getList(),"pos交易明细",new NeuPosOrderDataBVo(), request, response); |
|
|
|
neuPosOrderService.exportData(maplist.getList(),new String[] {"交易单号","POSsn","账单金额","折扣","支付方式","交易时间"}, |
|
|
|
new String[] {"orderNumber","serialNo","orderAmount","discountAmount","payTypeName","paidTime"},"pos交易明细",new NeuPosOrderDataBVo(), request, response); |
|
|
|
} |
|
|
|
} |
|
|
|
} |