server_commit
This commit is contained in:
@@ -108,22 +108,27 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public void updateSysUser(String pullTime, String sourceType, String[] columnNames, String isUpSet, String partGroupId, boolean isInvert) {
|
public void updateSysUser(String pullTime, String sourceType, String[] columnNames, String isUpSet, String partGroupId, boolean isInvert) {
|
||||||
try {
|
try {
|
||||||
List<UserSource> sources = new ArrayList<>();
|
// List<UserSource> sources = new ArrayList<>();
|
||||||
Map<String, String> userPartMap = new HashMap<>();
|
Map<String, String> userPartMap = new HashMap<>();
|
||||||
if (Strings.isNotBlank(partGroupId)) {
|
// if (Strings.isNotBlank(partGroupId)) {
|
||||||
//如果为true,更新组别之外人员
|
// //如果为true,更新组别之外人员
|
||||||
Sql sql = Sqls.create("select u.loginname from user_part up left join `user` u on u.id=up.userId where up.groupId = @groupId").setParam("groupId", partGroupId);
|
// Sql sql = Sqls.create("select u.loginname from user_part up left join `user` u on u.id=up.userId where up.groupId = @groupId").setParam("groupId", partGroupId);
|
||||||
List<String> loginNameList = userPatUpService.listMap(sql).stream().map(o -> o.getString("loginname")).collect(Collectors.toList());
|
// List<String> loginNameList = userPatUpService.listMap(sql).stream().map(o -> o.getString("loginname")).collect(Collectors.toList());
|
||||||
if (isInvert) {
|
// if (isInvert) {
|
||||||
sources = query(Cnd.where("pullTime", "=", pullTime).and("loginname", "not in", loginNameList).groupBy("loginname"));
|
// sources = query(Cnd.where("pullTime", "=", pullTime).and("loginname", "not in", loginNameList).groupBy("loginname"));
|
||||||
userPartMap = sources.stream().collect(Collectors.toMap(Sys_user::getLoginname, Sys_user::getLoginname));
|
// userPartMap = sources.stream().collect(Collectors.toMap(Sys_user::getLoginname, Sys_user::getLoginname));
|
||||||
} else {
|
// } else {
|
||||||
userPartMap = userPatUpService.query(Cnd.where("groupId", "=", partGroupId)).stream().collect(Collectors.toMap(UserPartUp::getLoginname, UserPartUp::getLoginname));
|
// userPartMap = userPatUpService.query(Cnd.where("groupId", "=", partGroupId)).stream().collect(Collectors.toMap(UserPartUp::getLoginname, UserPartUp::getLoginname));
|
||||||
sources = query(Cnd.where("pullTime", "=", pullTime).and("loginname", "in", loginNameList).groupBy("loginname"));
|
// sources = query(Cnd.where("pullTime", "=", pullTime).and("loginname", "in", loginNameList).groupBy("loginname"));
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
sources = query(Cnd.where("pullTime", "=", pullTime).groupBy("loginname"));
|
// sources = query(Cnd.where("pullTime", "=", pullTime).groupBy("loginname"));
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
Sql sql = Sqls.create("select * from user_source where loginname not in (select loginname from sys_user) and pullTime = @pullTime group by loginname").setParam("pullTime", pullTime);
|
||||||
|
List<NutMap> list = listMap(sql);
|
||||||
|
List<UserSource> sources = BeanUtil.copyToList(list, UserSource.class);
|
||||||
|
|
||||||
|
|
||||||
// 查询所有用户,判断是否需要更新
|
// 查询所有用户,判断是否需要更新
|
||||||
List<Sys_user> users = sysUserService.query(Cnd.where("loginname", "is not", null));
|
List<Sys_user> users = sysUserService.query(Cnd.where("loginname", "is not", null));
|
||||||
@@ -184,7 +189,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
//不更新会员和福利会员字段
|
//不更新会员和福利会员字段
|
||||||
source.setMember(null);
|
source.setMember(null);
|
||||||
source.setWelfareMember(null);
|
source.setWelfareMember(null);
|
||||||
Sys_user user = userMap.get(source.getLoginname().toLowerCase());
|
Sys_user user = userMap.get(source.getLoginname());
|
||||||
|
|
||||||
if (isAuto) {
|
if (isAuto) {
|
||||||
checkMemberOrWelfareMember(changeConfig, source, user, addMemberUserIds, deleteMemberUserIds,
|
checkMemberOrWelfareMember(changeConfig, source, user, addMemberUserIds, deleteMemberUserIds,
|
||||||
@@ -256,9 +261,17 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
//如果有新用户,增加到用户表同时增加角色
|
//如果有新用户,增加到用户表同时增加角色
|
||||||
if (Lang.isNotEmpty(needInitUserList)) {
|
if (Lang.isNotEmpty(needInitUserList)) {
|
||||||
sysUserService.fastInsert(needInitUserList);
|
sysUserService.fastInsert(needInitUserList);
|
||||||
List<String> userIdList = userRoles.stream().map(Sys_user_role::getUserId).collect(Collectors.toList());
|
|
||||||
sysUserRoleService.dao().clear(Sys_user_role.class, Cnd.where("userId", "in", userIdList));
|
String roleId = Roles.PUBLIC;
|
||||||
sysUserRoleService.insert(userRoles);
|
|
||||||
|
List<Sys_user_role> roleList = needInitUserList.stream().map(v -> {
|
||||||
|
Sys_user_role role = new Sys_user_role();
|
||||||
|
role.setUserId(v.getId());
|
||||||
|
role.setRoleId(roleId);
|
||||||
|
return role;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
sysUserRoleService.insert(roleList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加会员
|
// 添加会员
|
||||||
@@ -567,7 +580,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String changeInfos = changeList.stream().map(v -> {
|
String changeInfos = changeList.stream().map(v -> {
|
||||||
return v.getString("fieldName") + ":" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue"));
|
return v.getString("fieldName") + ":" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue", "")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue", ""));
|
||||||
}).collect(Collectors.joining(";"));
|
}).collect(Collectors.joining(";"));
|
||||||
// 比较变更数据
|
// 比较变更数据
|
||||||
commonCompareChange(source, user, changeTypes);
|
commonCompareChange(source, user, changeTypes);
|
||||||
@@ -596,13 +609,13 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ObjectUtil.equals(user.getMember(), source.getMember())){
|
// if (!ObjectUtil.equals(user.getMember(), source.getMember())){
|
||||||
if (source.getMember() == 1) {
|
// if (source.getMember() != null && source.getMember() == 1) {
|
||||||
changeTypes.add(MemberChangeType.RESTORE.getType());
|
// changeTypes.add(MemberChangeType.RESTORE.getType());
|
||||||
} else {
|
// } else {
|
||||||
changeTypes.add(MemberChangeType.WITHDRAWAL.getType());
|
// changeTypes.add(MemberChangeType.WITHDRAWAL.getType());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!ObjectUtil.equals(user.getUnitid(), source.getUnitid())) {
|
if (!ObjectUtil.equals(user.getUnitid(), source.getUnitid())) {
|
||||||
changeTypes.add(MemberChangeType.UNIT_CHANGE.getType());
|
changeTypes.add(MemberChangeType.UNIT_CHANGE.getType());
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import org.nutz.json.Json;
|
|||||||
import org.nutz.lang.Lang;
|
import org.nutz.lang.Lang;
|
||||||
import org.nutz.lang.Strings;
|
import org.nutz.lang.Strings;
|
||||||
import org.nutz.lang.util.NutMap;
|
import org.nutz.lang.util.NutMap;
|
||||||
|
|
||||||
import javax.servlet.ServletOutputStream;
|
import javax.servlet.ServletOutputStream;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -172,6 +173,9 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<NutMap> oneAuditRecordList = new ArrayList<>();
|
||||||
|
if (StrUtil.isNotBlank(nutMap.getString("caseAuditId"))) {
|
||||||
|
|
||||||
|
|
||||||
Sql oneAuditRecordSql = Sqls.create("""
|
Sql oneAuditRecordSql = Sqls.create("""
|
||||||
SELECT
|
SELECT
|
||||||
@@ -182,7 +186,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
|
|||||||
LEFT JOIN sys_signature sign ON sign.id = pa.signId
|
LEFT JOIN sys_signature sign ON sign.id = pa.signId
|
||||||
where pa.id in (@id)
|
where pa.id in (@id)
|
||||||
""").setParam("id", Json.fromJsonAsList(String.class, nutMap.getString("caseAuditId")));
|
""").setParam("id", Json.fromJsonAsList(String.class, nutMap.getString("caseAuditId")));
|
||||||
List<NutMap> oneAuditRecordList = proposalInfoService.listMap(oneAuditRecordSql);
|
oneAuditRecordList = proposalInfoService.listMap(oneAuditRecordSql);
|
||||||
if (Lang.isNotEmpty(oneAuditRecordList)) {
|
if (Lang.isNotEmpty(oneAuditRecordList)) {
|
||||||
oneAuditRecordList.forEach(v -> {
|
oneAuditRecordList.forEach(v -> {
|
||||||
try {
|
try {
|
||||||
@@ -199,6 +203,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl implements Propos
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Sql branchCaseSql = Sqls.create("select auditId from proposal_branch_leader_audit where proposalId = @proposalId AND isMaster=true").setParam("proposalId", proposalId);
|
Sql branchCaseSql = Sqls.create("select auditId from proposal_branch_leader_audit where proposalId = @proposalId AND isMaster=true").setParam("proposalId", proposalId);
|
||||||
String[] branchCaseArray = (String[]) Daos.query(this.dao(), branchCaseSql.toString(), Sqls.callback.strs());
|
String[] branchCaseArray = (String[]) Daos.query(this.dao(), branchCaseSql.toString(), Sqls.callback.strs());
|
||||||
|
|||||||
+4
@@ -5,6 +5,7 @@ import cn.wizzer.framework.base.Result;
|
|||||||
import cn.wizzer.framework.page.Pagination;
|
import cn.wizzer.framework.page.Pagination;
|
||||||
import io.v.nutz.base.annontation.ViReturn;
|
import io.v.nutz.base.annontation.ViReturn;
|
||||||
import io.v.nutz.base.model.Audit;
|
import io.v.nutz.base.model.Audit;
|
||||||
|
import io.v.nutz.base.utils.Vi;
|
||||||
import io.v.nutz.sys.services.SysLocalProcessService;
|
import io.v.nutz.sys.services.SysLocalProcessService;
|
||||||
import io.v.nutz.web.commons.slog.annotation.SLog;
|
import io.v.nutz.web.commons.slog.annotation.SLog;
|
||||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||||
@@ -79,6 +80,9 @@ public class MemberChangeBranchUnionAuditController {
|
|||||||
} else {
|
} else {
|
||||||
cnd.and("record.applyStateId", "=", 10020);
|
cnd.and("record.applyStateId", "=", 10020);
|
||||||
}
|
}
|
||||||
|
if (!ShiroUtil.hasAnyRoles("sysadmin")){
|
||||||
|
cnd.andEX("unionId", "=", Vi.getUnionId());
|
||||||
|
}
|
||||||
cnd.desc("record.applyDateTime");
|
cnd.desc("record.applyDateTime");
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
|
|||||||
+1
@@ -100,6 +100,7 @@ public class MemberGroupInfoController {
|
|||||||
birthday,
|
birthday,
|
||||||
mobile,
|
mobile,
|
||||||
idcard,
|
idcard,
|
||||||
|
cardNum,
|
||||||
personType,
|
personType,
|
||||||
userState,
|
userState,
|
||||||
unionid,
|
unionid,
|
||||||
|
|||||||
+7
-3
@@ -6,6 +6,8 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HtmlUtil;
|
import cn.hutool.http.HtmlUtil;
|
||||||
import cn.wizzer.framework.page.Pagination;
|
import cn.wizzer.framework.page.Pagination;
|
||||||
|
import com.alibaba.druid.util.StringUtils;
|
||||||
|
import freemarker.template.utility.StringUtil;
|
||||||
import io.v.nutz.base.dao.CndPlus;
|
import io.v.nutz.base.dao.CndPlus;
|
||||||
import io.v.nutz.base.query.PageForm;
|
import io.v.nutz.base.query.PageForm;
|
||||||
import io.v.nutz.base.service.impl.ViServiceImpl;
|
import io.v.nutz.base.service.impl.ViServiceImpl;
|
||||||
@@ -361,9 +363,11 @@ public class MemberCommonServiceImpl extends ViServiceImpl<Sys_user> implements
|
|||||||
|
|
||||||
// 如果有工会关系变更,也需要记录变更了什么工会
|
// 如果有工会关系变更,也需要记录变更了什么工会
|
||||||
history.setChangeInfos(changeList);
|
history.setChangeInfos(changeList);
|
||||||
String changeInfos = changeList.stream().map(v -> {
|
String changeInfos = changeList.stream().map(v ->
|
||||||
return v.getString("fieldName") + ":" + HtmlUtil.cleanHtmlTag(v.getString("sourceValue")) + "->" + HtmlUtil.cleanHtmlTag(v.getString("newValue"));
|
v.getString("fieldName") + ":"
|
||||||
}).collect(Collectors.joining(";"));
|
+ HtmlUtil.cleanHtmlTag(Optional.of(v.getString("sourceValue")).orElse(""))
|
||||||
|
+ "->" + HtmlUtil.cleanHtmlTag(Optional.of(v.getString("newValue")).orElse(""))
|
||||||
|
).collect(Collectors.joining(";"));
|
||||||
history.setChangeInfosStr(changeInfos);
|
history.setChangeInfosStr(changeInfos);
|
||||||
dao().updateIgnoreNull(info);
|
dao().updateIgnoreNull(info);
|
||||||
dao().insert(history);
|
dao().insert(history);
|
||||||
|
|||||||
@@ -105,13 +105,13 @@ layout("/layouts/platform.html"){
|
|||||||
<el-descriptions-item label="在职状态">
|
<el-descriptions-item label="在职状态">
|
||||||
<el-form-item prop="userState">
|
<el-form-item prop="userState">
|
||||||
<dict-select v-model="formData.userState" code="USER_STATE"
|
<dict-select v-model="formData.userState" code="USER_STATE"
|
||||||
disabled style="width: 100%"></dict-select>
|
style="width: 100%"></dict-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="人员类型">
|
<el-descriptions-item label="人员类型">
|
||||||
<el-form-item prop="personType">
|
<el-form-item prop="personType">
|
||||||
<dict-select v-model="formData.personType" code="PERSON_TYPE"
|
<dict-select v-model="formData.personType" code="PERSON_TYPE"
|
||||||
disabled style="width: 100%"></dict-select>
|
style="width: 100%"></dict-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item></el-descriptions-item>
|
<el-descriptions-item></el-descriptions-item>
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ const MEMBER_CHANGE = {
|
|||||||
getUnionName(val){
|
getUnionName(val){
|
||||||
const data = this.units.find(v => v.id === val)
|
const data = this.units.find(v => v.id === val)
|
||||||
this.$set(this.formData, 'unionName', data ? data.unionname : '')
|
this.$set(this.formData, 'unionName', data ? data.unionname : '')
|
||||||
|
this.$set(this.formData, 'unionId', data ? data.unionid : '')
|
||||||
},
|
},
|
||||||
allowFields(prop) {
|
allowFields(prop) {
|
||||||
return !this.allowChangeFields.map(v => v.code).includes(prop)
|
return !this.allowChangeFields.map(v => v.code).includes(prop)
|
||||||
|
|||||||
@@ -957,8 +957,10 @@ layout("/layouts/platform.html"){
|
|||||||
this.unions = await getUnionList()
|
this.unions = await getUnionList()
|
||||||
this.units = await getUnits()
|
this.units = await getUnits()
|
||||||
} else {
|
} else {
|
||||||
|
debugger
|
||||||
|
const user = JSON.parse(window.sessionStorage.getItem('user'))
|
||||||
this.unions = await getUnionList()
|
this.unions = await getUnionList()
|
||||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
this.$set(this.pageForm, "unionId", user.union ? user.union.id : null)
|
||||||
this.flushUnits()
|
this.flushUnits()
|
||||||
}
|
}
|
||||||
this.unitMoveUnions = clone(this.unions)
|
this.unitMoveUnions = clone(this.unions)
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||||
{prop: 'mobile', label: '联系电话'},
|
{prop: 'mobile', label: '联系电话'},
|
||||||
{prop: 'idcard', label: '身份证号', width: 170},
|
{prop: 'idcard', label: '身份证号', width: 170},
|
||||||
|
{prop: 'cardNum', label: '会员服务卡号', width: 170},
|
||||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||||
{prop: 'personType', label: '人员类型', sortable: true},
|
{prop: 'personType', label: '人员类型', sortable: true},
|
||||||
|
|||||||
@@ -629,6 +629,7 @@ layout("/layouts/platform.html"){
|
|||||||
{prop: 'birthday', label: '出生年月', sortable: true},
|
{prop: 'birthday', label: '出生年月', sortable: true},
|
||||||
{prop: 'mobile', label: '联系电话'},
|
{prop: 'mobile', label: '联系电话'},
|
||||||
{prop: 'idcard', label: '身份证号', width: 170},
|
{prop: 'idcard', label: '身份证号', width: 170},
|
||||||
|
{prop: 'cardNum', label: '会员服务卡号', width: 170},
|
||||||
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
{prop: 'position', label: '职务', sortable: true, checked: 0},
|
||||||
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
|
||||||
{prop: 'userState', label: '在职状态', sortable: true},
|
{prop: 'userState', label: '在职状态', sortable: true},
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-input type="text" maxlength="19"
|
<el-input type="text" maxlength="19"
|
||||||
placeholder="请输入会员服务卡卡号"
|
placeholder="请输入会员服务卡卡号"
|
||||||
oninput="value = value.replace(/\s/g, '')"
|
oninput="value = value.replace(/\s/g, '')"
|
||||||
v-model.trim="editUserData.cardNum"></el-input>
|
v-model.trim="editUserData.cardNum" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
|
|||||||
Reference in New Issue
Block a user