server_commit

This commit is contained in:
zhengziru
2025-06-11 10:39:26 +08:00
parent 005b66b183
commit 8457290438
10 changed files with 140 additions and 116 deletions
@@ -79,7 +79,7 @@ public class SysWechatController {
@Ok("re") @Ok("re")
public String oauth(@Param("redirectUrl") String redirectUrl) { public String oauth(@Param("redirectUrl") String redirectUrl) {
// String redirect = Globals.AppDomain + "platform/wechat/getCode"; // String redirect = Globals.AppDomain + "platform/wechat/getCode";
String redirect = "http://zhgh.hrbnu.edu.cn/platform/wechat/getCode"; String redirect = "https://zhgh.hrbnu.edu.cn/platform/wechat/getCode";
if (StrUtil.isNotBlank(redirectUrl)) { if (StrUtil.isNotBlank(redirectUrl)) {
redirect += "?redirect=" + redirectUrl; redirect += "?redirect=" + redirectUrl;
} }
@@ -129,8 +129,10 @@ public class SysWechatController {
log.error(">>> openid 加密失败:{}", openid); log.error(">>> openid 加密失败:{}", openid);
} }
try { try {
return ">>:" + Globals.AppDomain + "mobile/login?state=" + URLEncoder.encode(encrypt, "UTF-8"); // return ">>:" + Globals.AppDomain + "mobile/login?state=" + URLEncoder.encode(encrypt, "UTF-8");
} catch (UnsupportedEncodingException e) { // return ">>:" + "http://zhgh.hrbnu.edu.cn/mobile/login?state=" + URLEncoder.encode(encrypt, "UTF-8");
return ">>:" + "https://zhgh.hrbnu.edu.cn/mobile/login?state=" + openid;
} catch (Exception e) {
log.error(">>> 请求转发失败:{}", openid); log.error(">>> 请求转发失败:{}", openid);
} }
} }
@@ -142,16 +144,16 @@ public class SysWechatController {
if (StrUtil.isNotBlank(redirect)) { if (StrUtil.isNotBlank(redirect)) {
return ">>:" + redirect; return ">>:" + redirect;
} }
return ">>:" + Globals.AppDomain + "/mobile/index"; return ">>:" + "https://zhgh.hrbnu.edu.cn/mobile/index";
} catch (LockedAccountException e) { } catch (LockedAccountException e) {
request.setAttribute("errMsg", "帐号被锁定,请5分钟后再试"); request.setAttribute("errMsg", "帐号被锁定,请5分钟后再试");
return ">>:" + Globals.AppDomain + "/platform/home/LockedAccountError"; return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/home/LockedAccountError";
} catch (UnknownAccountException e) { } catch (UnknownAccountException e) {
request.setAttribute("errMsg", "系统中没有此用户"); request.setAttribute("errMsg", "系统中没有此用户");
return ">>:" + Globals.AppDomain + "/error/UnknownAccountError.html"; return ">>:" + "https://zhgh.hrbnu.edu.cn/error/UnknownAccountError.html";
} catch (Exception e) { } catch (Exception e) {
request.setAttribute("errMsg", "用户名或密码错误"); request.setAttribute("errMsg", "用户名或密码错误");
return ">>:" + Globals.AppDomain + "/error/500.html"; return ">>:" + "https://zhgh.hrbnu.edu.cn/error/500.html";
} }
} }
@@ -164,8 +166,8 @@ public class SysWechatController {
System.out.println(state); System.out.println(state);
int errCount = NumberUtils.toInt(Strings.sNull(SecurityUtils.getSubject().getSession(true).getAttribute("platformErrCount"))); int errCount = NumberUtils.toInt(Strings.sNull(SecurityUtils.getSubject().getSession(true).getAttribute("platformErrCount")));
try { try {
String decrypt = weChatUtils.decrypt(state); // String decrypt = weChatUtils.decrypt(state);
loginUtil.doLogin(token, request, session, LoginUtil.LoginOrigin.WEI_XIN, decrypt); loginUtil.doLogin(token, request, session, LoginUtil.LoginOrigin.WEI_XIN, state);
return Result.success("login.success"); return Result.success("login.success");
} catch (CaptchaIncorrectException e) { } catch (CaptchaIncorrectException e) {
return Result.error(1, "login.error.captcha"); return Result.error(1, "login.error.captcha");
@@ -86,7 +86,8 @@ public class HealthCheckupListController {
@Param(value = "unitId", required = false) String unitId, @Param(value = "unitId", required = false) String unitId,
@Param(value = "isChoose", required = false) Integer isChoose, @Param(value = "isChoose", required = false) Integer isChoose,
@Param(value = "threeUnitId", required = false) String threeUnitId, @Param(value = "threeUnitId", required = false) String threeUnitId,
@Param(value = "unionGroupId", required = false) String unionGroupId) { @Param(value = "unionGroupId", required = false) String unionGroupId,
@Param(value = "isHomeGo", required = false) String isHomeGo) {
List<HealthCheckupUnionConfirm> confirms = dao.query(HealthCheckupUnionConfirm.class, Cnd.where("projectId", "=", projectId)); List<HealthCheckupUnionConfirm> confirms = dao.query(HealthCheckupUnionConfirm.class, Cnd.where("projectId", "=", projectId));
HealthCheckupProject project = healthCheckupProjectService.findOne(projectId); HealthCheckupProject project = healthCheckupProjectService.findOne(projectId);
@@ -113,15 +114,22 @@ public class HealthCheckupListController {
AND hcus.projectId = @projectId AND hcus.projectId = @projectId
$condition $condition
""").setParam("projectId", projectId); """).setParam("projectId", projectId);
sql.setCondition(cnd);
cnd.andEX("hcu.projectId", "=", projectId); cnd.andEX("hcu.projectId", "=", projectId);
cnd.andEX("hcu.unionId", "=", unionId); cnd.andEX("hcu.unionId", "=", unionId);
cnd.andEX("hcu.unitId", "=", unitId); cnd.andEX("hcu.unitId", "=", unitId);
cnd.andEX("hcu.unionGroupId", "=", unionGroupId); cnd.andEX("hcu.unionGroupId", "=", unionGroupId);
cnd.andEX("hcu.threeUnitId", "=", threeUnitId); cnd.andEX("hcu.threeUnitId", "=", threeUnitId);
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) { if (StrUtil.isNotBlank(isHomeGo)) {
cnd.andEX("hcu.unionId", "=", Vi.getUnionId()); cnd.and("hcu.userId", "=", ShiroUtil.getUserId());
} else {
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
if (!ShiroUtil.hasAnyRoles("H04,gh12")) {
cnd.and("hcu.userId", "=", ShiroUtil.getUserId());
} else {
cnd.and("hcu.unionId", "=", Vi.getUnionId());
}
}
} }
switch (isChoose) { switch (isChoose) {
@@ -138,6 +146,7 @@ public class HealthCheckupListController {
} else { } else {
cnd.asc("hcu.sort").desc("hcus.selectTime"); cnd.asc("hcu.sort").desc("hcus.selectTime");
} }
sql.setCondition(cnd);
Pagination pagination = healthCheckupProjectService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); Pagination pagination = healthCheckupProjectService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
List<NutMap> paginationList = pagination.getList(); List<NutMap> paginationList = pagination.getList();
@@ -372,7 +381,7 @@ public class HealthCheckupListController {
cnd.and(seg); cnd.and(seg);
} }
cnd.groupBy("hcu.userId"); cnd.groupBy("hcu.userId");
cnd.desc("hcus.selectTime").asc("hcu.unitId"); cnd.asc("hcu.sort").desc("hcus.selectTime").asc("hcu.unitId");
List<NutMap> resultList = healthCheckupProjectService.listMap(sql); List<NutMap> resultList = healthCheckupProjectService.listMap(sql);
@@ -37,6 +37,7 @@ public class HealthCheckupSingleServiceImpl extends ViServiceImpl<HealthCheckupP
uc.unionId AS id, uc.unionId AS id,
uc.unionName AS unionname, uc.unionName AS unionname,
uc.unionCode AS unioncode, uc.unionCode AS unioncode,
uc.isAudit,
SUM(IF(u.id is not null,1,0)) AS sumCount SUM(IF(u.id is not null,1,0)) AS sumCount
FROM FROM
health_checkup_union_confirm uc health_checkup_union_confirm uc
@@ -180,7 +180,11 @@ public class mobileLoginController {
@Ok("re") @Ok("re")
public String clearWxOpenId() { public String clearWxOpenId() {
try { try {
sysUserService.update(Chain.make("openId", null), Cnd.where("id", "=", ShiroUtil.getPrincipalProperty("id"))); Sys_user sourceUser = sysUserService.dao().fetch(Sys_user.class, Cnd.where("id", "=", ShiroUtil.getUserId()));
sysUserService.update(Chain.make("openId", null)
.add("password",PwdUtil.doSm4CbcEncrypt(sourceUser.getLoginname()))
.add("weAppLoginCount", 0),
Cnd.where("id", "=", ShiroUtil.getUserId()));
Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
Sys_user user = (Sys_user) subject.getPrincipal(); Sys_user user = (Sys_user) subject.getPrincipal();
subject.logout(); subject.logout();
@@ -673,8 +673,8 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
SELECT SELECT
u.loginname, u.loginname,
u.username, u.username,
IF(staffUnion.id IS NOT NULL, staffUnion.id, vwl.welfareUnitId) AS unionid, vwl.welfareUnitId AS unionid,
IF(staffUnion.id IS NOT NULL, staffUnion.unionname, gh.unionname) AS unionname, gh.unionname AS unionname,
vwl.welfareSecondLevelUnitId as unitid, vwl.welfareSecondLevelUnitId as unitid,
dw.`name` as unitname, dw.`name` as unitname,
wpus.userSign, wpus.userSign,
@@ -682,8 +682,6 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
wpus.selectNum wpus.selectNum
FROM FROM
welfare_list vwl welfare_list vwl
LEFT JOIN special_staff staff ON staff.userId = vwl.userId
LEFT JOIN sys_union staffUnion ON staff.unionRelationUnionId = staffUnion.id
LEFT JOIN sys_user u ON u.id = vwl.userId LEFT JOIN sys_user u ON u.id = vwl.userId
LEFT JOIN sys_union gh ON gh.id = vwl.welfareUnitId LEFT JOIN sys_union gh ON gh.id = vwl.welfareUnitId
LEFT JOIN sys_unit dw ON dw.id = vwl.welfareSecondLevelUnitId LEFT JOIN sys_unit dw ON dw.id = vwl.welfareSecondLevelUnitId
@@ -691,7 +689,7 @@ public class WelfareSingleServiceImpl extends ViServiceImpl<WelfareProject> impl
AND wpus.welfareId = @projectId AND wpus.welfareId = @projectId
WHERE WHERE
projectId = @projectId projectId = @projectId
AND (vwl.welfareUnitId = @unionId OR staffUnion.id = @unionId) AND vwl.welfareUnitId = @unionId
order by vwl.welfareUnitId,vwl.welfareSecondLevelUnitId order by vwl.welfareUnitId,vwl.welfareSecondLevelUnitId
"""); """);
@@ -181,26 +181,26 @@ layout("/mobile/platform.html"){
v-model="formData.username" v-model="formData.username"
:rules="[{ required: true }]" :rules="[{ required: true }]"
></van-field> ></van-field>
<van-field <!-- <van-field-->
required <!-- required-->
readonly <!-- readonly-->
label="性别" <!-- label="性别"-->
name="sex" <!-- name="sex"-->
placeholder="输入身份证后自动匹配" <!-- placeholder="输入身份证后自动匹配"-->
:rules="[{ required: true }]" <!-- :rules="[{ required: true }]"-->
v-model="formData.sex" <!-- v-model="formData.sex"-->
></van-field> <!-- ></van-field>-->
<van-field <!-- <van-field-->
label="年龄" <!-- label="年龄"-->
name="age" <!-- name="age"-->
required <!-- required-->
readonly <!-- readonly-->
placeholder="输入身份证后自动计算" <!-- placeholder="输入身份证后自动计算"-->
type="digit" <!-- type="digit"-->
:rules="[{ required: true }]" <!-- :rules="[{ required: true }]"-->
v-model="formData.age" <!-- v-model="formData.age"-->
></van-field> <!-- ></van-field>-->
<span style="font-size: 13px; margin-left: 1.4vh; color: #bc2a25">输入身份证后自动匹配性别和年龄</span> <!-- <span style="font-size: 13px; margin-left: 1.4vh; color: #bc2a25">输入身份证后自动匹配性别和年龄</span>-->
<van-field <van-field
label="联系方式" label="联系方式"
name="mobile" name="mobile"
+5 -5
View File
@@ -691,11 +691,11 @@ layout("/mobile/platform.html"){
}, },
// 获取微信端的登录次数 // 获取微信端的登录次数
async getWeAppLoginCount() { async getWeAppLoginCount() {
const resp = await $.post("/mobile/login/checkIsFirstLogin") // const resp = await $.post("/mobile/login/checkIsFirstLogin")
this.formData.isFirstLogin = resp.code !== 0 // this.formData.isFirstLogin = resp.code !== 0
if (this.formData.isFirstLogin) { // if (this.formData.isFirstLogin) {
this.updatePwdShow = true // this.updatePwdShow = true
} // }
} }
}, },
beforeMount() { beforeMount() {
@@ -30,76 +30,80 @@ layout("/layouts/platform.html"){
</div> </div>
</div> </div>
<div class="search-item"> <template v-if="!pageForm.isHomeGo">
<div class="search-item-label">职工信息:</div>
<div class="search-item-option">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入内容"
style="width: 100%"
v-model="pageForm.searchKeyword"
>
<el-select slot="prepend" style="width: 80px" v-model="pageForm.searchName">
<el-option label="姓名" value="hcu.username"></el-option>
<el-option label="工号" value="hcu.loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select
@change="flushUnits();doSearch()"
@clear="flushUnits"
clearable
filterable="true"
placeholder="请选择所属工会"
style="width: 100%"
v-model="pageForm.unionId"
>
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select clearable filterable placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</div>
</div>
<template v-if="isThreeUnit">
<div class="search-item"> <div class="search-item">
<div class="search-item-label">工会小组:</div> <div class="search-item-label">职工信息:</div>
<div class="search-item-option">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入内容"
style="width: 100%"
v-model="pageForm.searchKeyword"
>
<el-select slot="prepend" style="width: 80px" v-model="pageForm.searchName">
<el-option label="姓名" value="hcu.username"></el-option>
<el-option label="工号" value="hcu.loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item" v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option"> <div class="search-item-option">
<el-select <el-select
@change="getThreeUnits" @change="flushUnits();doSearch()"
clearable @clear="flushUnits"
filterable clearable
placeholder="请选择" filterable="true"
style="width: 100%" placeholder="请选择所属工会"
v-model="pageForm.unionGroupId" style="width: 100%"
v-model="pageForm.unionId"
> >
<el-option :key="item.id" :label="item.groupName" :value="item.id" v-for="item in unionGroups"></el-option> <el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">
<div class="search-item-label">组成科室:</div> <div class="search-item-label">所属单位:</div>
<div class="search-item-option"> <div class="search-item-option">
<el-select clearable filterable placeholder="请选择" style="width: 100%" v-model="pageForm.threeUnitId"> <el-select clearable filterable placeholder="所属单位" style="width: 100%" v-model="pageForm.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in threeUnits"></el-option> <el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
<template v-if="isThreeUnit">
<div class="search-item">
<div class="search-item-label">工会小组:</div>
<div class="search-item-option">
<el-select
@change="getThreeUnits"
clearable
filterable
placeholder="请选择"
style="width: 100%"
v-model="pageForm.unionGroupId"
>
<el-option :key="item.id" :label="item.groupName" :value="item.id" v-for="item in unionGroups"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">组成科室:</div>
<div class="search-item-option">
<el-select clearable filterable placeholder="请选择" style="width: 100%" v-model="pageForm.threeUnitId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in threeUnits"></el-option>
</el-select>
</div>
</div>
</template>
</template> </template>
<div class="search-query"> <div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button> <el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div> </div>
@@ -109,16 +113,18 @@ layout("/layouts/platform.html"){
<el-card class="mt10" shadow="never"> <el-card class="mt10" shadow="never">
<table-tool :app="this" label="体检项目"> <table-tool :app="this" label="体检项目">
<template #func> <template #func>
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isChoose"> <template v-if="!pageForm.isHomeGo && ${@shiro.hasRole('sysadmin')||@shiro.hasRole('H04')||@shiro.hasRole('gh12')}">
<el-radio-button :label="0">全部</el-radio-button> <el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isChoose">
<el-radio-button :label="1">已选择</el-radio-button> <el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="2">未选择</el-radio-button> <el-radio-button :label="1">已选择</el-radio-button>
</el-radio-group> <el-radio-button :label="2">未选择</el-radio-button>
<el-button type="primary" size="small" @click="openImport">导入名单</el-button> </el-radio-group>
<el-button type="primary" size="small" @click="doExport">导出</el-button> <el-button type="primary" size="small" @click="openImport" v-if="${@shiro.hasRole('sysadmin')}">导入名单</el-button>
<el-button :disabled="!pageForm.projectId" type="primary" size="small" @click="doAudit(true)">确认名单</el-button> <el-button type="primary" size="small" @click="doExport">导出</el-button>
<!-- 取消确认 --> <el-button :disabled="!pageForm.projectId" type="primary" size="small" @click="doAudit(true)">确认名单</el-button>
<el-button :disabled="!pageForm.projectId" type="danger" size="small" @click="doAudit(false)">取消确认</el-button> <!-- 取消确认 -->
<el-button :disabled="!pageForm.projectId" type="danger" size="small" @click="doAudit(false)">取消确认</el-button>
</template>
</template> </template>
</table-tool> </table-tool>
@@ -212,7 +218,7 @@ layout("/layouts/platform.html"){
show-word-limit show-word-limit
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="套餐" prop="subjectId"> <el-form-item label="医院" prop="subjectId">
<el-select style="width: 100%" v-model="editHealthCheckupData.subjectId"> <el-select style="width: 100%" v-model="editHealthCheckupData.subjectId">
<el-option :key="item.id" :label="item.optionName" :value="item.id" v-for="item in projectSubjectOptions"></el-option> <el-option :key="item.id" :label="item.optionName" :value="item.id" v-for="item in projectSubjectOptions"></el-option>
</el-select> </el-select>
@@ -302,7 +308,8 @@ layout("/layouts/platform.html"){
searchKeyword: "", searchKeyword: "",
unionId: "", unionId: "",
unitId: "", unitId: "",
isChoose: 0 isChoose: 0,
isHomeGo: ""
}, },
threeUnits: [], threeUnits: [],
unionGroups: [], unionGroups: [],
@@ -621,7 +628,9 @@ layout("/layouts/platform.html"){
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')||@shiro.hasRole('H03')}" === "true") { if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionAdmin')||@shiro.hasRole('H03')}" === "true") {
this.units = await getUnits(this.pageForm.unionId) this.units = await getUnits(this.pageForm.unionId)
} else { } else {
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}") const unionId = "${@shiro.getPrincipalProperty('unit').getUnionid()}"
this.units = await getUnits(unionId)
this.pageForm.unionId = unionId
} }
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId) this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
if ("${@shiro.hasRole('ghxzzz')}" === "true") { if ("${@shiro.hasRole('ghxzzz')}" === "true") {
@@ -724,6 +733,7 @@ layout("/layouts/platform.html"){
} }
}) })
} }
this.pageForm.isHomeGo = GetQueryString("isHomeGo")
this.unions = await getUnions() this.unions = await getUnions()
this.flushUnits() this.flushUnits()
await this.yearChange() await this.yearChange()
@@ -60,7 +60,7 @@ const activity = {
} else if (item.url) { } else if (item.url) {
this.$refs.openQRCode.openCode(item.url, "该活动只支持手机端报名,请使用手机扫描二维码报名!") this.$refs.openQRCode.openCode(item.url, "该活动只支持手机端报名,请使用手机扫描二维码报名!")
} else { } else {
this.$message.warning("该活动不支持") this.$message.warning("该活动不支持,请在手机上选择!")
} }
} }
}, },
@@ -178,7 +178,7 @@
> >
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
placeholder="账号或手机号码" placeholder="请输入工号"
prefix-icon="el-icon-user" prefix-icon="el-icon-user"
type="text" type="text"
v-model="loginForm.username" v-model="loginForm.username"
@@ -187,7 +187,7 @@
<el-form-item prop="password"> <el-form-item prop="password">
<el-input <el-input
@keyup.enter.native="doLogin" @keyup.enter.native="doLogin"
placeholder="密码" placeholder="请输入密码"
prefix-icon="el-icon-lock" prefix-icon="el-icon-lock"
type="password" type="password"
v-model="loginForm.password" v-model="loginForm.password"