mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-07 03:20:06 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -3,16 +3,14 @@ package com.jsowell.web.controller.pile;
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.dto.CreateMerchantDTO;
|
||||
import com.jsowell.pile.dto.PageDTO;
|
||||
import com.jsowell.pile.dto.QueryMerchantInfoDTO;
|
||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@@ -131,16 +129,10 @@ public class PileMerchantInfoController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:merchant:query')")
|
||||
@PostMapping("/getFinancialMerchantList")
|
||||
public TableDataInfo getFinancialMerchantList(@RequestBody PageDTO dto) {
|
||||
public TableDataInfo getFinancialMerchantList(@RequestBody QueryMerchantInfoDTO dto) {
|
||||
int pageNum = dto.getPageNum() == 0 ? 1 : dto.getPageNum();
|
||||
int pageSize = dto.getPageSize() == 0 ? 10 : dto.getPageSize();
|
||||
// 权限过滤
|
||||
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||
if (authorizedMap == null) {
|
||||
// 为空表示没有权限,返回空数组
|
||||
return new TableDataInfo();
|
||||
}
|
||||
PageUtils.startPage(pageNum, pageSize);
|
||||
return getDataTable(pileMerchantInfoService.queryInfoListByIds(authorizedMap));
|
||||
return getDataTable(pileMerchantInfoService.queryMerchantInfoListByAuth(dto));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.jsowell.pile.dto;
|
||||
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询运营商信息DTO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/9/16 11:05
|
||||
*/
|
||||
@Data
|
||||
public class QueryMerchantInfoDTO {
|
||||
private Integer pageSize;
|
||||
|
||||
private Integer pageNum;
|
||||
|
||||
private String merchantId;
|
||||
|
||||
private String merchantName;
|
||||
|
||||
private List<String> deptIds;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.dto.QueryMerchantInfoDTO;
|
||||
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -103,4 +105,11 @@ public interface PileMerchantInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
List<String> getDeptIdsByAppId(@Param("appId") String appId);
|
||||
|
||||
/**
|
||||
* 后管财务中心页面运营商列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<MerchantSettleInfoVO> queryMerchantSettleInfoList(@Param("dto") QueryMerchantInfoDTO dto);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.jsowell.pile.service;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.dto.CreateMerchantDTO;
|
||||
import com.jsowell.pile.dto.QueryMerchantInfoDTO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -88,10 +90,10 @@ public interface IPileMerchantInfoService {
|
||||
|
||||
/**
|
||||
* 通过ids查询信息列表
|
||||
* @param authorizedMap
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap);
|
||||
List<MerchantSettleInfoVO> queryMerchantInfoListByAuth(QueryMerchantInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 查询一级运营商列表
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.entity.SysDept;
|
||||
import com.jsowell.common.core.domain.entity.SysUser;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
@@ -13,9 +14,11 @@ import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||
import com.jsowell.pile.dto.CreateMerchantDTO;
|
||||
import com.jsowell.pile.dto.QueryMerchantInfoDTO;
|
||||
import com.jsowell.pile.mapper.PileMerchantInfoMapper;
|
||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
|
||||
import com.jsowell.system.service.SysDeptService;
|
||||
import com.jsowell.system.service.SysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -25,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -319,19 +323,28 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
||||
|
||||
/**
|
||||
* 通过ids查询信息列表
|
||||
* @param authorizedMap
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap) {
|
||||
public List<MerchantSettleInfoVO> queryMerchantInfoListByAuth(QueryMerchantInfoDTO dto) {
|
||||
if (CollectionUtils.isEmpty(dto.getDeptIds())) {
|
||||
dto.setDeptIds(Lists.newArrayList());
|
||||
}
|
||||
// 权限过滤
|
||||
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||
if (authorizedMap == null) {
|
||||
// 为空表示没有权限,返回空数组
|
||||
return new ArrayList<>();
|
||||
}
|
||||
String parentId = authorizedMap.getParentId();
|
||||
List<String> deptIds = Lists.newArrayList();
|
||||
// 父级id为0代表 thinkgem/jskf 账号
|
||||
if (!StringUtils.equals("0", parentId)) {
|
||||
String deptId = authorizedMap.getDeptId();
|
||||
deptIds.add(deptId);
|
||||
dto.getDeptIds().add(deptId);
|
||||
}
|
||||
return pileMerchantInfoMapper.queryInfoListByIds(deptIds);
|
||||
// return pileMerchantInfoMapper.queryInfoListByIds(deptIds);
|
||||
return pileMerchantInfoMapper.queryMerchantSettleInfoList(dto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.jsowell.pile.vo.web;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 后管财务中心页面VO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/9/15 16:35
|
||||
*/
|
||||
@Data
|
||||
public class MerchantSettleInfoVO {
|
||||
private String merchantId;
|
||||
private String merchantName;
|
||||
private String address;
|
||||
private String status;
|
||||
private String adapayMemberId;
|
||||
private String settleAccountId;
|
||||
private String auditStatus;
|
||||
private String organizationCode;
|
||||
private String managerName;
|
||||
private String managerPhone;
|
||||
private String createTime;
|
||||
}
|
||||
@@ -368,4 +368,37 @@
|
||||
and app_id = #{appId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryMerchantSettleInfoList" resultType="com.jsowell.pile.vo.web.MerchantSettleInfoVO">
|
||||
SELECT
|
||||
t1.id as merchantId,
|
||||
t1.merchant_name AS merchantName,
|
||||
t1.address,
|
||||
t1.status,
|
||||
t2.adapay_member_id AS adapayMemberId,
|
||||
t2.settle_account_id AS settleAccountId,
|
||||
t2.`status` as auditStatus,
|
||||
t1.organization_code AS organizationCode,
|
||||
t1.manager_name AS managerName,
|
||||
t1.manager_phone AS managerPhone,
|
||||
t1.create_time AS createTime
|
||||
FROM
|
||||
pile_merchant_info t1
|
||||
left JOIN adapay_member_account t2 ON t1.id = t2.merchant_id
|
||||
AND t1.del_flag = '0'
|
||||
AND t2.del_flag = '0'
|
||||
where 1 = 1
|
||||
<if test="dto.deptIds != null and dto.deptIds.size() != 0">
|
||||
and t1.dept_id in
|
||||
<foreach collection="dto.deptIds" item="deptId" open="(" separator="," close=")">
|
||||
#{deptId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dto.merchantName != null and dto.merchantName != ''">
|
||||
and t1.merchant_name like #{dto.merchantName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="dto.merchantId != null and dto.merchantId != ''">
|
||||
and t1.id = #{dto.merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- <el-form
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
@@ -8,13 +8,15 @@
|
||||
label-width="110px"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item label="运营商名称" prop="merchantName">
|
||||
<el-input
|
||||
v-model="queryParams.merchantName"
|
||||
placeholder="请输入运营商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="运营商" prop="merchantId" label-width="120">
|
||||
<el-select v-model="queryParams.merchantId" filterable clearable placeholder="请选择运营商">
|
||||
<el-option
|
||||
v-for="item in merchantList"
|
||||
:key="item.merchantName"
|
||||
:label="item.merchantName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
@@ -28,8 +30,9 @@
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form> -->
|
||||
<el-table :data="merchantList" style="width: 100%" v-loading="loading">
|
||||
</el-form>
|
||||
|
||||
<el-table :data="merchantInfoList" style="width: 100%" v-loading="loading">
|
||||
<el-table-column prop="merchantName" label="运营商" align="center">
|
||||
<template slot-scope="scope">
|
||||
<router-link
|
||||
@@ -60,6 +63,25 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="adapayMemberId"
|
||||
label="汇付会员id"
|
||||
align="center"
|
||||
/>
|
||||
<!-- <el-table-column prop="auditStatus" label="汇付会员审核状态" align="center" width="130">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag-->
|
||||
<!-- :options="dict.type.account_audit_status"-->
|
||||
<!-- :value="scope.row.status"-->
|
||||
<!-- />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column
|
||||
prop="settleAccountId"
|
||||
label="汇付结算账户id"
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="managerName"
|
||||
label="联系人"
|
||||
@@ -108,19 +130,20 @@
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getMerchantList"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getFinancialMerchantList } from "@/api/pile/merchant";
|
||||
import {getFinancialMerchantList, getMerchantList} from "@/api/pile/merchant";
|
||||
|
||||
export default {
|
||||
dicts: ["merchant_status"],
|
||||
dicts: ["merchant_status", "account_audit_status"],
|
||||
data() {
|
||||
return {
|
||||
// 运营商列表
|
||||
merchantInfoList: [],
|
||||
merchantList: [],
|
||||
loading: true,
|
||||
showOrHideText: "显示更多查询条件",
|
||||
@@ -131,11 +154,14 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
merchantId: null,
|
||||
merchantName: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getMerchantList();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
showOrHide() {
|
||||
@@ -149,21 +175,27 @@ export default {
|
||||
this.buttonBoolean = !this.buttonBoolean;
|
||||
}
|
||||
},
|
||||
// 获取运营商列表
|
||||
getMerchantList() {
|
||||
// 获取列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getFinancialMerchantList(this.queryParams).then((response) => {
|
||||
this.merchantList = response.rows;
|
||||
// console.log("response", response);
|
||||
this.merchantInfoList = response.rows;
|
||||
console.log("response", response);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getMerchantList() {
|
||||
getMerchantList().then((response) => {
|
||||
this.merchantList = response.rows;
|
||||
console.log("merchantList", this.merchantList)
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
console.log("搜索的值", this.queryParams);
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getMerchantList();
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
@@ -174,9 +206,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep
|
||||
.el-descriptions--medium:not(.is-bordered)
|
||||
.el-descriptions-item__cell {
|
||||
::v-deep .el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user