sync
This commit is contained in:
parent
2ef9e17daf
commit
aa4c538d8a
@ -373,13 +373,13 @@ public class FloatingPopulationServiceImpl extends DefaultBaseService implements
|
||||
areaList.add(totalMap);
|
||||
}else{
|
||||
List<AreaDTO> areaDTOS = mongoAreaService.listByParentId(areaParentId);
|
||||
//int totalPeopleNum = 0;
|
||||
final AtomicInteger totalPeopleNum = new AtomicInteger(0);
|
||||
int totalPeopleNum = 0;
|
||||
//final AtomicInteger totalPeopleNum = new AtomicInteger(0);
|
||||
List<AreaDTO> areaDTOS1 = Collections.synchronizedList(areaDTOS);
|
||||
//初始时间
|
||||
long startTime = System.currentTimeMillis();
|
||||
areaDTOS1.parallelStream().forEach(item -> {
|
||||
//for (AreaDTO item : areaDTOS) {
|
||||
//areaDTOS1.parallelStream().forEach(item -> {
|
||||
for (AreaDTO item : areaDTOS) {
|
||||
Map<String, Object> temp = new HashMap<>(16);
|
||||
Map<String, Object> queryParam = new HashMap<>(16);
|
||||
// 查询是否存在子节点
|
||||
@ -405,9 +405,9 @@ public class FloatingPopulationServiceImpl extends DefaultBaseService implements
|
||||
Integer counts = floatingPopulationDao.countFloatingPopulationNew(queryParam);
|
||||
temp.put("areaPeopleNum", counts);
|
||||
areaList.add(temp);
|
||||
//totalPeopleNum += counts;
|
||||
totalPeopleNum.addAndGet(counts);
|
||||
});
|
||||
totalPeopleNum += counts;
|
||||
//totalPeopleNum.addAndGet(counts);
|
||||
}//);
|
||||
// Collections.sort(areaList, new Comparator<Map<String, Object>>() {
|
||||
// @Override
|
||||
// public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
||||
@ -421,8 +421,8 @@ public class FloatingPopulationServiceImpl extends DefaultBaseService implements
|
||||
totalMap.put("areaParentId", "");
|
||||
totalMap.put("areaCode" , parentDTO.getAreaCode());
|
||||
totalMap.put("areaName", "合计");
|
||||
// totalMap.put("areaPeopleNum", totalPeopleNum);
|
||||
totalMap.put("areaPeopleNum", totalPeopleNum.get());
|
||||
totalMap.put("areaPeopleNum", totalPeopleNum);
|
||||
// totalMap.put("areaPeopleNum", totalPeopleNum.get());
|
||||
areaList.add(totalMap);
|
||||
/*测试程序部分*/
|
||||
long endTime = System.currentTimeMillis();
|
||||
|
@ -308,6 +308,12 @@
|
||||
t1.full_name LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="politicalStatus != null and politicalStatus !=''">
|
||||
AND t1.political_status = #{politicalStatus}
|
||||
</if>
|
||||
<if test="nation != null and nation !=''">
|
||||
AND t1.nation = #{nation}
|
||||
</if>
|
||||
<if test="fullName != null and fullName !=''">
|
||||
AND t1.full_name LIKE CONCAT('%', #{fullName}, '%')
|
||||
</if>
|
||||
|
@ -385,6 +385,12 @@
|
||||
t1.id_card_number LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="politicalStatus != null and politicalStatus !=''">
|
||||
AND t1.political_status = #{politicalStatus}
|
||||
</if>
|
||||
<if test="nation != null and nation !=''">
|
||||
AND t1.nation = #{nation}
|
||||
</if>
|
||||
<if test="fullName != null and fullName !=''">
|
||||
AND t1.full_name LIKE CONCAT('%', #{fullName}, '%')
|
||||
</if>
|
||||
|
@ -347,6 +347,8 @@
|
||||
idCardNumber: $('#idCardNumber').val(),
|
||||
telephone: $('#telephone').val(),
|
||||
areaParentId : areaParentId[areaParentId.length -1],
|
||||
politicalStatus: $("#politicalStatus").val(),
|
||||
nation: $("#nation").val(),
|
||||
type: type,
|
||||
areaCode : areaCode == "gridId" ? "" : areaCode,
|
||||
gridId: gridId ? gridId : ""
|
||||
|
@ -138,7 +138,7 @@
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common', 'laytpl'], function() {
|
||||
}).use(['index', 'table', 'laydate', 'common', 'laytpl', 'form'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
@ -149,6 +149,7 @@
|
||||
var idCardNumberSearchValue = '';
|
||||
var areaParentId = [''];
|
||||
var areaCode = '';
|
||||
var form = layui.form;
|
||||
|
||||
$('#left-card-div').height($win.height() - 30);
|
||||
$('#left-card-div').css('overflow', 'auto');
|
||||
@ -357,6 +358,8 @@
|
||||
fullName: $('#fullName').val(),
|
||||
idCardNumber: $('#idCardNumber').val(),
|
||||
telephone: $('#telephone').val(),
|
||||
politicalStatus: $("#politicalStatus").val(),
|
||||
nation: $("#nation").val(),
|
||||
areaParentId : areaParentId[areaParentId.length -1],
|
||||
areaCode : areaCode == "gridId" ? "" : areaCode,
|
||||
gridId: gridId ? gridId : ""
|
||||
|
Loading…
Reference in New Issue
Block a user