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