新增网格描述
This commit is contained in:
parent
bdb1bb71c5
commit
9eb150d890
@ -123,7 +123,7 @@ public class CommunityBossController extends AbstractController {
|
|||||||
|
|
||||||
params.put("communityBossParentId", StringUtils.isBlank(communityBossVO.getCommunityBossParentId()) ? "0" : communityBossVO.getCommunityBossParentId());
|
params.put("communityBossParentId", StringUtils.isBlank(communityBossVO.getCommunityBossParentId()) ? "0" : communityBossVO.getCommunityBossParentId());
|
||||||
params.put("communityBossParentUserId", StringUtils.isBlank(communityBossVO.getCommunityBossParentUserId()) ? "0" : communityBossVO.getCommunityBossParentUserId());
|
params.put("communityBossParentUserId", StringUtils.isBlank(communityBossVO.getCommunityBossParentUserId()) ? "0" : communityBossVO.getCommunityBossParentUserId());
|
||||||
|
params.put("gridSummary", communityBossVO.getGridSummary());
|
||||||
|
|
||||||
params.put("districtId", communityBossVO.getDistrictId() == null ? "" : communityBossVO.getDistrictId());
|
params.put("districtId", communityBossVO.getDistrictId() == null ? "" : communityBossVO.getDistrictId());
|
||||||
params.put("districtName", communityBossVO.getDistrictName() == null ? "" : communityBossVO.getDistrictName());
|
params.put("districtName", communityBossVO.getDistrictName() == null ? "" : communityBossVO.getDistrictName());
|
||||||
|
@ -54,6 +54,9 @@ public class CommunityBossDTO implements Serializable {
|
|||||||
@ApiModelProperty(name = "buildings", value = "楼宇列表")
|
@ApiModelProperty(name = "buildings", value = "楼宇列表")
|
||||||
private List<CityBuildingDTO> buildings;
|
private List<CityBuildingDTO> buildings;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "gridSummary", value = "网格描述")
|
||||||
|
private String gridSummary;
|
||||||
|
|
||||||
public String getCommunityBossId() {
|
public String getCommunityBossId() {
|
||||||
return communityBossId == null ? "" : communityBossId.trim();
|
return communityBossId == null ? "" : communityBossId.trim();
|
||||||
}
|
}
|
||||||
@ -190,4 +193,12 @@ public class CommunityBossDTO implements Serializable {
|
|||||||
public void setBuildings(List<CityBuildingDTO> buildings) {
|
public void setBuildings(List<CityBuildingDTO> buildings) {
|
||||||
this.buildings = buildings;
|
this.buildings = buildings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGridSummary() {
|
||||||
|
return gridSummary == null ? "" : gridSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGridSummary(String gridSummary) {
|
||||||
|
this.gridSummary = gridSummary;
|
||||||
|
}
|
||||||
}
|
}
|
@ -60,6 +60,10 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SuccessResult saveCommunityBoss(Map<String, Object> params) throws SaveException, SearchException {
|
public SuccessResult saveCommunityBoss(Map<String, Object> params) throws SaveException, SearchException {
|
||||||
|
CommunityBossDTO communityBossDTO = getByUserIdAndLevel(params.get("communityBossUserId").toString(), params.get("communityBossLevel").toString());
|
||||||
|
if (communityBossDTO != null) {
|
||||||
|
throw new SearchException("已经是该级别片长,无需重复添加");
|
||||||
|
}
|
||||||
String communityBossId = UUIDUtil.getUUID();
|
String communityBossId = UUIDUtil.getUUID();
|
||||||
params.put("communityBossId", communityBossId);
|
params.put("communityBossId", communityBossId);
|
||||||
setSaveInfo(params);
|
setSaveInfo(params);
|
||||||
@ -82,6 +86,13 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
|||||||
return new SuccessResult();
|
return new SuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private CommunityBossDTO getByUserIdAndLevel(String communityBossUserId, String communityBossLevel) {
|
||||||
|
Map<String, Object> params = getHashMap(4);
|
||||||
|
params.put("communityBossUserId", communityBossUserId);
|
||||||
|
params.put("communityBossLevel", communityBossLevel);
|
||||||
|
return getCommunityBossDTO(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SuccessResult removeCommunityBoss(Map<String, Object> params) throws RemoveException {
|
public SuccessResult removeCommunityBoss(Map<String, Object> params) throws RemoveException {
|
||||||
params.put("communityBossIds", Arrays.asList(params.get("communityBossIds").toString().split("_")));
|
params.put("communityBossIds", Arrays.asList(params.get("communityBossIds").toString().split("_")));
|
||||||
@ -187,6 +198,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置用户
|
* 设置用户
|
||||||
|
*
|
||||||
* @param communityBossDTO
|
* @param communityBossDTO
|
||||||
*/
|
*/
|
||||||
private void setUserInfo(CommunityBossDTO communityBossDTO) {
|
private void setUserInfo(CommunityBossDTO communityBossDTO) {
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<result property="areaName" column="area_name"/>
|
<result property="areaName" column="area_name"/>
|
||||||
<result property="communityIds" column="community_ids"/>
|
<result property="communityIds" column="community_ids"/>
|
||||||
<result property="communityNames" column="community_names"/>
|
<result property="communityNames" column="community_names"/>
|
||||||
|
<result property="gridSummary" column="grid_summary"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="communityDTO" type="com.cm.systemcity.pojo.dtos.community.CommunityDTO">
|
<resultMap id="communityDTO" type="com.cm.systemcity.pojo.dtos.community.CommunityDTO">
|
||||||
@ -215,6 +216,14 @@
|
|||||||
AND
|
AND
|
||||||
t1.community_boss_id = #{communityBossId}
|
t1.community_boss_id = #{communityBossId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="communityBossUserId != null and communityBossUserId != ''">
|
||||||
|
AND
|
||||||
|
t1.community_boss_user_id = #{communityBossUserId}
|
||||||
|
</if>
|
||||||
|
<if test="communityBossLevel != null and communityBossLevel != ''">
|
||||||
|
AND
|
||||||
|
t1.community_boss_level = #{communityBossLevel}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 新增片长和社区关系 -->
|
<!-- 新增片长和社区关系 -->
|
||||||
@ -329,6 +338,7 @@
|
|||||||
t1.community_boss_level,
|
t1.community_boss_level,
|
||||||
t1.area_id,
|
t1.area_id,
|
||||||
t1.area_name,
|
t1.area_name,
|
||||||
|
t1.grid_summary,
|
||||||
GROUP_CONCAT(t3.community_id) community_ids,
|
GROUP_CONCAT(t3.community_id) community_ids,
|
||||||
GROUP_CONCAT(t3.community_name) community_names
|
GROUP_CONCAT(t3.community_name) community_names
|
||||||
FROM
|
FROM
|
||||||
@ -344,7 +354,8 @@
|
|||||||
t1.community_boss_parent_user_id,
|
t1.community_boss_parent_user_id,
|
||||||
t1.community_boss_level,
|
t1.community_boss_level,
|
||||||
t1.area_id,
|
t1.area_id,
|
||||||
t1.area_name
|
t1.area_name,
|
||||||
|
t1.grid_summary
|
||||||
) mt1
|
) mt1
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
closeBtn: 0,
|
closeBtn: 0,
|
||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 1,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/communityboss/update.html?communityBossId={id}', [id]),
|
content: top.restAjax.path('route/communityboss/update.html?communityBossId={id}', [id]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
@ -230,6 +230,15 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{field: 'gridSummary', width: 200, title: '网格描述', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
]],
|
]],
|
||||||
page: true,
|
page: true,
|
||||||
parseData: function(data) {
|
parseData: function(data) {
|
||||||
|
@ -244,7 +244,16 @@
|
|||||||
rowData = communitiesFormatter(rowData);
|
rowData = communitiesFormatter(rowData);
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'gridSummary', width: 200, title: '网格描述', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
}
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
]],
|
]],
|
||||||
page: true,
|
page: true,
|
||||||
parseData: function(data) {
|
parseData: function(data) {
|
||||||
|
@ -257,8 +257,16 @@
|
|||||||
rowData = districtFormatter(rowData);
|
rowData = districtFormatter(rowData);
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'gridSummary', width: 200, title: '网格描述', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
}
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
]],
|
]],
|
||||||
page: true,
|
page: true,
|
||||||
|
@ -290,7 +290,16 @@
|
|||||||
rowData = buildingFormatter(rowData);
|
rowData = buildingFormatter(rowData);
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'gridSummary', width: 200, title: '网格描述', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
}
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
]],
|
]],
|
||||||
page: true,
|
page: true,
|
||||||
parseData: function(data) {
|
parseData: function(data) {
|
||||||
|
@ -292,7 +292,16 @@
|
|||||||
rowData = buildingFormatter(rowData);
|
rowData = buildingFormatter(rowData);
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'gridSummary', width: 200, title: '网格描述', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
}
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
]],
|
]],
|
||||||
page: true,
|
page: true,
|
||||||
parseData: function(data) {
|
parseData: function(data) {
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
<div class="layui-fluid">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">
|
<div class="layui-card-header">
|
||||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
@ -70,7 +70,12 @@
|
|||||||
<input type="text" name="communityBossUsername" id="communityBossUsername" placeholder="请选择片长" readonly class="layui-input">
|
<input type="text" name="communityBossUsername" id="communityBossUsername" placeholder="请选择片长" readonly class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">网格描述</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea name="gridSummary" placeholder="请输入网格描述" class="layui-textarea"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-footer" style="left: 0;">
|
<div class="layui-footer" style="left: 0;">
|
||||||
@ -109,7 +114,8 @@
|
|||||||
districtId:null,
|
districtId:null,
|
||||||
districtName:null,
|
districtName:null,
|
||||||
buildingId:null,
|
buildingId:null,
|
||||||
buildingName:null
|
buildingName:null,
|
||||||
|
gridSummary:null
|
||||||
};
|
};
|
||||||
var selectedCommunities = [];
|
var selectedCommunities = [];
|
||||||
var selectedDistricts = [];
|
var selectedDistricts = [];
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
<div class="layui-fluid">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-header">
|
<div class="layui-card-header">
|
||||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
@ -70,7 +70,12 @@
|
|||||||
<input type="text" name="communityBossUsername" id="communityBossUsername" placeholder="请选择片长" readonly class="layui-input">
|
<input type="text" name="communityBossUsername" id="communityBossUsername" placeholder="请选择片长" readonly class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">网格描述</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea name="gridSummary" id="gridSummary" placeholder="请输入网格描述" class="layui-textarea"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-footer" style="left: 0;">
|
<div class="layui-footer" style="left: 0;">
|
||||||
@ -106,7 +111,8 @@
|
|||||||
districtId:null,
|
districtId:null,
|
||||||
districtName:null,
|
districtName:null,
|
||||||
buildingId:null,
|
buildingId:null,
|
||||||
buildingName:null
|
buildingName:null,
|
||||||
|
gridSummary: null
|
||||||
};
|
};
|
||||||
var selectedCommunities = [];
|
var selectedCommunities = [];
|
||||||
var selectedDistricts = [];
|
var selectedDistricts = [];
|
||||||
@ -260,6 +266,7 @@
|
|||||||
formObject.communityBossLevel = data.communityBossLevel;
|
formObject.communityBossLevel = data.communityBossLevel;
|
||||||
formObject.areaId = data.areaId;
|
formObject.areaId = data.areaId;
|
||||||
formObject.areaName = data.areaName;
|
formObject.areaName = data.areaName;
|
||||||
|
formObject.gridSummary = data.gridSummary;
|
||||||
$('#areaName').val(data.areaName);
|
$('#areaName').val(data.areaName);
|
||||||
$('#areaId').val(data.areaId);
|
$('#areaId').val(data.areaId);
|
||||||
$('#communityBossParentName').val(data.communityBossParentName);
|
$('#communityBossParentName').val(data.communityBossParentName);
|
||||||
@ -268,6 +275,7 @@
|
|||||||
$('#communityBossUserId').val(data.communityBossUserId);
|
$('#communityBossUserId').val(data.communityBossUserId);
|
||||||
$('#communityBossName').val(data.communityBossName);
|
$('#communityBossName').val(data.communityBossName);
|
||||||
$('#communityBossUsername').val(data.communityBossUsername);
|
$('#communityBossUsername').val(data.communityBossUsername);
|
||||||
|
$('#gridSummary').val(data.gridSummary);
|
||||||
var communityId = '';
|
var communityId = '';
|
||||||
var communityName = '';
|
var communityName = '';
|
||||||
for(var i = 0, item; item = data.communities[i++];) {
|
for(var i = 0, item; item = data.communities[i++];) {
|
||||||
@ -287,8 +295,6 @@
|
|||||||
formObject.communityId = communityId;
|
formObject.communityId = communityId;
|
||||||
formObject.communityName = communityName;
|
formObject.communityName = communityName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//初始化小区数据
|
//初始化小区数据
|
||||||
var districtId = '';
|
var districtId = '';
|
||||||
var districtName = '';
|
var districtName = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user