Commit d80e5d57 by wangchunyang

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

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