Commit 7489d309 by yangyang

主题研判、点位校验优化(标准)

parent 993045ba
......@@ -13,6 +13,10 @@ import java.util.Map;
@Component
public interface ZtypMapper{
ZpajxxEntity getZpAsjBshxx(String asjbh);
String getZpAsjbzxx(String asjbh);
List<ZpajxxEntity> getZpajxx(ZpajxxModel model);
int getZpajxxTotal(ZpajxxModel model);
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.founder.publicapi.mapper.mysqlMapper.ZtypMapper">
<select id="getZpajxx" parameterType="com.founder.commonutils.model.newPublicEntity.ztypEntity.ZpajxxModel"
<select id="getZpAsjBshxx" parameterType="java.lang.String"
resultType="com.founder.commonutils.model.newPublicEntity.ztypEntity.ZpajxxEntity">
select a.asjbh asjbh,
a.ajmc ajmc,
(select name from sys_dictitem where groupid = 'CODE_AJXZ' and code = a.ZATZ_JYQK) zatzJyqk,
(select name from sys_dictitem where groupid = 'CODE_AJXLB' and code = b.AJXLB) ajxlb,
select
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '01' then h.ASJXGFWBZH_FWBZH end) mobile,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '04' then h.ASJXGFWBZH_FWBZH end) yhkh,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '13' then h.ASJXGFWBZH_FWBZH end) wx,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '16' then h.ASJXGFWBZH_FWBZH end) personid
from tb_st_asj a left join tb_st_asj_asjbz b on a.ASJBH = b.ASJBH left join tb_xw_asjxgfwbzh h on b.ASJBH =
h.ASJBH
where a.AJLBDM = '05000300' and a.ZATZ_JYQK != '0500030002%'
from tb_xw_asjxgfwbzh h
where h.asjbh = #{ asjbh,jdbcType= VARCHAR }
</select>
<select id="getZpAsjbzxx" parameterType="java.lang.String"
resultType="java.lang.String">
select
(select name from sys_dictitem where groupid = 'CODE_AJXLB' and code = b.AJXLB) ajxlb
from tb_st_asj_asjbz b
where b.asjbh = #{ asjbh,jdbcType= VARCHAR }
</select>
<select id="getZpajxx" parameterType="com.founder.commonutils.model.newPublicEntity.ztypEntity.ZpajxxModel"
resultType="com.founder.commonutils.model.newPublicEntity.ztypEntity.ZpajxxEntity">
select a.asjbh asjbh,
a.ajmc ajmc,
(select name from sys_dictitem where groupid = 'CODE_AJXZ' and code = a.ZATZ_JYQK) zatzJyqk
from tb_st_asj a
where a.AJLBDM = '05000300'
and a.ZATZ_JYQK not like '0500030002%'
and a.XXSC_PDBZ = 0
<if test="asjbh != null and asjbh != '' ">
and a.asjbh like concat('%', #{asjbh} ,'%')
</if>
<if test="ajmc != null and ajmc != '' ">
and a.ajmc like concat('%', #{ajmc} ,'%')
</if>
<if test="ajzlb != null and ajzlb != '' ">
and b.AJZLB = #{ajzlb}
</if>
<if test="ajxzlb != null and ajxzlb != '' ">
and b.AJXZLB = #{ajxzlb}
</if>
<if test="xalbdmbcms != null and xalbdmbcms != '' ">
and b.XALBDMBCMS = #{xalbdmbcms}
</if>
group by a.asjbh, a.ajmc, a.ZATZ_JYQK, b.AJXLB
limit #{page}, #{limit}
</select>
<select id="getZpajxxTotal" parameterType="com.founder.commonutils.model.newPublicEntity.ztypEntity.ZpajxxModel"
resultType="java.lang.Integer">
select count(*) from (
select a.asjbh asjbh,
a.ajmc ajmc,
(select name from sys_dictitem where groupid = 'CODE_AJXZ' and code = a.ZATZ_JYQK) zatzJyqk,
(select name from sys_dictitem where groupid = 'CODE_AJXLB' and code = b.AJXLB) ajxlb,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '01' then h.ASJXGFWBZH_FWBZH end) mobile,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '04' then h.ASJXGFWBZH_FWBZH end) yhkh,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '13' then h.ASJXGFWBZH_FWBZH end) wx,
group_concat(case ASJXGFWBZH_FWBZH_FWBZHLBDM when '16' then h.ASJXGFWBZH_FWBZH end) personid
from tb_st_asj a left join tb_st_asj_asjbz b on a.ASJBH = b.ASJBH left join tb_xw_asjxgfwbzh h on b.ASJBH =
h.ASJBH
where a.AJLBDM = '05000300' and a.ZATZ_JYQK != '0500030002%'
select count(*)
from tb_st_asj a
where a.AJLBDM = '05000300' and a.ZATZ_JYQK not like '0500030002%' and a.XXSC_PDBZ = 0
<if test="asjbh != null and asjbh != '' ">
and a.asjbh like concat('%', #{asjbh} ,'%')
</if>
<if test="ajmc != null and ajmc != '' ">
and a.ajmc like concat('%', #{ajmc} ,'%')
</if>
<if test="ajzlb != null and ajzlb != '' ">
and b.AJZLB = #{ajzlb}
</if>
<if test="ajxzlb != null and ajxzlb != '' ">
and b.AJXZLB = #{ajxzlb}
</if>
<if test="xalbdmbcms != null and xalbdmbcms != '' ">
and b.XALBDMBCMS = #{xalbdmbcms}
</if>
group by a.asjbh, a.ajmc, a.ZATZ_JYQK, b.AJXLB
) t
</select>
<select id="selectPageByFwbsh" resultType="com.founder.commonutils.model.newPublicEntity.ztypEntity.TbStZtypFwbsh">
select
......
......@@ -249,8 +249,10 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
public TbAsjJwdinfo getTbAsjJwdinfo(TbAsjJwdinfo tbAsjJwdinfo, SysUser user){
if(null!=user){
// 拿到当前登陆者本级以及下级单位
tbAsjJwdinfo.setUnitcodeList(dwList(user.getUnitcode()));
if(!"1".equals(sysDictitemMapper.getDwLevByDwdm(user.getUnitcode()))){// 省级用户不用取拿下级单位 查询所有
// 拿到当前登陆者本级以及下级单位
tbAsjJwdinfo.setUnitcodeList(dwList(user.getUnitcode()));
}
}
// 受理单位
......@@ -302,7 +304,6 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
// 拿到当前登陆者本级以及下级单位
String lev = sysDictitemMapper.getDwLevByDwdm(unitcode);
List<String> dwList = new ArrayList<>();
if(!"1".equals(lev)){// 省级用户不用取拿下级单位 查询所有
if (org.apache.commons.lang.StringUtils.isNotEmpty(lev)) {
Map<String, String> bdwLevCode = DwUtilCommon.getMapDwLevCode(unitcode, lev);
dwList = sysDictitemMapper.getAllXjdwByMap(bdwLevCode);
......@@ -316,7 +317,6 @@ public class TbStAsjServiceImpl extends ServiceImpl<TbStAsjMapper, TbStAsj> impl
dwList = new ArrayList<>(1);
dwList.add(unitcode);
}
}
return dwList;
}
......
......@@ -37,7 +37,40 @@ public class ZtypServiceImpl implements ZtypService {
@Override
public List<ZpajxxEntity> getZpajxx(ZpajxxModel model) {
return ztypMapper.getZpajxx(model);
// 取出分页的案件信息
List<ZpajxxEntity> getZpajxx = ztypMapper.getZpajxx(model);
getZpajxx.stream().forEach(p->{
String ajxlb = ztypMapper.getZpAsjbzxx(p.getAsjbh());
if(null!=ajxlb){
p.setAjxlb(ajxlb);
}
ZpajxxEntity zpajxxEntity = ztypMapper.getZpAsjBshxx(p.getAsjbh());
if(null!=zpajxxEntity){
String mobile = zpajxxEntity.getMobile();
String yhkh = zpajxxEntity.getYhkh();
String wx = zpajxxEntity.getWx();
String personid = zpajxxEntity.getPersonid();
if(null != mobile){
p.setMobile(mobile);
}
if(null != yhkh){
p.setYhkh(yhkh);
}
if(null != wx){
p.setWx(wx);
}
if(null != personid){
p.setPersonid(personid);
}
}
});
return getZpajxx;
}
@Override
......
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