|
@@ -3,8 +3,10 @@ package com.yijia.station.controller;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.yijia.common.core.domain.entity.SysDept;
|
|
|
import com.yijia.common.core.domain.model.LoginUser;
|
|
|
import com.yijia.common.utils.SecurityUtils;
|
|
|
+import com.yijia.system.service.ISysDeptService;
|
|
|
import com.yijia.system.service.ISysUserService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -39,6 +41,9 @@ public class PayOrderController extends BaseController
|
|
|
private IPayOrderService payOrderService;
|
|
|
@Autowired
|
|
|
private ISysUserService sysUserService;
|
|
|
+ @Autowired
|
|
|
+ private ISysDeptService deptService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询订单支付列表
|
|
|
*/
|
|
@@ -46,11 +51,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
startPage();
|
|
|
payOrder.setStatus("1");
|
|
@@ -64,13 +70,15 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listInfo")
|
|
|
public TableDataInfo listInfo(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOrderType("1");
|
|
|
+ payOrder.setStatus("1");
|
|
|
List<PayOrder> list = payOrderService.selectPayOrderList(payOrder);
|
|
|
return getTable(list);
|
|
|
}
|
|
@@ -84,11 +92,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/selectDaySources")
|
|
|
public AjaxResult selectDaySources(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setOrderType("1");
|
|
@@ -105,11 +114,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/selectOilTypeSources")
|
|
|
public TableDataInfo selectOilTypeSources(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setOrderType("1");
|
|
@@ -126,11 +136,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/selectOverViewData")
|
|
|
public AjaxResult selectOverViewData(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setOrderType("1");
|
|
@@ -145,11 +156,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/selectDayReportDetail")
|
|
|
public TableDataInfo selectDayReportDetail(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
//默认当前登陆人的ID 5冯总油站
|
|
|
startPage();
|
|
@@ -168,11 +180,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/selectDayReport")
|
|
|
public TableDataInfo selectDayReport(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setOrderType("1");
|
|
@@ -188,11 +201,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/export")
|
|
|
public AjaxResult export(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setOrderType("1");
|
|
@@ -222,11 +236,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listQydata92")
|
|
|
public TableDataInfo listQydata92(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOilName("92#");
|
|
|
payOrder.setStatus("1");
|
|
@@ -243,11 +258,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listQydata95")
|
|
|
public TableDataInfo listQydata95(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOilName("95#");
|
|
|
payOrder.setStatus("1");
|
|
@@ -264,11 +280,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listQydata97")
|
|
|
public TableDataInfo listQydata97(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOilName("97#");
|
|
|
payOrder.setStatus("1");
|
|
@@ -286,11 +303,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listQydata20")
|
|
|
public TableDataInfo listQydata20(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOilName("-20#");
|
|
|
payOrder.setStatus("1");
|
|
@@ -307,11 +325,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listQydata0")
|
|
|
public TableDataInfo listQydata0(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOilName("0#");
|
|
|
payOrder.setStatus("1");
|
|
@@ -328,11 +347,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listQydata10")
|
|
|
public TableDataInfo listQydata10(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setOilName("-10#");
|
|
|
payOrder.setStatus("1");
|
|
@@ -349,11 +369,12 @@ public class PayOrderController extends BaseController
|
|
|
@GetMapping("/listXdata")
|
|
|
public TableDataInfo listXdata(PayOrder payOrder)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- String selectDeptid= sysUserService.getUserRoleDeptId(currentUser);
|
|
|
- if(selectDeptid !=null && selectDeptid!=""){
|
|
|
- List<String> list = Arrays.asList(selectDeptid.split(","));
|
|
|
+ if(payOrder!=null &&payOrder.getStationId()!=null){
|
|
|
+ SysDept dept =new SysDept();
|
|
|
+ dept.setDeptId(payOrder.getStationId());
|
|
|
+ List<String> list = deptService.selectDeptId(dept);
|
|
|
payOrder.setStationIdList(list);
|
|
|
+ payOrder.setStationId(null);
|
|
|
}
|
|
|
payOrder.setStatus("1");
|
|
|
payOrder.setOrderType("1");
|