Commit 8f5fe900 by wuchengwu

新增海口专属统计功能

parent aced11d1
......@@ -97,13 +97,21 @@ public class RstBean implements Comparable<RstBean> {
private String dnawcjtotal;//DNA未采集总数
private String dnacjltotal;//DNA采集总率
private String sfcfs ="0"; //身份证号码重复数
@Override
public int compareTo(RstBean o) {
int i = Integer.parseInt(o.getZycs())-Integer.parseInt(this.getZycs());//按照总应采数
return i;
}
public String getSfcfs() {
return sfcfs;
}
public void setSfcfs(String sfcfs) {
this.sfcfs = sfcfs;
}
public String getRys() {
return rys;
......
......@@ -9,7 +9,7 @@ import java.util.List;
public interface IRycjtjService {
public List<RstBean> getRsts(RstBean ajflpt, String unitcode);
public List<RstBean> getRsts(RstBean ajflpt, String unitcode,String ifhk);
public List<RstBean> getSjcjs(RstBean ajflpt, String unitcode);
public EasyUIPage queryRyxxPage(EasyUIPage page, String unitCode,String startCcsj,String endCcsj,String slType,String unitgrade,String cot);
public EasyUIPage querySjxxPage(EasyUIPage page, String unitCode,String startCcsj,String endCcsj,String slType,String unitgrade,String cot);
......
package com.founder.khtj.service.impl;
import com.founder.cjqx.dao.SysClientVpMapper;
import com.founder.khtj.dao.KhtjDao;
import com.founder.khtj.domain.RstBean;
import com.founder.khtj.domain.UnitCodeBean;
import com.founder.khtj.service.IRycjtjService;
import com.founder.model.AutoTbStRy;
import com.founder.model.SysClientVp;
import com.founder.utils.EasyUIPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -14,6 +16,7 @@ import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class IRycjtjServiceImpl implements IRycjtjService {
......@@ -21,8 +24,11 @@ public class IRycjtjServiceImpl implements IRycjtjService {
@Autowired
private KhtjDao khtjDao;
@Autowired
private SysClientVpMapper sysClientVpMapper;
@Override
public List<RstBean> getRsts(RstBean ajflpt, String unitcode) {
public List<RstBean> getRsts(RstBean ajflpt, String unitcode,String ifhk) {
List<RstBean> zwzltjBeans = new ArrayList<RstBean>();
List<UnitCodeBean> nuitCodes =null;
nuitCodes = xsdw(unitcode);
......@@ -63,6 +69,15 @@ public class IRycjtjServiceImpl implements IRycjtjService {
}else{
rstbean.setYcs(rstbean.getZycs());
}
if ("0".equals(rstbean.getZycs())){
//该单位总人数为0的情况,该单位未被注册不被统计
SysClientVp vp = new SysClientVp();
vp.setSsdwcode(lrdwdm);
int i = sysClientVpMapper.selectPageCount(vp);
if (i==0){
continue;
}
}
if(rstbean.getZwcjs()==null||"".equals(rstbean.getZwcjs())){
rstbean.setZwcjs("0");
}
......@@ -97,6 +112,10 @@ public class IRycjtjServiceImpl implements IRycjtjService {
zwzltjBeans.add(rstbean);
}
Collections.sort(zwzltjBeans);
//如果是海口页面则按总人数倒叙排序
if ("1".equals(ifhk)){
zwzltjBeans.stream().sorted(Comparator.comparing(RstBean::getZycs).reversed()).collect(Collectors.toList());
}
return zwzltjBeans;
}
......@@ -229,6 +248,7 @@ public class IRycjtjServiceImpl implements IRycjtjService {
sort = "LRSJ";
order = "desc";
}
map.put("sort", sort);
map.put("order", order);
map.put("lrdwdm", unitCode);
......@@ -239,7 +259,11 @@ public class IRycjtjServiceImpl implements IRycjtjService {
List<AutoTbStRy> autoTbStRys = khtjDao.queryPageList(map);
if(autoTbStRys!=null&&autoTbStRys.size()>0){
if(cot!=null&&!"".equals(cot)){
page.setTotal(Integer.parseInt(cot));
if ("sfcfs".equals(slType)){
page.setTotal(autoTbStRys.size());
}else {
page.setTotal(Integer.parseInt(cot));
}
}else{
page.setTotal(autoTbStRys.size());
}
......
......@@ -4,7 +4,7 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
public class DateFormatUtils {
public class DateFormatUtils {
public static Date strToDate(String num){
Date date = null;
......@@ -39,4 +39,12 @@ public class DateFormatUtils {
}
return null;
}
public static String dateToStrSFM(Date date){
if(date != null){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(date);
}
return null;
}
}
......@@ -168,7 +168,19 @@
<if test="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<if test="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<if test="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
)t8
)t8,
(select nvl(sum(ry.cfs),0) as sfcfs from (
select (case when hm >1 then 1 else 0 end ) cfs from (
select count(*) as hm, ZJHM
from TB_RY_RYCJ
where (SCBZ = '0' or SCBZ is null)
and (ifhb is null or ifhb <![CDATA[<>]]>'1')
<if test="lrdwdm != null and lrdwdm != ''">and lrdwdm like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<if test="maxccsj != null and maxccsj != ''"> and lrsj <![CDATA[<]]> to_date(#{maxccsj , jdbcType=VARCHAR },'YYYY-MM-DD')+1</if>
<if test="minccsj != null and minccsj != ''"> and lrsj <![CDATA[>=]]> to_date(#{minccsj , jdbcType=VARCHAR },'YYYY-MM-DD')</if>
<if test="sqlwhere != null and sqlwhere != ''"> and ${sqlwhere}</if>
group by zjhm
))ry)t9
</select>
......@@ -542,7 +554,12 @@
<if test="tjtype != null and tjtype != '' and tjtype == 'xtzrs'"> and 1=1</if>
<if test="tjtype != null and tjtype != '' and tjtype == 'csycs'"> and (tbbz = '1' or tbbz = '2')</if>
<if test="tjtype != null and tjtype != '' and tjtype == 'sfcfs'"> and ZJHM in (select * from ( select (case when hm > 1 then ZJHM end) cfs
from ( select count(*) as hm, ZJHM from TB_RY_RYCJ where (SCBZ = '0' or SCBZ is null) and (ifhb is null or ifhb <![CDATA[<>]]> '1')
<if test="lrdwdm != null and lrdwdm != ''">and LRDWDM like #{lrdwdm , jdbcType=VARCHAR }||'%'</if>
<if test="flrsjStr != null and flrsjStr != ''"> AND LRSJ <![CDATA[>=]]> to_date(#{flrsjStr, jdbcType=VARCHAR },'yyyy-mm-dd') </if>
<if test="elrsjStr != null and elrsjStr != ''"> AND LRSJ <![CDATA[<]]> to_date(#{elrsjStr , jdbcType=VARCHAR },'yyyy-mm-dd')+1 </if>
group by zjhm )) ry where ry.cfs is not null)</if>
<![CDATA[ order by ${sort} ${order} ) a
WHERE ROWNUM <= #{ end } ) t
WHERE r > #{ begin } ]]>
......
......@@ -155,6 +155,9 @@
<li id="H10D01">
<a onclick="toRycjtj()">人员采集信息统计</a>
</li>
<li id="H10D04">
<a onclick="toRycjtjhk()">人员采集信息统计(海口)</a>
</li>
<li id="H10D02">
<a onclick="toSjcjtj()">手机采集信息统计</a>
</li>
......@@ -473,9 +476,11 @@
}
function toRycjtj(){
window.open("/toKhtj?isfirst=1",'_blank');
window.open("/toKhtj?isfirst=1&hk=false",'_blank');
}
function toRycjtjhk(){
window.open("/toKhtj?isfirst=1&hk=true",'_blank');
}
function toRzgl(){
window.open("/toRzgl?isfirst=1",'_blank');
}
......
......@@ -307,6 +307,9 @@
var slType = $("#slType").val();
var unitgrade = $("#unitgrade").val();
var cot = $("#cot").val();
if ("sfcfs"==slType){
cot =$('#ryxxTable').datagrid('getPager').data("pagination").options.total;
}
var name = $("#name").val();
window.location.href="/exportExcelToRytjxq?unitCode="+unitCode+"&endCcsj="+endCcsj+"&startCcsj="+startCcsj
+"&slType="+slType+"&unitgrade="+unitgrade+"&cot="+cot+"&name="+name;
......
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