Commit 90de310c by liulianglang

提交单位筛选

parent 8589eb75
...@@ -6,6 +6,7 @@ import org.springblade.founder.tjfx.entity.*; ...@@ -6,6 +6,7 @@ import org.springblade.founder.tjfx.entity.*;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
import java.util.Map;
@Component @Component
@Mapper @Mapper
...@@ -83,5 +84,7 @@ public interface AjtjMapper { ...@@ -83,5 +84,7 @@ public interface AjtjMapper {
List<TbXwZbfzxyr> getZaryList(AjtjParam ajtjParam); List<TbXwZbfzxyr> getZaryList(AjtjParam ajtjParam);
int getZaryListCount(AjtjParam ajtjParam); int getZaryListCount(AjtjParam ajtjParam);
String getCodeLevByCode(String unitcode);
List<String> getDwdmList(Map<String, Object> map);
} }
...@@ -15,6 +15,15 @@ ...@@ -15,6 +15,15 @@
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询--> <if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1 AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if> </if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj ) asj
group by asj.larq group by asj.larq
order by asj.larq order by asj.larq
...@@ -46,6 +55,15 @@ ...@@ -46,6 +55,15 @@
<if test="ajlbsql !=null and ajlbsql!=''"> <if test="ajlbsql !=null and ajlbsql!=''">
${ajlbsql} ${ajlbsql}
</if> </if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select> </select>
<select id="getFaCount" resultType="java.lang.Integer"> <select id="getFaCount" resultType="java.lang.Integer">
...@@ -58,7 +76,15 @@ ...@@ -58,7 +76,15 @@
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询--> <if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1 AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if> </if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</select> </select>
...@@ -160,6 +186,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0' ...@@ -160,6 +186,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
<if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询--> <if test="larqJssj!=null and larqJssj!=''"><!--时间不为空 根据立案日期选择查询-->
AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1 AND ASJ.LARQ <![CDATA[<]]> to_date(#{larqJssj, jdbcType=VARCHAR},'yyyy-mm-dd ') +1
</if> </if>
<if test="unitcodeList != null and unitcodeList.size() > 0">
and
<foreach collection="unitcodeList" item="dws" open="(" close=")" separator=" or ">
asj.LADW_GAJGJGDM in
<foreach collection="dws" item="dw" separator="," open="(" close=")">
#{dw,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
) asj ) asj
group by asj.larq group by asj.larq
order by asj.larq order by asj.larq
...@@ -525,6 +560,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0' ...@@ -525,6 +560,15 @@ from tb_st_asj asj where asj.xxsc_pdbz='0'
</if> </if>
</select> </select>
<!--查询当前单位的lev-->
<select id="getCodeLevByCode" parameterType="java.lang.String" resultType="java.lang.String">
SELECT LEV FROM sys_dictitem_xz WHERE CODE=#{unitcode, jdbcType=VARCHAR}
</select>
<select id="getDwdmList" resultType="java.lang.String">
select code from sys_dictitem_xz
where ${codeLevCol} = #{unitcode}
</select>
<sql id="aj-condition"> <sql id="aj-condition">
......
package org.springblade.founder.tjfx.service.impl; package org.springblade.founder.tjfx.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.tjfx.entity.*; import org.springblade.founder.tjfx.entity.*;
import org.springblade.founder.tjfx.mapper.AjtjMapper; import org.springblade.founder.tjfx.mapper.AjtjMapper;
import org.springblade.founder.tjfx.service.AjtjService; import org.springblade.founder.tjfx.service.AjtjService;
import org.springblade.founder.utils.DateUtil; import org.springblade.founder.utils.DateUtil;
import org.springblade.founder.utils.DwUtil;
import org.springblade.founder.utils.NumberUtil; import org.springblade.founder.utils.NumberUtil;
import org.springblade.modules.system.entity.XzxtUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
@DS("xzxt") @DS("xzxt")
...@@ -23,6 +28,7 @@ public class AjtjServiceImpl implements AjtjService { ...@@ -23,6 +28,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override @Override
public List<AjtjResult> getFapafyuest(AjtjParam ajtjParam) { public List<AjtjResult> getFapafyuest(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
List<AjtjResult> faans = ajtjMapper.getFapafyuest(ajtjParam); List<AjtjResult> faans = ajtjMapper.getFapafyuest(ajtjParam);
List<AjtjResult> faan =NumberUtil.listToMap(faans,ajtjParam); List<AjtjResult> faan =NumberUtil.listToMap(faans,ajtjParam);
...@@ -73,7 +79,7 @@ public class AjtjServiceImpl implements AjtjService { ...@@ -73,7 +79,7 @@ public class AjtjServiceImpl implements AjtjService {
@Override @Override
public List<AjtjResult> getPayuest(AjtjParam ajtjParam) { public List<AjtjResult> getPayuest(AjtjParam ajtjParam) {
setDwxx(ajtjParam);
List<AjtjResult> poans = ajtjMapper.getPayuest(ajtjParam); List<AjtjResult> poans = ajtjMapper.getPayuest(ajtjParam);
List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam); List<AjtjResult> poan =NumberUtil.listToMap(poans,ajtjParam);
try { try {
...@@ -1158,4 +1164,22 @@ public class AjtjServiceImpl implements AjtjService { ...@@ -1158,4 +1164,22 @@ public class AjtjServiceImpl implements AjtjService {
public int getZaryListCount(AjtjParam ajtjParam) { public int getZaryListCount(AjtjParam ajtjParam) {
return ajtjMapper.getZaryListCount(ajtjParam); return ajtjMapper.getZaryListCount(ajtjParam);
} }
private AjtjParam setDwxx(AjtjParam ajtjParam){
String unitcode = ajtjParam.getUnitcode();
if(unitcode!=null&&!"".equals(unitcode)){
ajtjParam.setUnitcode(unitcode);
String grade=ajtjMapper.getCodeLevByCode(unitcode);
Map<String, Object> levMap = DwUtil.getDwLevCode(unitcode, grade);
ajtjParam.setCodeLevCol(levMap.get("codeLevCol").toString());
ajtjParam.setDscodeLevCol(levMap.get("dscodeLevCol").toString());
ajtjParam.setLev(levMap.get("lev").toString());
List<String> dwdmList = ajtjMapper.getDwdmList(levMap);
ajtjParam.setUnitcodeList(dwdmList);
return ajtjParam;
}else {
return ajtjParam;
}
}
} }
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