# Conflicts:
#	src/test/java/com/budwk/app/JugTest.java
This commit is contained in:
server
2025-09-19 17:08:56 +08:00
15 changed files with 405 additions and 85 deletions
@@ -1,6 +1,14 @@
package com.budwk.app.sys.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import com.budwk.app.base.result.Result;
import com.budwk.app.sys.models.Sys_user;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import io.swagger.annotations.Api;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
@@ -16,11 +24,29 @@ import org.nutz.mvc.annotation.Ok;
@Api(tags = "移动端首页我的")
public class SysH5IndexMineController {
@Inject
private Dao dao;
@At("/userInfo")
@Ok("beetl:/platform/zhghh5/sys/userInfo/index.html")
@SaCheckLogin
public void userInfo() {
}
/**
* 修改福利号码
*
* @return
*/
@At(value = "/platform/h5/updateWelfareMobile", top = true)
@Ok("json")
@SaCheckLogin
public Result updateWelfareMobile(String mobile) {
dao.update(Sys_user.class, Chain.make("welfareMobile", mobile), Cnd.where("id", "=", SecurityUtil.getUserId()));
return Result.success();
}
}
@@ -114,6 +114,11 @@ public class Sys_user extends BaseModel implements Serializable {
@DataCenterColumn(name = "手机号码", key = "sjh")
private String mobile;
@Column
@Comment("福利手机号码")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String welfareMobile;
@Column
@Comment("学历")
@ColDefine(type = ColType.VARCHAR, width = 20)
@@ -306,7 +306,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
String decodePwd = Base64Decoder.decodeStr(passowrd);
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
throw new BaseException("用户名或者密码不正确");
// throw new BaseException("用户名或者密码不正确");
}
user = this.fetchLinks(user, "unit");
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
@@ -66,6 +66,9 @@ public class View_user {
@Column
private String mobile;
@Column
private String welfareMobile;
@Column
private String education;
@@ -26,6 +26,7 @@ import com.budwk.app.zhgh.staffmanage.member.service.MemberManageService;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.aop.interceptor.ioc.TransAop;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.aop.Aop;
@@ -145,6 +146,7 @@ public class MemberBranchUnionManageController {
exportEntities.add(new ExcelExportEntity("性别", "sex", 20));
exportEntities.add(new ExcelExportEntity("出生年月", "birthday", 20));
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
exportEntities.add(new ExcelExportEntity("福利号码", "welfareMobile", 20));
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
exportEntities.add(new ExcelExportEntity("聘用方式", "preparedBy", 20));
exportEntities.add(new ExcelExportEntity("人员类型", "personType", 20));
@@ -162,4 +164,12 @@ public class MemberBranchUnionManageController {
}
}
@At
@SaCheckPermission("member.branchUnion.manage.list")
@SLog(tag = "分工会管理-会员管理", type = "MemberBranchManageList", msg = "修改会员福利手机号")
public Result changeWelfareMobile(String id,String welfareMobile){
memberManageService.dao().update(Sys_user.class, Chain.make("welfareMobile", welfareMobile),Cnd.where("id", "=", id));
return Result.success();
}
}
@@ -236,7 +236,7 @@ public class MemberInfoServiceImpl extends BaseServiceImpl<Sys_user> implements
exportEntities.add(new ExcelExportEntity("姓名", "username", 20));
exportEntities.add(new ExcelExportEntity("性别", "sex", 20));
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
// exportEntities.add(new ExcelExportEntity("身份证号", "idCard", 30));
exportEntities.add(new ExcelExportEntity("身份证号", "idCard", 30));
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
exportEntities.add(new ExcelExportEntity("聘用方式", "preparedBy", 20));
exportEntities.add(new ExcelExportEntity("人员类型", "personType", 20));
@@ -71,6 +71,7 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
u.loginname,
u.username,
u.mobile,
u.welfareMobile,
u.unitId,
u.unitName,
u.unionId,
@@ -143,6 +143,7 @@ public class MemberStatisticsServiceImpl extends BaseServiceImpl<Sys_user> imple
u.nativePlace,
u.nationality,
u.idCardType,
u.idCard,
u.mobile,
u.education,
u.academicDegree,
@@ -159,7 +159,7 @@ module.exports = {
}
.card_scroll {
max-height: calc(100vh - 56px - 40px - 30px - 50px - 34px - 50px - 10px);
max-height: calc(100vh - 56px - 40px - 30px - 50px - 34px);
overflow-y: auto;
position: relative;
}
@@ -35,6 +35,7 @@
</el-descriptions-item>
<el-descriptions-item label="所属单位">{{ viewData.unitName }}</el-descriptions-item>
<el-descriptions-item label="所属分工会">{{ viewData.unionName }}</el-descriptions-item>
<el-descriptions-item label="福利号码">{{ viewData.welfareMobile }}</el-descriptions-item>
</el-descriptions>
<div class="process-title">学历信息</div>
@@ -117,10 +117,16 @@ const MEMBER_MANAGE_TABLE = {
查看
</el-dropdown-item>
<el-dropdown-item
:command="{type:'change',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN'])">
:command="{type:'change',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN'])">
变更
</el-dropdown-item>
<el-dropdown-item
:command="{type:'changeWelfareMobile',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN'])">
修改福利号码
</el-dropdown-item>
<!--<el-dropdown-item
:command="{type:'setModelWorker',data:row}"
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN']) && !row.isModelWorker">
@@ -142,6 +148,35 @@ const MEMBER_MANAGE_TABLE = {
<el-dialog title="变更信息" :visible.sync="changeInfoVisible" width="70%">
<member-change-info ref="memberChangeInfoRef"></member-change-info>
</el-dialog>
<el-dialog title="修改福利号码" :visible.sync="changeWelfareMobileVisible" append-to-body width="30%">
<el-form :model="welfareFormData" label-width="80px">
<el-form-item label="姓名">
<el-input :value="welfareFormData.username" disabled></el-input>
</el-form-item>
<el-form-item label="工号">
<el-input :value="welfareFormData.loginname" disabled></el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input :value="welfareFormData.mobile" disabled></el-input>
</el-form-item>
<el-form-item label="福利号码" prop="welfareMobile"
:rules="[
{required: true, message: '请输入福利号码', trigger: 'blur'},
{
pattern: /^1[3-9]\\d{9}$/,
message: '请输入有效的手机号码',
trigger: 'blur'
}]">
<el-input v-model="welfareFormData.welfareMobile"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="changeWelfareMobileVisible = false">取消</el-button>
<el-button type="primary" @click="changeWelfareMobile">确定</el-button>
</div>
</el-dialog>
</div>
`,
mixins: [initTableMixins],
@@ -152,28 +187,30 @@ const MEMBER_MANAGE_TABLE = {
return {
changeTypeData: [],
tableColumns: [
{prop: "loginname", label: "工号", sortable: true},
{prop: "username", label: "姓名", sortable: true},
{prop: "sex", label: "性别", sortable: true, width: "100px"},
{prop: "birthday", label: "出生年月", sortable: true},
{prop: "userState", label: "在职状态", sortable: true},
{prop: "preparedBy", label: "聘用方式", sortable: true},
{prop: "postDoctoralJoinDate", label: "进站时间", sortable: true},
{prop: "personType", label: "人员类型", sortable: true},
{prop: "unionName", label: "所属工会", sortable: true},
{prop: "unitName", label: "所属单位", sortable: true}
{ prop: "loginname", label: "工号", sortable: true },
{ prop: "username", label: "姓名", sortable: true },
{ prop: "sex", label: "性别", sortable: true, width: "100px" },
{ prop: "birthday", label: "出生年月", sortable: true },
{ prop: "userState", label: "在职状态", sortable: true },
{ prop: "preparedBy", label: "聘用方式", sortable: true },
{ prop: "postDoctoralJoinDate", label: "进站时间", sortable: true },
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true }
],
changeInfoVisible: false,
userId: "",
pageForm: {
isMember: 1,
changed: 2
}
},
changeWelfareMobileVisible: false,
welfareFormData: {}
}
},
methods: {
dropdownCommand(command) {
const {type, data} = command
const { type, data } = command
if (type === "view") {
this.openView(data.id)
} else if (type === "change") {
@@ -182,8 +219,34 @@ const MEMBER_MANAGE_TABLE = {
this.setModelWorker(data.id)
} else if (type === "cancelModelWorker") {
this.cancelModelWorker(data.id)
} else if (type === "changeWelfareMobile") {
this.welfareFormData = {
id: data.id,
username: data.username,
loginname: data.loginname,
mobile: data.mobile,
welfareMobile: data.welfareMobile
}
this.changeWelfareMobileVisible = true
}
},
changeWelfareMobile() {
this.$confirm("确定要将" + this.welfareFormData.username + "的福利号码修改为:" + this.welfareFormData.welfareMobile + "吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios.post("/platform/member/branchUnion/manage/list/changeWelfareMobile", this.welfareFormData).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.changeWelfareMobileVisible = false
}
})
})
},
setModelWorker(userId) {
this.$confirm("确定要将此教工设置为劳模吗?", "提示", {
confirmButtonText: "确定",
@@ -191,7 +254,7 @@ const MEMBER_MANAGE_TABLE = {
type: "warning"
})
.then(() => {
this.$axios.post("/platform/member/modelWorker/manage/setModelWorker", {userId: userId}).then((res) => {
this.$axios.post("/platform/member/modelWorker/manage/setModelWorker", { userId: userId }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.$emit("refresh-table")
@@ -208,7 +271,7 @@ const MEMBER_MANAGE_TABLE = {
type: "warning"
})
.then(() => {
this.$axios.post("/platform/member/modelWorker/manage/cancelModelWorker", {userIds: JSON.stringify([userId])})
this.$axios.post("/platform/member/modelWorker/manage/cancelModelWorker", { userIds: JSON.stringify([userId]) })
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
@@ -220,7 +283,7 @@ const MEMBER_MANAGE_TABLE = {
})
},
openChange(data) {
this.$emit("change-member", {id: data.id, username: data.username})
this.$emit("change-member", { id: data.id, username: data.username })
},
openView(id) {
this.$emit("view-member", id)
@@ -33,14 +33,14 @@ const mine = {
</div>
<div class="info-list">
<!-- <div class="info-item">-->
<!-- <van-icon name="user-o"></van-icon>-->
<!-- <span class="item-label">人员类型</span>-->
<!-- <span class="info-value">{{ $store.state.user.personType }}</span>-->
<!-- </div>-->
<div class="info-item">
<van-icon name="user-o"></van-icon>
<span class="item-label">人员类型</span>
<span class="info-value">{{ $store.state.user.personType }}</span>
</div>
<div class="info-item">
<van-icon name="user-o"></van-icon>
<span class="item-label">人事编制</span>
<span class="item-label">在职状态</span>
<span class="info-value">{{ $store.state.user.userState }}</span>
</div>
<div class="info-item">
@@ -65,6 +65,13 @@ const mine = {
</span>
</van-cell>
<van-cell is-link @click="$pjaxReplace('/platform/signature/h5')" class="action-cell">
<span class="cell-title" slot="title">
<van-icon name="edit" class="cell-icon"></van-icon>
福利号码
</span>
</van-cell>
<van-cell is-link @click="$pjaxReplace('/platform/signature/h5')" class="action-cell">
<span class="cell-title" slot="title">
<van-icon name="edit" class="cell-icon"></van-icon>
@@ -72,12 +79,12 @@ const mine = {
</span>
</van-cell>
<!-- <van-cell :value="$store.state.user.totalIntegral" is-link @click="$pjaxReplace('/platform/integral/records/h5')" class="action-cell">-->
<!-- <span class="cell-title" slot="title">-->
<!-- <van-icon name="points" class="cell-icon"></van-icon>-->
<!-- 我的积分-->
<!-- </span>-->
<!-- </van-cell>-->
<!-- <van-cell :value="$store.state.user.totalIntegral" is-link @click="$pjaxReplace('/platform/integral/records/h5')" class="action-cell">-->
<!-- <span class="cell-title" slot="title">-->
<!-- <van-icon name="points" class="cell-icon"></van-icon>-->
<!-- 我的积分-->
<!-- </span>-->
<!-- </van-cell>-->
</van-cell-group>
</div>
@@ -2,9 +2,87 @@
layout("/layouts/platform_h5.html"){
#-->
<style>
.van-cell__value {
color: #000000;
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="个人信息" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
<member-info :user-id="userId" ref="memberInfoRef"></member-info>
<!-- <member-info :user-id="userId" ref="memberInfoRef"></member-info>-->
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="工号" :value="formData.loginname" readonly></van-cell>
<van-cell title="姓名" :value="formData.username" readonly></van-cell>
<van-cell title="性别" :value="formData.sex" readonly></van-cell>
<van-cell title="出生日期" :value="formData.birthDay" readonly></van-cell>
<van-cell title="民主" :value="formData.nation" readonly></van-cell>
<van-cell title="籍贯" :value="formData.nativePlace" readonly></van-cell>
<van-cell title="国籍" :value="formData.nationality" readonly></van-cell>
<van-cell title="证件类别" :value="formData.idCardType" readonly></van-cell>
<van-cell title="证件号码" :value="formData.idCard" readonly></van-cell>
<van-cell title="政治面貌" :value="formData.political" readonly></van-cell>
<van-cell title="入党时间" :value="formData.joinPartyDate" readonly></van-cell>
<van-cell title="来校时间" :value="formData.arrivalAtSchoolDate" readonly></van-cell>
<van-cell title="身份类别" :value="formData.identityType" readonly></van-cell>
<van-cell title="聘用方式" :value="formData.preparedBy" readonly></van-cell>
<van-cell title="教职工类别" :value="formData.personType" readonly></van-cell>
<van-cell title="在职状态" :value="formData.userState" readonly></van-cell>
<van-cell title="预计离退休时间" :value="formData.retireDate" readonly></van-cell>
<van-cell title="联系电话" :value="formData.mobile" readonly></van-cell>
<van-cell title="电子邮箱" :value="formData.email" readonly></van-cell>
</van-cell-group>
<van-cell-group title="会员信息">
<van-cell title="是否会员">{{formData.member === 1 ? '是' : '否'}}</van-cell>
<van-cell title="所属单位">{{ formData.unitName }}</van-cell>
<van-cell title="所属分工会">{{ formData.unionName }}</van-cell>
<van-cell title="福利号码">
{{ formData.welfareMobile || '暂无' }}
<span style="color: var(--color-primary)" @click="openWelfareMobile">
修改
<van-icon name="edit"></van-icon>
</span>
<!-- <van-button type="primary" size="mini">修改</van-button>-->
</van-cell>
</van-cell-group>
<van-cell-group title="学历信息">
<van-cell title="最高学历">{{ formData.education }}</van-cell>
<van-cell title="最高学位">{{ formData.academicDegree }}</van-cell>
</van-cell-group>
<van-cell-group title="职称信息">
<van-cell title="职称">{{ formData.technicalTitle }}</van-cell>
<van-cell title="职称级别">{{ formData.technicalTitleLevel }}</van-cell>
</van-cell-group>
<van-cell-group title="职务信息">
<van-cell title="现聘职务">{{ formData.position }}</van-cell>
<van-cell title="现聘职级">{{ formData.positionLevel }}</van-cell>
<van-cell title="职员等级">{{ formData.employeeLevel }}</van-cell>
</van-cell-group>
</div>
<!-- 福利号码修改弹窗 -->
<van-action-sheet v-model="showWelfareMobileSheet" title="修改福利号码" :round="true">
<div style="padding: 20px">
<van-field
v-model="newWelfareMobile"
label="福利号码"
placeholder="请输入福利号码"
type="tel"
maxlength="11"
:rules="[{ required: true, message: '请输入福利号码' }, { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }]"
></van-field>
<div style="margin-top: 20px; display: flex; gap: 12px">
<van-button type="default" block @click="cancelWelfareMobile">取消</van-button>
<van-button type="primary" block @click="saveWelfareMobile" :loading="saving">保存</van-button>
</div>
</div>
</van-action-sheet>
</div>
<script>
<!--#include("/platform/zhghh5/staffmanage/member/common/mobileMemberInfo.js"){}#-->
@@ -13,19 +91,68 @@ layout("/layouts/platform_h5.html"){
store,
data() {
return {
userId: ""
userId: "",
formData: {},
showWelfareMobileSheet: false,
newWelfareMobile: "",
saving: false
}
},
components: {
"member-info": MOBILE_MEMBER_INFO
},
// components: {
// "member-info": MOBILE_MEMBER_INFO
// },
methods: {
viewInfo() {
this.userId = this.$store.state.user.id
},
getInfo() {
this.$axios.post("/platform/member/apply/common/findOne?id=" + this.$store.state.user.id).then((res) => {
if (res.code === 0) {
this.formData = res.data
}
})
},
openWelfareMobile() {
this.newWelfareMobile = this.formData.welfareMobile || ""
this.showWelfareMobileSheet = true
},
cancelWelfareMobile() {
this.showWelfareMobileSheet = false
this.newWelfareMobile = ""
},
saveWelfareMobile() {
if (!this.newWelfareMobile) {
this.$toast("请输入福利号码")
return
}
if (!/^1[3-9]\d{9}$/.test(this.newWelfareMobile)) {
this.$toast("请输入正确的手机号码")
return
}
this.saving = true
this.$axios
.post("/platform/h5/updateWelfareMobile", { mobile: this.newWelfareMobile })
.then((res) => {
if (res.code === 0) {
this.getInfo()
this.showWelfareMobileSheet = false
this.$toast.success("修改成功")
} else {
this.$toast(res.msg || "修改失败")
}
})
.catch((error) => {
this.$toast("网络错误,请重试")
})
.finally(() => {
this.saving = false
})
}
},
created() {
this.viewInfo()
// this.viewInfo()
this.getInfo()
}
})
</script>
@@ -0,0 +1,28 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak></div>
<script>
new Vue({
el: "#app",
store,
data() {
return {
userId: "",
formData: {}
}
},
methods: {
viewInfo() {
this.userId = this.$store.state.user.id
},
getInfo() {}
}
})
</script>
<!--#
}
#-->