疗休养

This commit is contained in:
Paidax
2025-06-12 14:31:55 +08:00
parent e9f9d44c06
commit c720084480
10 changed files with 138 additions and 121 deletions
@@ -51,6 +51,7 @@ public class LxyCommon {
bm.zyhj,
bm.idcard,
bm.talent,
bm.point,
TIMESTAMPDIFF(YEAR, u.birthday, CURDATE()) age,
bm.bmzt
FROM
@@ -181,7 +181,7 @@ public class LxyGhbmController {
Cnd cnd = Cnd.NEW();
cnd.and("member", "=", 1);
cnd.and("unit.unionid", "=", unionid);
cnd.and(new Static("u.id NOT IN ( SELECT bm.userid FROM lxy_bm bm WHERE bm.hdid = '" + hdid + "' ) "));
cnd.and(new Static("u.id NOT IN ( SELECT bm.userid FROM lxy_bm bm WHERE bm.hdid = '" + hdid + "' OR hdid = '1' ) "));
if (checks != null && checks.length > 0) {
for (String check : checks) {
if (check.equals("honer")) {
@@ -219,7 +219,8 @@ public class LxyGhbmController {
bm.unitname,
bm.unionname,
bm.nation,
bm.talent
bm.talent,
bm.point
FROM
lxy_bm bm
LEFT JOIN `user` u ON u.id = bm.userid
@@ -310,6 +311,7 @@ public class LxyGhbmController {
bm.zyhj,
bm.nation,
bm.talent,
bm.point,
bm.bz,
bm.ghid
FROM
@@ -377,6 +379,12 @@ public class LxyGhbmController {
return Result.error("文件数据超过名额限制,请检查是否存在已报名人员");
}
// 获取以往的报名数据。以往报名过,不允许再次报名
Sql sql = Sqls.create("SELECT userid FROM lxy_bm WHERE hdid = 1");
sql.setCallback(Sqls.callback.strList());
dao.execute(sql);
List<String> lastJoinUserIds = sql.getList(String.class);
// 获取本 基层工会的会员,判断是不是报名了其他工会的教工和校验有没有用户数据
List<User> list = dao.query(User.class, Cnd.where("unionid", "=", unionId).and("member", "=", 1));
Map<String, User> userMap = list.stream().collect(Collectors.toMap(User::getLoginname, v -> v));
@@ -409,6 +417,12 @@ public class LxyGhbmController {
continue;
}
if (lastJoinUserIds.contains(user.getId())) {
temp.setRemark("此教师参加过以往疗休养,请更换人员上报");
errorInfos.add(temp);
continue;
}
Lxy_bm bm = new Lxy_bm();
bm.setId(R.UU32());
bm.setHdid(projectId);
@@ -426,6 +440,7 @@ public class LxyGhbmController {
bm.setIdcard(temp.getIdcard());
bm.setMobile(temp.getMobile());
bm.setTalent(temp.getTalent());
bm.setPoint(temp.getPoint());
bmList.add(bm);
@@ -1,7 +1,5 @@
package io.v.nutz.zhgh.lxy.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.config.Configure;
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
@@ -10,10 +8,8 @@ import io.v.nutz.base.utils.MsgApi;
import io.v.nutz.base.utils.OfficeTemplateUtil;
import io.v.nutz.base.utils.Vi;
import io.v.nutz.zhgh.lxy.model.Lxy_bm;
import io.v.nutz.zhgh.lxy.model.Lxy_hd;
import io.v.nutz.zhgh.lxy.service.LxyGrxxService;
import io.v.nutz.zhgh.lxy.service.LxyHdService;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.nutz.dao.Cnd;
@@ -24,18 +20,15 @@ import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.Static;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.lang.Strings;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.List;
/**
@@ -87,6 +80,7 @@ public class LxyHdTjController {
bm.bz,
bm.talent,
bm.nation,
bm.point,
bm.bmzt
FROM
lxy_grxx gr
@@ -172,6 +172,7 @@ public class LxyXghshController {
bm.zyhj,
bm.nation,
bm.talent,
bm.point,
bm.bz,
bm.ghid
FROM
@@ -101,6 +101,11 @@ public class Lxy_bm {
@ColDefine(type = ColType.VARCHAR, width = 20)
private String talent;
@Column
@Comment("出发乘车地点")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String point;
@Column
@Comment("备注")
@ColDefine(type = ColType.VARCHAR, width = 1000)
@@ -34,6 +34,9 @@ public class LxyImportTemp {
@Excel(name = "是否为ABCDE类高层次人才", width = 30)
String talent;
@Excel(name = "出发乘车地点", width = 30)
String point;
String remark;
}
@@ -191,11 +191,10 @@ layout("/layouts/platform.html"){
</el-divider>
</div>
<el-table :data="hasApplyUserTableData" border height="480" size="mini">
<el-table-column align="center" header-align="center" label="序号" type="index" width="70"></el-table-column>
<el-table-column align="center" header-align="center" label="工号" prop="loginname" width="120"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名" prop="username" width="100"></el-table-column>
<el-table-column align="center" header-align="center" label="单位" prop="unitname" width="120"></el-table-column>
<el-table :data="hasApplyUserTableData" width="100%" border style="max-height: 300px; overflow-y: auto" size="mini">
<el-table-column fixed align="center" header-align="center" label="工号" prop="loginname" width="120"></el-table-column>
<el-table-column fixed align="center" header-align="center" label="姓名" prop="username" width="100"></el-table-column>
<el-table-column fixed align="center" header-align="center" label="单位" prop="unitname" width="120"></el-table-column>
<el-table-column align="center" header-align="center" label="民族" prop="nation" width="150">
<template scope="{row}">
<div>
@@ -258,7 +257,7 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="是否为ABCDE类高层次人才">
<el-table-column align="center" header-align="center" label="是否为ABCDE类高层次人才" width="150">
<template scope="{row}">
<div>
<el-select
@@ -274,6 +273,22 @@ layout("/layouts/platform.html"){
</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="出发乘车地点" width="150">
<template scope="{row}">
<div>
<el-select
:disabled="row.bmzt&&row.bmzt!=4"
clearable
filterable
placeholder="请选择出发乘车地点"
style="width: 100%"
v-model="row.point"
>
<el-option v-for="item in pointList" :key="item" :label="item" :value="item"></el-option>
</el-select>
</div>
</template>
</el-table-column>
<!--<el-table-column align="center" header-align="center" label="是否审核通过" width="100">
<template scope="{row}">
<span class="text-primary" v-if="row.bmzt==1">待分工会审核</span>
@@ -284,7 +299,7 @@ layout("/layouts/platform.html"){
<span class="text-muted" v-else>预选</span>
</template>
</el-table-column>-->
<el-table-column header-align="center" label="操作" width="80">
<el-table-column fixed="right" header-align="center" label="操作" width="80">
<template scope="scope">
<el-button
@click="hasApplyUserTableData.splice(scope.$index,1)"
@@ -322,6 +337,7 @@ layout("/layouts/platform.html"){
prop="talent"
show-overflow-tooltip
></el-table-column>
<el-table-column align="center" header-align="center" label="出发乘车地点" prop="point"></el-table-column>
<el-table-column align="center" header-align="center" label="报名状态" prop="bmzt">
<template scope="scope">
<span style="color: #e6a23c" v-if="scope.row.bmzt==1">待分工会审核</span>
@@ -558,6 +574,7 @@ display: -webkit-box;
nationList: [],
talentList: ["A", "B", "C", "D", "E", "否"],
pointList: ["江南校区", "松北校区"],
// 导入相关
importDialog: false
}
@@ -13,36 +13,24 @@ layout("/layouts/platform.html"){
<el-card shadow="never">
<div class="btn-group tool-button mt5">
<el-date-picker
:picker-options="pickerOptions"
@change="hdSearch"
placeholder="选择年"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
:picker-options="pickerOptions"
@change="hdSearch"
placeholder="选择年"
type="year"
v-model="pageForm.year"
value-format="yyyy"
></el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-select @change="doSearch()" placeholder="请选择活动"
v-model="pageForm.hdid">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in lxyHd">
</el-option>
<el-select @change="doSearch()" placeholder="请选择活动" v-model="pageForm.hdid">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in lxyHd"></el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-select clearable filterable placeholder="请选择工会"
v-model="pageForm.ghid">
<el-option
:key="item.id"
:label="item.unionname"
:value="item.id"
v-for="item in ghList">
</el-option>
<el-select clearable filterable placeholder="请选择工会" v-model="pageForm.ghid">
<el-option :key="item.id" :label="item.unionname" :value="item.id" v-for="item in ghList"></el-option>
</el-select>
</div>
@@ -53,7 +41,6 @@ layout("/layouts/platform.html"){
<div class="btn-group tool-button mt5">
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
</div>
</el-card>
<el-card class="mt10" shadow="never">
@@ -65,7 +52,7 @@ layout("/layouts/platform.html"){
<el-table :data="tableData" row-key="id" style="width: 100%" v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="100px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="工号" prop="loginname"></el-table-column>
@@ -76,12 +63,13 @@ layout("/layouts/platform.html"){
<el-table-column align="center" header-align="center" label="身份证号" prop="idcard"></el-table-column>
<el-table-column align="center" header-align="center" label="联系电话" prop="mobile"></el-table-column>
<el-table-column
align="center"
header-align="center"
label="是否为ABCDE类高层次人才"
prop="talent"
show-overflow-tooltip
align="center"
header-align="center"
label="是否为ABCDE类高层次人才"
prop="talent"
show-overflow-tooltip
></el-table-column>
<el-table-column align="center" header-align="center" label="出发乘车地点" prop="point"></el-table-column>
<el-table-column align="center" header-align="center" label="报名状态" prop="bmzt">
<template scope="scope">
<span style="color: #e6a23c" v-if="scope.row.bmzt==1">待分工会审核</span>
@@ -92,57 +80,49 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="120px">
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="120px">
<template scope="scope">
<el-button @click="openView(scope.row)" size="mini" type="primary">查看
</el-button>
<el-button @click="openView(scope.row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container">
<el-pagination
:current-page="pageForm.pageNumber"
:page-size="pageForm.pageSize"
:page-sizes="[10, 20, 30, 50]"
:total="pageForm.totalCount"
@current-change="pageNumberChange"
@size-change="pageSizeChange"
layout="total, sizes, prev, pager, next">
</el-pagination>
:current-page="pageForm.pageNumber"
:page-size="pageForm.pageSize"
:page-sizes="[10, 20, 30, 50]"
:total="pageForm.totalCount"
@current-change="pageNumberChange"
@size-change="pageSizeChange"
layout="total, sizes, prev, pager, next"
></el-pagination>
</el-row>
</el-card>
<template #view>
<el-descriptions class="margin-top" title="" :column="3" border>
<el-descriptions-item label="工号">{{ viewData.loginname }}</el-descriptions-item>
<el-descriptions-item label="姓名">{{ viewData.username }}</el-descriptions-item>
<el-descriptions-item label="人事编制">{{ viewData.rsbz }}</el-descriptions-item>
<el-descriptions-item label="性别">{{ viewData.sex }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="年龄">{{ viewData.age }}</el-descriptions-item>
<el-descriptions-item label="所在单位">{{ viewData.unitname }}</el-descriptions-item>
<el-descriptions-item label="手机号">{{ viewData.mobile }}</el-descriptions-item>
<el-descriptions-item label="身份证号">{{ viewData.idcard }}</el-descriptions-item>
<el-descriptions-item label="获奖名称">{{ viewData.zyhj }}</el-descriptions-item>
<el-descriptions-item label="民族">{{ viewData.nation }}</el-descriptions-item>
<el-descriptions-item label="疗休养身份">{{ viewData.zyhj }}</el-descriptions-item>
<el-descriptions-item label="疗休养员身份">{{ viewData.zyhj }}</el-descriptions-item>
<el-descriptions-item label="是否为ABCDE类高层次人才">{{ viewData.talent }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ viewData.bz }}</el-descriptions-item>
<el-descriptions-item label="出发乘车地点">{{ viewData.point }}</el-descriptions-item>
</el-descriptions>
</template>
<custom-message @confirm="confirmMsg" ref="customMessage"></custom-message>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
el: "#app",
data() {
return {
tableData: [],
@@ -151,7 +131,7 @@ layout("/layouts/platform.html"){
ghList: [],
personForm: {
pageNumber: 1,
pageSize: 10,
pageSize: 10
},
pageForm: {
hdid: "",
@@ -160,34 +140,27 @@ layout("/layouts/platform.html"){
searchKey: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
totalCount: 0
},
pickerOptions: {
disabledDate(time) {
return (
time.getFullYear() > new Date().getFullYear()
);
return time.getFullYear() > new Date().getFullYear()
}
},
tabLoading: false,
personLoading: false,
v: "index",
v: "index"
}
},
methods: {
async confirmMsg(val) {
const confirm = await this.$confirm('确定要给报名人员发送消息吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
const confirm = await this.$confirm("确定要给报名人员发送消息吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
if (confirm === "confirm") {
const {
data,
code,
msg
} = await $.get(base + "/platform/zgfw/lxy/hdtj/openSendMessage", {hdid: this.pageForm.hdid, ...val})
const { data, code, msg } = await $.get(base + "/platform/zgfw/lxy/hdtj/openSendMessage", { hdid: this.pageForm.hdid, ...val })
if (code === 0) {
this.$message.success(msg)
this.$refs.customMessage.close()
@@ -197,43 +170,43 @@ layout("/layouts/platform.html"){
}
},
doExport() {
let obj = this.lxyHd.find(o => {
let obj = this.lxyHd.find((o) => {
return o.id === this.pageForm.hdid
})
this.$confirm('确定要导出' + obj.name + '人员名单吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
this.$confirm("确定要导出" + obj.name + "人员名单吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
window.open('/platform/zgfw/lxy/hdtj/doExport?hdid=' + this.pageForm.hdid + '&ghid=' + this.pageForm.ghid + '&hdname=' + obj.name)
window.open("/platform/zgfw/lxy/hdtj/doExport?hdid=" + this.pageForm.hdid + "&ghid=" + this.pageForm.ghid + "&hdname=" + obj.name)
})
},
pageData() {
sublime.showLoadingbar();
sublime.showLoadingbar()
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/hdtj/pageData", this.pageForm, (res) => {
let {code, data, msg} = res
sublime.closeLoadingbar();
this.tabLoading = false
if (code == 0) {
data.list.map(v => {
v.chry = JSON.parse(v.chry).map(x => {
return x.shry
}).join(",")
})
this.tableData = data.list;
this.pageForm.totalCount = data.totalCount;
} else {
this.$message({
message: msg,
type: 'error'
});
}
}, "json");
$.post(
base + "/platform/zgfw/lxy/hdtj/pageData",
this.pageForm,
(res) => {
let { code, data, msg } = res
sublime.closeLoadingbar()
this.tabLoading = false
if (code == 0) {
this.tableData = data.list
this.pageForm.totalCount = data.totalCount
} else {
this.$message({
message: msg,
type: "error"
})
}
},
"json"
)
},
async getLxyHd() {
await $.get("/platform/zgfw/lxy/hdtj/getLxyHd", {year: this.pageForm.year}).then(res => {
await $.get("/platform/zgfw/lxy/hdtj/getLxyHd", { year: this.pageForm.year }).then((res) => {
if (res.data.length != 0) {
this.lxyHd = res.data
this.pageForm.hdid = this.lxyHd[0].id
@@ -244,7 +217,7 @@ layout("/layouts/platform.html"){
})
},
async getLxyBmInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
const { data } = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", { id })
return data
},
async openView(row) {
@@ -256,17 +229,19 @@ layout("/layouts/platform.html"){
doSearch() {
this.pageData()
},
pageNumberChange(val) {//页码更新操作
this.pageForm.pageNumber = val;
this.pageData();
pageNumberChange(val) {
//页码更新操作
this.pageForm.pageNumber = val
this.pageData()
},
pageSizeChange(val) {//分页大小更新操作
this.pageForm.pageSize = val;
this.pageData();
pageSizeChange(val) {
//分页大小更新操作
this.pageForm.pageSize = val
this.pageData()
},
async hdSearch() {
await this.getLxyHd()
},
}
},
async created() {
this.pageForm.year = new Date().getFullYear() + ""
@@ -147,6 +147,7 @@ layout("/layouts/platform.html"){
prop="talent"
show-overflow-tooltip
></el-table-column>
<el-table-column align="center" header-align="center" label="出发乘车地点" prop="point"></el-table-column>
<el-table-column align="center" header-align="center" label="报名状态" prop="bmzt">
<template scope="scope">
<span style="color: #e6a23c" v-if="scope.row.bmzt==1">待分工会审核</span>
@@ -213,11 +214,14 @@ layout("/layouts/platform.html"){
<el-form-item label="手机号:">{{ viewData.mobile }}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="获奖名称:">{{ viewData.zyhj }}</el-form-item>
<el-form-item label="疗休养员身份:">{{ viewData.zyhj }}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否为ABCDE类高层次人才:">{{ viewData.talent }}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出发乘车地点:">{{ viewData.point }}</el-form-item>
</el-col>
</el-row>
</el-form>
<span class="dialog-footer" slot="footer" v-if="this.viewData.num==2">
@@ -7,7 +7,9 @@
<el-table-column label="疗休养员身份" prop="zyhj" header-align="center" sortable align="center"></el-table-column>
<el-table-column label="身份证号" prop="idcard" header-align="center" align="center"></el-table-column>
<el-table-column label="联系电话" prop="mobile" header-align="center" align="center"></el-table-column>
<el-table-column label="是否为ABCDE类高层次人才" prop="talent" header-align="center" align="center">
<el-table-column label="是否为ABCDE类高层次人才" prop="talent" header-align="center" align="center"></el-table-column>
<el-table-column label="出发乘车地点" prop="point" header-align="center" align="center"></el-table-column>
<el-table-column label="状态" prop="talent" header-align="center" align="center">
<template scope="scope">
<span style="color: #e6a23c" v-if="scope.row.bmzt==1">待分工会审核</span>
<span style="color: #e6a23c" v-if="scope.row.bmzt==3">待校工会审核</span>