Commit e92867f6 authored by 朱晨阳's avatar 朱晨阳

添加权限

parent 9688067c
...@@ -69,14 +69,13 @@ public interface JpStationMapper extends BaseMapper<JpStation> { ...@@ -69,14 +69,13 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq); List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq);
// @UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false) @UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false)
List<PowerStationStatistics> getRegionPage(String regionName); List<PowerStationStatistics> getRegionPage(String regionName);
PowerStationStatistics getRegionStatistics(String code); PowerStationStatistics getRegionStatistics(String code);
List<PowerStationStatistics> getDealerPage(String regionalCompaniesCode, String dealerName);
List<PowerStationStatistics> getDealerPage(String regionCompanyOrgCode, String dealerName);
} }
...@@ -38,7 +38,7 @@ public interface IJpStationService { ...@@ -38,7 +38,7 @@ public interface IJpStationService {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName); com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionCompanyOrgCode, String dealerName); com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName);
......
...@@ -645,19 +645,16 @@ ...@@ -645,19 +645,16 @@
<!-- 根据区域orgCode查询经销商--> <!-- 根据区域orgCode查询经销商-->
<select id="getDealerPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"> <select id="getDealerPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">
select hui.name as name, hui.amos_company_code as code SELECT hygf_unit_info.`name` name, hygf_unit_info.amos_company_code code, hygf_regional_companies.regional_companies_code FROM hygf_regional_companies LEFT JOIN hygf_unit_info
from hygf_regional_companies hrc ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
RIGHT JOIN hygf_unit_info hui AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
ON hrc.unit_info_id = hui.sequence_nbr <if test="regionalCompaniesCode!=null and regionalCompaniesCode!=''">
<where> and hygf_regional_companies.regional_companies_code = #{regionalCompaniesCode}
hui.blacklist=0 and hui.is_delete=0 </if>
<if test="regionCompanyOrgCode != null and regionCompanyOrgCode!=''"> <if test="dealerName != null and dealerName!=''">
and hrc.regional_companies_code = #{regionCompanyOrgCode} and hygf_unit_info.`name` like concat("%",#{dealerName},"%")
</if> </if>
<if test="dealerName != null and dealerName!=''"> and hygf_unit_info.amos_company_code is not null
and hui.name like concat("%",#{dealerName},"%")
</if>
</where>
</select> </select>
......
...@@ -825,7 +825,7 @@ public class JpStationController extends BaseController { ...@@ -825,7 +825,7 @@ public class JpStationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司统计数据", notes = "查询当前登录人权限区域公司统计数据") @ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司统计数据", notes = "查询当前登录人权限区域公司统计数据")
@GetMapping(value = "/getRegionStatistics") @GetMapping(value = "/getRegionStatistics")
// @UserLimits @UserLimits
public ResponseModel<Page<PowerStationStatistics>> getRegionStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, @RequestParam(required = false) String regionName) { public ResponseModel<Page<PowerStationStatistics>> getRegionStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, @RequestParam(required = false) String regionName) {
Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getRegionStatistics(current, size, regionName); Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getRegionStatistics(current, size, regionName);
...@@ -837,10 +837,10 @@ public class JpStationController extends BaseController { ...@@ -837,10 +837,10 @@ public class JpStationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询经销商统计数据", notes = "查询经销商统计数据") @ApiOperation(httpMethod = "GET", value = "查询经销商统计数据", notes = "查询经销商统计数据")
@GetMapping(value = "/getDealerStatistics") @GetMapping(value = "/getDealerStatistics")
// @UserLimits @UserLimits
public ResponseModel<Page<PowerStationStatistics>> getDealerStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, String regionCompanyOrgCode, @RequestParam(required = false) String dealerName) { public ResponseModel<Page<PowerStationStatistics>> getDealerStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, String regionalCompaniesCode, @RequestParam(required = false) String dealerName) {
Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getDealerStatistics(current, size, regionCompanyOrgCode, dealerName); Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getDealerStatistics(current, size, regionalCompaniesCode, dealerName);
return ResponseHelper.buildResponse(poserStatisticsData); return ResponseHelper.buildResponse(poserStatisticsData);
} }
......
...@@ -940,10 +940,10 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -940,10 +940,10 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
} }
@Override @Override
public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionCompanyOrgCode, String dealerName) { public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName) {
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
// 根据区域公司orgCode查询区域公司下所有的经销商 // 根据区域公司orgCode查询区域公司下所有的经销商
List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionCompanyOrgCode, dealerName); List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionalCompaniesCode, dealerName);
PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage); PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage);
Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>(); Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment