Commit d80e5d57 by wangchunyang

统计调试修改,长春相关查询做独立分割修改

parent bad6be36
......@@ -98,9 +98,9 @@ public class MurderManagementServiceImpl {
public void findKeyPersonListExport(KeyPerson keyPerson,HttpServletResponse response) throws IOException {
String changchunMark = DataScopeUtil.isChanChun(keyPerson.get_user()) ? "_changchun" : "";
User _user = keyPerson.get_user();
if (_user != null) {
if (_user != null && changchunMark.length()>0) {
Map<String, String> pos = DataScopeUtil.getPosition(_user);
keyPerson.setScopeAreaId(pos.get("grade"));
keyPerson.setScopeGrade(pos.get("grade"));
keyPerson.setScopeAreaId(pos.get("area_id"));
}
List<KeyPerson> keyPersonList = commonService.findList(nameSpace + "findKeyPersonListExport" + changchunMark, keyPerson);
......@@ -277,9 +277,9 @@ public class MurderManagementServiceImpl {
public List<KeyPerson> findKeyPersonStatisticsForType(KeyPerson keyPerson) {
String changchunMark = DataScopeUtil.isChanChun(keyPerson.get_user()) ? "_changchun" : "";
User _user = keyPerson.get_user();
if (_user != null) {
if (_user != null && changchunMark.length()>0) {
Map<String, String> pos = DataScopeUtil.getPosition(_user);
keyPerson.setScopeAreaId(pos.get("grade"));
keyPerson.setScopeGrade(pos.get("grade"));
keyPerson.setScopeAreaId(pos.get("area_id"));
}
return commonService.findList(nameSpace + "findKeyPersonStatisticsForType" + changchunMark, keyPerson);
......@@ -289,9 +289,9 @@ public class MurderManagementServiceImpl {
public KeyPerson keyPersonStatisticsForTypeAll(KeyPerson keyPerson) {
String changchunMark = DataScopeUtil.isChanChun(keyPerson.get_user()) ? "_changchun" : "";
User _user = keyPerson.get_user();
if (_user != null) {
if (_user != null && changchunMark.length()>0) {
Map<String, String> pos = DataScopeUtil.getPosition(_user);
keyPerson.setScopeAreaId(pos.get("grade"));
keyPerson.setScopeGrade(pos.get("grade"));
keyPerson.setScopeAreaId(pos.get("area_id"));
}
return commonService.getObject(nameSpace + "keyPersonStatisticsForTypeAll" + changchunMark, keyPerson);
......@@ -301,9 +301,9 @@ public class MurderManagementServiceImpl {
public List<KeyPerson> keyPersonStatisticsForChunk(KeyPerson keyPerson) {
String changchunMark = DataScopeUtil.isChanChun(keyPerson.get_user()) ? "_changchun" : "";
User _user = keyPerson.get_user();
if (_user != null) {
if (_user != null && changchunMark.length()>0) {
Map<String, String> pos = DataScopeUtil.getPosition(_user);
keyPerson.setScopeAreaId(pos.get("grade"));
keyPerson.setScopeGrade(pos.get("grade"));
keyPerson.setScopeAreaId(pos.get("area_id"));
}
if (keyPerson.get_user().getCompany_grade().equals("3")) {
......@@ -431,9 +431,9 @@ public class MurderManagementServiceImpl {
public Map<String, Object> keyPersonStatisticsForRiskLevel(KeyPerson keyPerson) {
String changchunMark = DataScopeUtil.isChanChun(keyPerson.get_user()) ? "_changchun" : "";
User _user = keyPerson.get_user();
if (_user != null) {
if (_user != null && changchunMark.length()>0) {
Map<String, String> pos = DataScopeUtil.getPosition(_user);
keyPerson.setScopeAreaId(pos.get("grade"));
keyPerson.setScopeGrade(pos.get("grade"));
keyPerson.setScopeAreaId(pos.get("area_id"));
}
List<KeyPerson> list = commonService.findList(nameSpace + "keyPersonStatisticsForRiskLevel" + changchunMark, keyPerson);
......
......@@ -3,7 +3,9 @@ package com.scpyun.platform.jilinsscgsdp.utils;
import cn.hutool.core.util.IdUtil;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.scpyun.base.core.exception.CustomException;
import com.scpyun.base.core.utils.UUIDUtil;
import com.scpyun.base.core.utils.validator.IdcardUtil;
import com.scpyun.base.db.service.CommonService;
import com.scpyun.platform.jilinsscgsdp.bean.entity.KeyPersonImp;
import org.apache.commons.lang3.StringUtils;
......@@ -492,7 +494,7 @@ public class FileDataListener extends AnalysisEventListener<KeyPersonImp> {
* 数据校验方法
*/
private boolean isValidProduct(KeyPersonImp person) {
//身份证号、姓名、电话、性别
//身份证号(及正确判断)、姓名、电话、性别
return person.getCardNo() != null &&
!person.getCardNo().trim().isEmpty() &&
person.getName() != null &&
......@@ -500,7 +502,8 @@ public class FileDataListener extends AnalysisEventListener<KeyPersonImp> {
person.getSex() != null &&
!person.getSex().trim().isEmpty() &&
person.getPhone() != null &&
!person.getPhone().trim().isEmpty();
!person.getPhone().trim().isEmpty() &&
!IdcardUtil.isValidCard(person.getCardNo()); //"证件号不正确"
}
/**
......
......@@ -13,16 +13,16 @@
and jkp.id is not null
and jkprs.is_history = '1'
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND jkp.city_id = #{scope_area_id}
</when>
<when test="scope_grade == '4'">
<when test="scope_grade == '4'.toString()">
AND jkp.area_id = #{scope_area_id}
</when>
<when test="scope_grade == '5'">
<when test="scope_grade == '5'.toString()">
AND jkp.street_id = #{scope_area_id}
</when>
<when test="scope_grade == '6'">
<when test="scope_grade == '6'.toString()">
AND jkp.community_id = #{scope_area_id}
</when>
</choose>
......@@ -40,21 +40,21 @@
and jkpm.id is not null
and jkprs.is_history = '1'
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND ((jkpm.city_id = #{scope_area_id} and jkpm.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{_user.company_id} AND key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '4'">
<when test="scope_grade == '4'.toString()">
AND ((jkpm.area_id = #{scope_area_id} and jkpm.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{_user.company_id} AND key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '5'">
<when test="scope_grade == '5'.toString()">
AND ((jkpm.street_id = #{scope_area_id} and jkpm.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{_user.company_id} AND key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '6'">
<when test="scope_grade == '6'.toString()">
AND ((jkpm.community_id = #{scope_area_id} and jkpm.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{_user.company_id} AND key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
</choose>
</where>
......@@ -71,16 +71,16 @@
and jkp.id is not null
and jkprs.is_history = '1'
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND jkp.city_id = #{scope_area_id}
</when>
<when test="scope_grade == '4'">
<when test="scope_grade == '4'.toString()">
AND jkp.area_id = #{scope_area_id}
</when>
<when test="scope_grade == '5'">
<when test="scope_grade == '5'.toString()">
AND jkp.street_id = #{scope_area_id}
</when>
<when test="scope_grade == '6'">
<when test="scope_grade == '6'.toString()">
AND jkp.community_id = #{scope_area_id}
</when>
</choose>
......@@ -146,7 +146,7 @@
<where>
and sys_type = '2'
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND ((city_id = #{scope_area_id} and city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jl_key_person.id))
</when>
......@@ -314,17 +314,21 @@
<where>
and jkp.id is not null
<choose>
<when test="scope_grade == '3'">
AND (jkp.city_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where city_id = #{_user.company_id} AND key_person_id=jkp.id))
<when test="scope_grade == '3'.toString()">
AND ((jkp.city_id = #{scope_area_id} and jkp.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '4'">
AND (jkp.area_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where area_id = #{_user.company_id} AND key_person_id=jkp.id))
<when test="scope_grade == '4'.toString()">
AND ((jkp.area_id = #{scope_area_id} and jkp.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '5'">
AND (jkp.street_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where street_id = #{_user.company_id} AND key_person_id=jkp.id))
<when test="scope_grade == '5'.toString()">
AND ((jkp.street_id = #{scope_area_id} and jkp.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '6'">
AND (jkp.community_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where community_id = #{_user.company_id} AND key_person_id=jkp.id))
<when test="scope_grade == '6'.toString()">
AND ((jkp.community_id = #{scope_area_id} and jkp.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
</choose>
</where>
......@@ -342,17 +346,21 @@
<where>
and jkpm.id is not null
<choose>
<when test="scope_grade == '3'">
AND (jkpm.city_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where city_id = #{_user.company_id} AND key_person_id=jkpm.id))
<when test="scope_grade == '3'.toString()">
AND ((jkpm.city_id = #{scope_area_id} and jkpm.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '4'">
AND (jkpm.area_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where area_id = #{_user.company_id} AND key_person_id=jkpm.id))
<when test="scope_grade == '4'.toString()">
AND ((jkpm.area_id = #{scope_area_id} and jkpm.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '5'">
AND (jkpm.street_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where street_id = #{_user.company_id} AND key_person_id=jkpm.id))
<when test="scope_grade == '5'.toString()">
AND ((jkpm.street_id = #{scope_area_id} and jkpm.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '6'">
AND (jkpm.community_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where community_id = #{_user.company_id} AND key_person_id=jkpm.id))
<when test="scope_grade == '6'.toString()">
AND ((jkpm.community_id = #{scope_area_id} and jkpm.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
</choose>
</where>
......@@ -370,16 +378,20 @@
and jkp.id is not null
<choose>
<when test="scope_grade == '3'">
AND (jkp.city_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where city_id = #{_user.company_id} AND key_person_id=jkp.id))
AND ((jkp.city_id = #{scope_area_id} and jkp.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{_user.company_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '4'">
AND (jkp.area_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where area_id = #{_user.company_id} AND key_person_id=jkp.id))
AND ((jkp.area_id = #{scope_area_id} and jkp.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{_user.company_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '5'">
AND (jkp.street_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where street_id = #{_user.company_id} AND key_person_id=jkp.id))
AND ((jkp.street_id = #{scope_area_id} and jkp.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{_user.company_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '6'">
AND (jkp.community_id = #{scope_area_id} OR exists(select id from jl_key_person_rating_dual_person where community_id = #{_user.company_id} AND key_person_id=jkp.id))
AND ((jkp.community_id = #{scope_area_id} and jkp.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{_user.company_id} AND key_person_id=jkp.id))
</when>
</choose>
</where>
......@@ -397,19 +409,19 @@
<where>
and jkp.id is not null
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND ((jkp.city_id = #{scope_area_id} and jkp.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '4'">
<when test="scope_grade == '4'.toString()">
AND ((jkp.area_id = #{scope_area_id} and jkp.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '5'">
<when test="scope_grade == '5'.toString()">
AND ((jkp.street_id = #{scope_area_id} and jkp.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '6'">
<when test="scope_grade == '6'.toString()">
AND ((jkp.community_id = #{scope_area_id} and jkp.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
......@@ -429,20 +441,20 @@
<where>
and jkpm.id is not null
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND ((jkpm.city_id = #{scope_area_id} and jkpm.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '4'">
AND (jkpm.area_id = #{scope_area_id} and jkpm.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
<when test="scope_grade == '4'.toString()">
AND ((jkpm.area_id = #{scope_area_id} and jkpm.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '5'">
AND (jkpm.street_id = #{scope_area_id} and jkpm.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
<when test="scope_grade == '5'.toString()">
AND ((jkpm.street_id = #{scope_area_id} and jkpm.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
<when test="scope_grade == '6'">
AND (jkpm.community_id = #{scope_area_id} and jkpm.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
<when test="scope_grade == '6'.toString()">
AND ((jkpm.community_id = #{scope_area_id} and jkpm.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkpm.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scope_area_id} AND key_person_id=jkpm.id))
</when>
</choose>
......@@ -461,19 +473,19 @@
<where>
and jkp.id is not null
<choose>
<when test="scope_grade == '3'">
<when test="scope_grade == '3'.toString()">
AND ((jkp.city_id = #{scope_area_id} and jkp.city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '4'">
<when test="scope_grade == '4'.toString()">
AND ((jkp.area_id = #{scope_area_id} and jkp.area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '5'">
<when test="scope_grade == '5'.toString()">
AND ((jkp.street_id = #{scope_area_id} and jkp.street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
<when test="scope_grade == '6'">
<when test="scope_grade == '6'.toString()">
AND ((jkp.community_id = #{scope_area_id} and jkp.community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scope_area_id} AND key_person_id=jkp.id))
</when>
......
......@@ -428,6 +428,7 @@
<if test="params.distCard != null and params.distCard !=''">
AND card_no IN (SELECT card_no FROM jl_key_person
<where>
sys_type = #{params.sysType}
<if test="params._user.company_grade != '2'.toString()">
and (
create_user=#{params._user.id}
......@@ -2242,7 +2243,7 @@
jl_key_person
<where>
<if test="_user.company_grade == '3'.toString()">
AND ((city_id = #{scoptAreaId} and city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
AND ((city_id = #{scopeAreaId} and city_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scopeAreaId} AND key_person_id=jl_key_person.id))
</if>
<if test="_user.company_grade == '4'.toString()">
......@@ -2309,20 +2310,20 @@
select id from sys_user where company_id in (
select id from sys_office where ( parent_ids LIKE CONCAT('%', #{scopeAreaId}, '%') OR id = #{scopeAreaId} ) and del_flag='0'
) and del_flag='0'
) and area_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
) and area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scopeAreaId} AND key_person_id=jl_key_person.id))
</if>
<if test="_user.company_grade == '5'.toString()">
AND (jl_key_person.create_user in (
AND ((jl_key_person.create_user in (
select id from sys_user where company_id in (
select id from sys_office where ( parent_ids LIKE CONCAT('%', #{scopeAreaId}, '%') OR id = #{scopeAreaId} ) and del_flag='0'
) and del_flag='0'
) and street_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
) and street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scopeAreaId} AND key_person_id=jl_key_person.id))
</if>
<if test="_user.company_grade == '6'.toString()">
AND (((select company_id from sys_user where id = create_user) = #{scopeAreaId}
and community_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
and community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jl_key_person.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scopeAreaId} AND key_person_id=jl_key_person.id))
</if>
</where>
......@@ -2351,7 +2352,7 @@
select id from sys_office where ( parent_ids LIKE CONCAT('%', #{scopeAreaId}, '%') OR id = #{scopeAreaId} ) and del_flag='0'
) and del_flag='0'
)
and area_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
and area_id not in (select area_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where area_id = #{scopeAreaId} AND key_person_id=jkp.id))
</if>
<if test="_user.company_grade == '5'.toString()">
......@@ -2360,12 +2361,12 @@
select id from sys_office where ( parent_ids LIKE CONCAT('%', #{scopeAreaId}, '%') OR id = #{scopeAreaId} ) and del_flag='0'
) and del_flag='0'
)
and street_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
and street_id not in (select street_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where street_id = #{scopeAreaId} AND key_person_id=jkp.id))
</if>
<if test="_user.company_grade == '6'.toString()">
AND (((select company_id from sys_user where id = jkp.create_user) = #{scopeAreaId}
and community_id not in (select city_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
and community_id not in (select community_id from jl_key_person_rating_dual_person where key_person_id=jkp.id))
OR exists(select id from jl_key_person_rating_dual_person where community_id = #{scopeAreaId} AND key_person_id=jkp.id))
</if>
</where>
......@@ -2382,7 +2383,7 @@
left join sys_office on sys_office.id = sys_user.company_id
left join sys_area on sys_office.area_id = sys_area.id
left join uc_gov_region_info on uc_gov_region_info.region_code = sys_area.id
where (sysscopeAreaId in (SELECT area_id FROM sys_office where find_in_set(#{scopeAreaId},parent_ids))
where (sys_user.company_id in (SELECT area_id FROM sys_office where find_in_set(#{scopeAreaId},parent_ids))
OR exists(select id from jl_key_person_rating_dual_person where city_id = #{scopeAreaId} AND key_person_id=jl_key_person.id))
<if test="sysType != null and sysType != ''">
and jl_key_person.sys_type = #{sysType}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论