新增网格描述
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("communityBossParentUserId", StringUtils.isBlank(communityBossVO.getCommunityBossParentUserId()) ? "0" : communityBossVO.getCommunityBossParentUserId());
|
||||
|
||||
params.put("gridSummary", communityBossVO.getGridSummary());
|
||||
|
||||
params.put("districtId", communityBossVO.getDistrictId() == null ? "" : communityBossVO.getDistrictId());
|
||||
params.put("districtName", communityBossVO.getDistrictName() == null ? "" : communityBossVO.getDistrictName());
|
||||
|
@ -54,6 +54,9 @@ public class CommunityBossDTO implements Serializable {
|
||||
@ApiModelProperty(name = "buildings", value = "楼宇列表")
|
||||
private List<CityBuildingDTO> buildings;
|
||||
|
||||
@ApiModelProperty(name = "gridSummary", value = "网格描述")
|
||||
private String gridSummary;
|
||||
|
||||
public String getCommunityBossId() {
|
||||
return communityBossId == null ? "" : communityBossId.trim();
|
||||
}
|
||||
@ -190,4 +193,12 @@ public class CommunityBossDTO implements Serializable {
|
||||
public void setBuildings(List<CityBuildingDTO> 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
|
||||
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();
|
||||
params.put("communityBossId", communityBossId);
|
||||
setSaveInfo(params);
|
||||
@ -82,6 +86,13 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
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
|
||||
public SuccessResult removeCommunityBoss(Map<String, Object> params) throws RemoveException {
|
||||
params.put("communityBossIds", Arrays.asList(params.get("communityBossIds").toString().split("_")));
|
||||
@ -187,6 +198,7 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun
|
||||
|
||||
/**
|
||||
* 设置用户
|
||||
*
|
||||
* @param communityBossDTO
|
||||
*/
|
||||
private void setUserInfo(CommunityBossDTO communityBossDTO) {
|
||||
|
@ -17,6 +17,7 @@
|
||||
<result property="areaName" column="area_name"/>
|
||||
<result property="communityIds" column="community_ids"/>
|
||||
<result property="communityNames" column="community_names"/>
|
||||
<result property="gridSummary" column="grid_summary"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="communityDTO" type="com.cm.systemcity.pojo.dtos.community.CommunityDTO">
|
||||
@ -215,6 +216,14 @@
|
||||
AND
|
||||
t1.community_boss_id = #{communityBossId}
|
||||
</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>
|
||||
|
||||
<!-- 新增片长和社区关系 -->
|
||||
@ -329,6 +338,7 @@
|
||||
t1.community_boss_level,
|
||||
t1.area_id,
|
||||
t1.area_name,
|
||||
t1.grid_summary,
|
||||
GROUP_CONCAT(t3.community_id) community_ids,
|
||||
GROUP_CONCAT(t3.community_name) community_names
|
||||
FROM
|
||||
@ -344,7 +354,8 @@
|
||||
t1.community_boss_parent_user_id,
|
||||
t1.community_boss_level,
|
||||
t1.area_id,
|
||||
t1.area_name
|
||||
t1.area_name,
|
||||
t1.grid_summary
|
||||
) mt1
|
||||
WHERE
|
||||
1 = 1
|
||||
|
@ -129,7 +129,7 @@
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 1,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/communityboss/update.html?communityBossId={id}', [id]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
@ -230,6 +230,15 @@
|
||||
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,
|
||||
parseData: function(data) {
|
||||
|
@ -244,7 +244,16 @@
|
||||
rowData = communitiesFormatter(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,
|
||||
parseData: function(data) {
|
||||
|
@ -257,8 +257,16 @@
|
||||
rowData = districtFormatter(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,
|
||||
|
@ -290,7 +290,16 @@
|
||||
rowData = buildingFormatter(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,
|
||||
parseData: function(data) {
|
||||
|
@ -292,7 +292,16 @@
|
||||
rowData = buildingFormatter(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,
|
||||
parseData: function(data) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<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">
|
||||
</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-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
@ -109,7 +114,8 @@
|
||||
districtId:null,
|
||||
districtName:null,
|
||||
buildingId:null,
|
||||
buildingName:null
|
||||
buildingName:null,
|
||||
gridSummary:null
|
||||
};
|
||||
var selectedCommunities = [];
|
||||
var selectedDistricts = [];
|
||||
|
@ -11,7 +11,7 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<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">
|
||||
</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-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
@ -106,7 +111,8 @@
|
||||
districtId:null,
|
||||
districtName:null,
|
||||
buildingId:null,
|
||||
buildingName:null
|
||||
buildingName:null,
|
||||
gridSummary: null
|
||||
};
|
||||
var selectedCommunities = [];
|
||||
var selectedDistricts = [];
|
||||
@ -260,6 +266,7 @@
|
||||
formObject.communityBossLevel = data.communityBossLevel;
|
||||
formObject.areaId = data.areaId;
|
||||
formObject.areaName = data.areaName;
|
||||
formObject.gridSummary = data.gridSummary;
|
||||
$('#areaName').val(data.areaName);
|
||||
$('#areaId').val(data.areaId);
|
||||
$('#communityBossParentName').val(data.communityBossParentName);
|
||||
@ -268,6 +275,7 @@
|
||||
$('#communityBossUserId').val(data.communityBossUserId);
|
||||
$('#communityBossName').val(data.communityBossName);
|
||||
$('#communityBossUsername').val(data.communityBossUsername);
|
||||
$('#gridSummary').val(data.gridSummary);
|
||||
var communityId = '';
|
||||
var communityName = '';
|
||||
for(var i = 0, item; item = data.communities[i++];) {
|
||||
@ -287,8 +295,6 @@
|
||||
formObject.communityId = communityId;
|
||||
formObject.communityName = communityName;
|
||||
|
||||
|
||||
|
||||
//初始化小区数据
|
||||
var districtId = '';
|
||||
var districtName = '';
|
||||
|
Loading…
Reference in New Issue
Block a user