修改问题
This commit is contained in:
parent
ac74f210d7
commit
bdb1bb71c5
@ -60,26 +60,23 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
|
||||
@Override
|
||||
public SuccessResult saveCommunityBoss(Map<String, Object> params) throws SaveException, SearchException {
|
||||
Map<String, Object> communityBossParams = new HashMap<>();
|
||||
params.put("communityBossId", UUIDUtil.getUUID());
|
||||
String communityBossId = UUIDUtil.getUUID();
|
||||
params.put("communityBossId", communityBossId);
|
||||
setSaveInfo(params);
|
||||
communityBossDao.saveCommunityBoss(params);
|
||||
LOG.debug("绑定片长和社区关系");
|
||||
if (params.get("communityId") != null && !StringUtils.isBlank(params.get("communityId").toString())) {
|
||||
String[] communityIds = params.get("communityId").toString().split(",");
|
||||
String communityBossId = params.get("communityBossId").toString();
|
||||
saveCommunityBossCommunity(communityBossId, communityIds);
|
||||
}
|
||||
LOG.debug("绑定片长和小区关系");
|
||||
if (params.get("districtId") != null && !StringUtils.isBlank(params.get("districtId").toString())) {
|
||||
String[] districtIds = params.get("districtId").toString().split(",");
|
||||
String communityBossId = params.get("communityBossId").toString();
|
||||
saveCommunityBossDistrict(communityBossId, districtIds);
|
||||
}
|
||||
LOG.debug("绑定片长和楼宇关系");
|
||||
if (params.get("buildingId") != null && !StringUtils.isBlank(params.get("buildingId").toString())) {
|
||||
String[] buildingIds = params.get("buildingId").toString().split(",");
|
||||
String communityBossId = params.get("communityBossId").toString();
|
||||
saveCommunityBossBuilding(communityBossId, buildingIds);
|
||||
}
|
||||
return new SuccessResult();
|
||||
@ -262,7 +259,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
}
|
||||
Set<String> communityBossIds = new HashSet<>();
|
||||
for (CommunityBossDTO communityBossDTO : communityBossDTOs) {
|
||||
communityBossIds.add(communityBossDTO.getCommunityBossUserId());
|
||||
communityBossIds.add(communityBossDTO.getCommunityBossId());
|
||||
}
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("communityBossIds", new ArrayList<>(communityBossIds));
|
||||
@ -271,7 +268,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
for (CommunityDTO communityDTO : communityDTOs) {
|
||||
if (StringUtils.equals(communityBossDTO.getCommunityBossId(), communityDTO.getCommunityBossId())) {
|
||||
List<CommunityDTO> communities = communityBossDTO.getCommunities();
|
||||
communityDTOs.add(communityDTO);
|
||||
communities.add(communityDTO);
|
||||
communityBossDTO.setCommunities(communities);
|
||||
}
|
||||
}
|
||||
@ -414,7 +411,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
}
|
||||
Set<String> communityBossIds = new HashSet<>();
|
||||
for (CommunityBossDTO communityBossDTO : communityBossDTOs) {
|
||||
communityBossIds.add(communityBossDTO.getCommunityBossUserId());
|
||||
communityBossIds.add(communityBossDTO.getCommunityBossId());
|
||||
}
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("communityBossIds", new ArrayList<>(communityBossIds));
|
||||
@ -494,7 +491,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
}
|
||||
Set<String> communityBossIds = new HashSet<>();
|
||||
for (CommunityBossDTO communityBossDTO : communityBossDTOs) {
|
||||
communityBossIds.add(communityBossDTO.getCommunityBossUserId());
|
||||
communityBossIds.add(communityBossDTO.getCommunityBossId());
|
||||
}
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("communityBossIds", new ArrayList<>(communityBossIds));
|
||||
|
@ -33,6 +33,7 @@
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="communityBossParentName" id="communityBossParentName" placeholder="请选择上级片长" class="layui-input">
|
||||
<input type="hidden" name="communityBossParentUserId" id="communityBossParentUserId">
|
||||
<input type="hidden" name="communityBossParentId" id="communityBossParentId">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" id="communityNameDiv">
|
||||
@ -226,6 +227,8 @@
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
formData.field['communityBossLevel'] = formObject.communityBossLevel;
|
||||
top.restAjax.post(top.restAjax.path('api/communityboss/savecommunityboss', []), formData.field, null, function (code, data) {
|
||||
// success
|
||||
@ -251,6 +254,7 @@
|
||||
// complete
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
})
|
||||
|
||||
@ -344,6 +348,7 @@
|
||||
for(var i = 0, item = childNodes[i]; item = childNodes[i++];) {
|
||||
item.name = item.communityBossName;
|
||||
item.id = item.communityBossUserId;
|
||||
item.title = item.communityBossId;
|
||||
}
|
||||
return childNodes;
|
||||
},
|
||||
@ -351,7 +356,7 @@
|
||||
{
|
||||
id: formObject.communityBossParentUserId,
|
||||
name: formObject.communityBossParentName,
|
||||
title: formObject.communityBossParentName
|
||||
title: formObject.communityBossId
|
||||
}
|
||||
],
|
||||
onClose: function() {
|
||||
@ -359,17 +364,21 @@
|
||||
if(typeof(selectNodes) != 'undefined' && selectNodes != null) {
|
||||
if(selectNodes.length > 0) {
|
||||
var selectedNode = selectNodes[0];
|
||||
formObject.communityBossParentId = selectedNode.title;
|
||||
formObject.communityBossParentUserId = selectedNode.id;
|
||||
formObject.communityBossParentName = selectedNode.name;
|
||||
communityBossParentUserIdChange();
|
||||
$('#communityBossParentId').val(selectedNode.title);
|
||||
$('#communityBossParentUserId').val(selectedNode.id);
|
||||
$('#communityBossParentName').val(selectedNode.name);
|
||||
} else {
|
||||
formObject.communityBossParentId = null;
|
||||
formObject.communityBossParentUserId = null;
|
||||
formObject.communityBossParentName = null;
|
||||
communityBossParentUserIdChange();
|
||||
$('#communityBossParentUserId').val();
|
||||
$('#communityBossParentName').val();
|
||||
$('#communityBossParentId').val('');
|
||||
$('#communityBossParentUserId').val('');
|
||||
$('#communityBossParentName').val('');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -391,13 +400,13 @@
|
||||
areaId: formObject.areaId
|
||||
}
|
||||
} else if(formObject.communityBossLevel == '3') {
|
||||
apiUri = top.restAjax.path('api/communityboss/listcommunitybosscommunity/{communityBossUserId}', [formObject.communityBossParentUserId]);
|
||||
apiUri = top.restAjax.path('api/communityboss/listcommunitybosscommunity/{communityBossId}', [formObject.communityBossParentId]);
|
||||
otherParams = {}
|
||||
} else if(formObject.communityBossLevel == '4') {
|
||||
apiUri = top.restAjax.path('api/communityboss/listcommunitybosscommunity/{communityBossUserId}', [formObject.communityBossParentUserId]);
|
||||
apiUri = top.restAjax.path('api/communityboss/listcommunitybosscommunity/{communityBossId}', [formObject.communityBossParentId]);
|
||||
otherParams = {}
|
||||
} else if(formObject.communityBossLevel == '5') {
|
||||
apiUri = top.restAjax.path('api/communityboss/listcommunitybosscommunity/{communityBossUserId}', [formObject.communityBossParentUserId]);
|
||||
apiUri = top.restAjax.path('api/communityboss/listcommunitybosscommunity/{communityBossId}', [formObject.communityBossParentId]);
|
||||
otherParams = {}
|
||||
} else {
|
||||
return;
|
||||
@ -489,8 +498,7 @@
|
||||
}
|
||||
top.dialog.tree({
|
||||
title: '选择楼宇',
|
||||
apiUri: top.restAjax.path('api/citybuilding/listCityBuildingByDistrictIds/{districtId' +
|
||||
'}', [formObject.districtId]),
|
||||
apiUri: top.restAjax.path('api/citybuilding/listCityBuildingByDistrictIds/{districtId}', [formObject.districtId]),
|
||||
width: '200px',
|
||||
height: '400px',
|
||||
otherParams: {},
|
||||
|
@ -344,6 +344,8 @@
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
formData.field['communityBossLevel'] = formObject.communityBossLevel;
|
||||
top.restAjax.put(top.restAjax.path('api/communityboss/updatecommunityboss/{communityBossId}', [communityBossId]), formData.field, null, function (code, data) {
|
||||
// success
|
||||
@ -369,6 +371,7 @@
|
||||
// complete
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
})
|
||||
|
||||
|
@ -112,6 +112,8 @@
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
formData.field['newsType'] = newsType;
|
||||
top.restAjax.post(top.restAjax.path('api/news/savenews', []), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
@ -133,6 +135,7 @@
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
|
@ -153,6 +153,8 @@
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
formData.field['newsType'] = newsType;
|
||||
top.restAjax.post(top.restAjax.path('api/news/savenews', []), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
@ -174,6 +176,7 @@
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
|
@ -111,6 +111,8 @@
|
||||
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
formData.field['newsType'] = newsType;
|
||||
top.restAjax.post(top.restAjax.path('api/news/savenews', []), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
@ -132,6 +134,7 @@
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
|
@ -132,6 +132,8 @@
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
formData.field['newsType'] = newsType;
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
top.restAjax.put(top.restAjax.path('api/news/updatenews/{newsId}', [newsId]), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
@ -152,6 +154,7 @@
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
|
@ -176,6 +176,8 @@
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
formData.field['newsType'] = newsType;
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
top.restAjax.put(top.restAjax.path('api/news/updatenews/{newsId}', [newsId]), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
@ -196,6 +198,7 @@
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
|
@ -132,6 +132,8 @@
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
formData.field['newsType'] = newsType;
|
||||
var loadLayerIndex;
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
top.restAjax.put(top.restAjax.path('api/news/updatenews/{newsId}', [newsId]), formData.field, null, function (code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
@ -152,6 +154,7 @@
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
function closeBox() {
|
||||
|
Loading…
Reference in New Issue
Block a user