|
@@ -1,5 +1,6 @@
|
|
|
package com.yijia.customer.controller;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import com.yijia.common.constant.HttpStatus;
|
|
|
import com.yijia.common.core.domain.entity.SysDept;
|
|
@@ -46,10 +47,7 @@ public class CustomerElectronicCardController extends BaseController
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(CustomerElectronicCard customerElectronicCard)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- SysDept dept =new SysDept();
|
|
|
- dept.setDeptId(currentUser.getUser().getDeptId());
|
|
|
- List<String> list = deptService.selectDeptId(dept);
|
|
|
+ List<String> list = deptService.levelShareCardList(customerElectronicCard.getLevelId());
|
|
|
if(list!=null && list.size()>0){
|
|
|
customerElectronicCard.setStationIdList(list);
|
|
|
customerElectronicCard.setStationId(null);
|
|
@@ -121,28 +119,27 @@ public class CustomerElectronicCardController extends BaseController
|
|
|
@GetMapping("/listSum")
|
|
|
public AjaxResult listSum(CustomerElectronicCard customerElectronicCard)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- SysDept sysDept = deptService.selectDeptById(currentUser.getUser().getDeptId());
|
|
|
- List<String> list = deptService.deptCardInfoList(sysDept);
|
|
|
+ List<String> list = deptService.levelShareCardList(customerElectronicCard.getLevelId());
|
|
|
if(list!=null && list.size()>0){
|
|
|
customerElectronicCard.setStationIdList(list);
|
|
|
customerElectronicCard.setStationId(null);
|
|
|
}
|
|
|
- return AjaxResult.success(customerElectronicCardService.listSum(customerElectronicCard));
|
|
|
+ CustomerElectronicCard card = customerElectronicCardService.listSum(customerElectronicCard);
|
|
|
+ return AjaxResult.success(card);
|
|
|
}
|
|
|
@GetMapping("/selectCard")
|
|
|
public TableDataInfo selectCard(CustomerElectronicCard customerElectronicCard)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- SysDept sysDept = deptService.selectDeptById(currentUser.getUser().getDeptId());
|
|
|
- List<String> list = deptService.deptCardInfoList(sysDept);
|
|
|
+ List<String> list = deptService.levelShareCardList(customerElectronicCard.getLevelId());
|
|
|
+ List<CustomerElectronicCard> querylist =new ArrayList<>();
|
|
|
+ List<CustomerElectronicCard> pagelist =new ArrayList<>();
|
|
|
if(list!=null && list.size()>0){
|
|
|
customerElectronicCard.setStationIdList(list);
|
|
|
customerElectronicCard.setStationId(null);
|
|
|
customerElectronicCard.setStrSql(StringUtils.join(list, ","));
|
|
|
+ querylist= customerElectronicCardService.selectCard(customerElectronicCard) ;
|
|
|
+ pagelist = customerElectronicCardService.selectCardPage(customerElectronicCard) ;
|
|
|
}
|
|
|
- List<CustomerElectronicCard> querylist= customerElectronicCardService.selectCard(customerElectronicCard) ;
|
|
|
- List<CustomerElectronicCard> pagelist = customerElectronicCardService.selectCardPage(customerElectronicCard) ;
|
|
|
TableDataInfo rspData = new TableDataInfo();
|
|
|
rspData.setCode(HttpStatus.SUCCESS);
|
|
|
rspData.setMsg("查询成功");
|
|
@@ -156,9 +153,7 @@ public class CustomerElectronicCardController extends BaseController
|
|
|
@GetMapping("/listHYData")
|
|
|
public AjaxResult listHYData(CustomerElectronicCard customerElectronicCard)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- SysDept sysDept = deptService.selectDeptById(currentUser.getUser().getDeptId());
|
|
|
- List<String> list = deptService.deptCardInfoList(sysDept);
|
|
|
+ List<String> list = deptService.levelDeptList(customerElectronicCard.getLevelId());
|
|
|
if(list!=null && list.size()>0){
|
|
|
customerElectronicCard.setStationIdList(list);
|
|
|
customerElectronicCard.setStationId(null);
|
|
@@ -172,9 +167,7 @@ public class CustomerElectronicCardController extends BaseController
|
|
|
@GetMapping("/listJRHYData")
|
|
|
public AjaxResult listJRHYData(CustomerElectronicCard customerElectronicCard)
|
|
|
{
|
|
|
- LoginUser currentUser = SecurityUtils.getLoginUser();
|
|
|
- SysDept sysDept = deptService.selectDeptById(currentUser.getUser().getDeptId());
|
|
|
- List<String> list = deptService.deptCardInfoList(sysDept);
|
|
|
+ List<String> list = deptService.levelDeptList(customerElectronicCard.getLevelId());
|
|
|
if(list!=null && list.size()>0){
|
|
|
customerElectronicCard.setStationIdList(list);
|
|
|
customerElectronicCard.setStationId(null);
|