调整行业管理
This commit is contained in:
parent
e998baeeab
commit
79880e7a20
@ -29,6 +29,8 @@ public class IndustryUserDTO {
|
||||
private String userName;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "关联时间")
|
||||
private String gmtCreate;
|
||||
@ApiModelProperty(name = "gmtModified", value = "修改时间")
|
||||
private String gmtModified;
|
||||
|
||||
public String getIndustryUserId() {
|
||||
return industryUserId == null ? "" : industryUserId.trim();
|
||||
@ -78,21 +80,31 @@ public class IndustryUserDTO {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("{");
|
||||
sb.append("\"industryUserId\":")
|
||||
.append("\"").append(industryUserId).append("\"");
|
||||
sb.append(",\"industryId\":")
|
||||
.append("\"").append(industryId).append("\"");
|
||||
sb.append(",\"industryIdDictionaryName\":")
|
||||
.append("\"").append(industryIdDictionaryName).append("\"");
|
||||
sb.append(",\"userId\":")
|
||||
.append("\"").append(userId).append("\"");
|
||||
sb.append(",\"userName\":")
|
||||
.append("\"").append(userName).append("\"");
|
||||
sb.append(",\"gmtCreate\":")
|
||||
.append("\"").append(gmtCreate).append("\"");
|
||||
sb.append("\"industryUserId\":\"")
|
||||
.append(industryUserId).append('\"');
|
||||
sb.append(",\"industryId\":\"")
|
||||
.append(industryId).append('\"');
|
||||
sb.append(",\"industryIdDictionaryName\":\"")
|
||||
.append(industryIdDictionaryName).append('\"');
|
||||
sb.append(",\"userId\":\"")
|
||||
.append(userId).append('\"');
|
||||
sb.append(",\"userName\":\"")
|
||||
.append(userName).append('\"');
|
||||
sb.append(",\"gmtCreate\":\"")
|
||||
.append(gmtCreate).append('\"');
|
||||
sb.append(",\"gmtModified\":\"")
|
||||
.append(gmtModified).append('\"');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -62,21 +62,28 @@ public class IndustryUserServiceImpl extends BaseService implements IIndustryUse
|
||||
String name = userIdArray[1];
|
||||
IndustryUserDTO industryUserDTO = getIndustryUserByUserId(id);
|
||||
if (industryUserDTO != null) {
|
||||
updateIndustryUser(industryUserDTO.getIndustryUserId(), industryId, id, name, params);
|
||||
continue;
|
||||
}
|
||||
params.put("industryUserId", UUIDUtil.getUUID());
|
||||
params.put("industryId", industryId);
|
||||
params.put("userId", id);
|
||||
params.put("userName", name);
|
||||
if (token != null) {
|
||||
setSaveInfo(token, params);
|
||||
} else {
|
||||
setSaveInfo(params);
|
||||
}
|
||||
setSaveInfo(params);
|
||||
industryUserDao.saveIndustryUser(params);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateIndustryUser(String industryUserId, String industryId, String userId, String userName, Map<String, Object> params) {
|
||||
params.clear();
|
||||
params.put("industryUserId", industryUserId);
|
||||
params.put("industryId", industryId);
|
||||
params.put("userId", userId);
|
||||
params.put("userName", userName);
|
||||
setUpdateInfo(params);
|
||||
industryUserDao.updateIndustryUser(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndustryUserDTO getIndustryUserByUserId(String userId) throws SearchException {
|
||||
Map<String, Object> params = getHashMap(1);
|
||||
|
@ -140,7 +140,7 @@
|
||||
LEFT JOIN
|
||||
gen_industry_user jt1
|
||||
ON
|
||||
jt1.user_id = t1.user_id
|
||||
jt1.user_id = SUBSTR(t1.user_id, 1, 36)
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="gridPersonnelId != null and gridPersonnelId != ''">
|
||||
|
@ -9,6 +9,7 @@
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="user_name" property="userName"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增行业检查项 -->
|
||||
@ -73,13 +74,13 @@
|
||||
gen_industry_user
|
||||
SET
|
||||
<if test="industryId != null and industryId != ''">
|
||||
industry_id = #{industryId}
|
||||
industry_id = #{industryId},
|
||||
</if>
|
||||
<if test="userId != null and userId != ''">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
user_name = #{userName}
|
||||
user_name = #{userName},
|
||||
</if>
|
||||
modifier = #{modifier},
|
||||
gmt_modified = #{gmtModified}
|
||||
@ -117,6 +118,7 @@
|
||||
t1.user_name,
|
||||
dt1.dictionary_name industry_id_dictionary_name,
|
||||
t1.gmt_create,
|
||||
t1.gmt_modified,
|
||||
t1.industry_user_id
|
||||
FROM
|
||||
gen_industry_user t1
|
||||
@ -132,7 +134,7 @@
|
||||
AND (
|
||||
dt1.dictionary_name LIKE CONCAT(#{keywords}, '%')
|
||||
OR
|
||||
jt1.name LIKE CONCAT(#{keywords}, '%')
|
||||
t1.user_name LIKE CONCAT(#{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
|
@ -56,9 +56,9 @@
|
||||
var table = layui.table;
|
||||
var resizeTimeout = null;
|
||||
var hrefParams = top.restAjax.params(window.location.href);
|
||||
var natureId = hrefParams.natureId;
|
||||
var natureName = hrefParams.natureName;
|
||||
var tableUrl = 'api/industryuser/listpageindustryuser?natureId='+ natureId;
|
||||
var industryId = hrefParams.industryId;
|
||||
var industryName = hrefParams.industryName;
|
||||
var tableUrl = 'api/industryuser/listpageindustryuser?industryId='+ industryId;
|
||||
|
||||
function initTable() {
|
||||
table.render({
|
||||
@ -94,6 +94,15 @@
|
||||
}
|
||||
return rowData.substring(0, rowData.length - 2);
|
||||
}
|
||||
},
|
||||
{field: 'gmtModified', width: 200, title: '修改时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData.substring(0, rowData.length - 2);
|
||||
}
|
||||
}
|
||||
]],
|
||||
page: true,
|
||||
@ -151,7 +160,7 @@
|
||||
userIdList.push(item.userId +'|'+ item.userName);
|
||||
}
|
||||
var layIndex;
|
||||
top.restAjax.post(top.restAjax.path('api/industryuser/saveindustryuserbynatureid/{natureId}', [natureId]), {
|
||||
top.restAjax.post(top.restAjax.path('api/industryuser/saveindustryuserbynatureid/{industryId}', [industryId]), {
|
||||
userIds: userIdList
|
||||
}, null, function(code, data) {
|
||||
top.dialog.msg('关联成功', {time: 1000});
|
||||
@ -196,7 +205,7 @@
|
||||
if(layEvent === 'saveEvent') {
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/tree/treeuser', []),
|
||||
title: '【'+ natureName + '】关联行业人员',
|
||||
title: '【'+ industryName + '】关联行业人员',
|
||||
width: '500px',
|
||||
height: '500px',
|
||||
onClose: function() {
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
// 初始化IFrame
|
||||
function initIFrame() {
|
||||
$('#listContent').attr('src', top.restAjax.path('route/industryuser/list-industryuser.html?natureId={parentId}&natureName={natureName}', [parentId, encodeURI(parentName)]));
|
||||
$('#listContent').attr('src', top.restAjax.path('route/industryuser/list-industryuser.html?industryId={parentId}&industryName={parentName}', [parentId, encodeURI(parentName)]));
|
||||
}
|
||||
// 初始化大小
|
||||
function initSize() {
|
||||
|
Loading…
Reference in New Issue
Block a user