基地校优化、见习之星列表优化、基地初选优化
This commit is contained in:
parent
a2dfd2c6ae
commit
75a8d6112f
ruoyi-admin/src/main/java/com/ruoyi/web/controller
common
jxjs
ruoyi-system/src/main
java/com/ruoyi/jxjs/domain
resources/mapper
ruoyi-ui/src/views
@ -1,11 +1,61 @@
|
||||
package com.ruoyi.web.controller.common;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.jxjs.domain.TsbzJdx;
|
||||
import com.ruoyi.jxjs.service.ITsbzJdxService;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@RestController
|
||||
public class SchoolCommonController {
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
@Autowired
|
||||
private ITsbzJdxService tsbzJdxService;
|
||||
|
||||
/**
|
||||
* 当前登录用户部门id转基地校id
|
||||
**/
|
||||
public String deptIdToJdxId() {
|
||||
String jdxId = "";//转换值
|
||||
try {
|
||||
SysDept sysDept = getDept();
|
||||
TsbzJdx tsbzJdx = new TsbzJdx();
|
||||
|
||||
String strSchoolId = sysDept.getSchoolid();
|
||||
System.out.println("schoolId is Empty======:" + isStringEmpty(strSchoolId));
|
||||
if (sysDept != null && !isStringEmpty(strSchoolId)) {
|
||||
jdxId = strSchoolId;
|
||||
return jdxId;
|
||||
}
|
||||
return jdxId;
|
||||
} catch (Exception e) {
|
||||
//throw new CustomException("部门id转换学校id异常", HttpStatus.UNAUTHORIZED);
|
||||
return jdxId;
|
||||
}
|
||||
}
|
||||
|
||||
public SysDept getDept() {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
Long deptId = loginUser.getUser().getDept().getDeptId();//当前用户部门id
|
||||
System.out.println("部门id======:" + deptId);
|
||||
System.out.println("sys_user.deptid======:" + loginUser.getUser().getDeptId());
|
||||
SysDept sysDept = deptService.selectDeptById(deptId);
|
||||
|
||||
return sysDept;
|
||||
}
|
||||
|
||||
public boolean isStringEmpty(String str) {
|
||||
if (str == null || "".equals(str)) {
|
||||
return true;
|
||||
|
@ -53,6 +53,12 @@ public class TsbzJdcxController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jdcx:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TsbzJdcx tsbzJdcx) {
|
||||
System.out.println("faid:" + tsbzJdcx.getFaid());
|
||||
//首先判断是否为学校用户
|
||||
String jdxId=schoolCommonController.deptIdToJdxId();
|
||||
if(!schoolCommonController.isStringEmpty(jdxId)){
|
||||
tsbzJdcx.setJdxid(jdxId);
|
||||
}
|
||||
startPage();
|
||||
// List<TsbzJdcx> list = tsbzJdcxService.selectTsbzJdcxList(tsbzJdcx);
|
||||
List<TsbzJdcx> list = tsbzJdcxService.selectTsbzJdcxExport(tsbzJdcx);
|
||||
|
@ -3,10 +3,12 @@ package com.ruoyi.web.controller.jxjs;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.jxjs.domain.TsbzJxjsjbxx;
|
||||
import com.ruoyi.jxjs.service.ITsbzJxjsjbxxService;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.web.controller.common.SchoolCommonController;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -44,6 +46,8 @@ public class TsbzJdxController extends BaseController {
|
||||
private ITsbzJxjsjbxxService tsbzJxjsjbxxService;
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
/**
|
||||
* 查询基地校列表
|
||||
@ -109,10 +113,10 @@ public class TsbzJdxController extends BaseController {
|
||||
SysDept dept = new SysDept();
|
||||
//设置schoolID为xxdm
|
||||
dept.setSchoolid(tsbzJdx.getId());
|
||||
dept = deptService.selectDeptList(dept).get(0);
|
||||
dept.setDeptName(tsbzJdx.getJdxmc());
|
||||
dept.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
|
||||
deptService.updateDept(dept);
|
||||
SysDept deptNew = deptService.selectDeptList(dept).get(0);
|
||||
deptNew.setDeptName(tsbzJdx.getJdxmc());
|
||||
deptNew.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
|
||||
deptService.updateDept(deptNew);
|
||||
return toAjax(tsbzJdxService.updateTsbzJdx(tsbzJdx));
|
||||
}
|
||||
|
||||
@ -133,6 +137,29 @@ public class TsbzJdxController extends BaseController {
|
||||
return AjaxResult.error("当前基地校已分配见习教师,无法删除");
|
||||
}
|
||||
}
|
||||
|
||||
//先判断是否允许删除dept部门
|
||||
//检查是否允许删除
|
||||
SysDept dept = null;
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
dept = new SysDept();
|
||||
dept.setSchoolid(ids[i]);
|
||||
dept = deptService.selectDeptList(dept).get(0);
|
||||
|
||||
SysUser user = new SysUser();
|
||||
user.setDeptId(dept.getDeptId());
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
if (list != null && list.size() > 0) {
|
||||
return AjaxResult.error("当前选中的基地校存在用户数据,无法删除");
|
||||
}
|
||||
}
|
||||
//删除过程
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
dept = new SysDept();
|
||||
dept.setSchoolid(ids[i]);
|
||||
dept = deptService.selectDeptList(dept).get(0);
|
||||
deptService.deleteDeptById(dept.getDeptId());
|
||||
}
|
||||
return toAjax(tsbzJdxService.deleteTsbzJdxByIds(ids));
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.ruoyi.web.controller.jxjs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.web.controller.common.SchoolCommonController;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -32,6 +33,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
public class TsbzJxjsjbxxController extends BaseController {
|
||||
@Autowired
|
||||
private ITsbzJxjsjbxxService tsbzJxjsjbxxService;
|
||||
@Autowired
|
||||
private SchoolCommonController schoolCommonController;
|
||||
|
||||
/**
|
||||
* 查询见习教师基本信息列表,没有基地校的教师列表
|
||||
@ -50,6 +53,12 @@ public class TsbzJxjsjbxxController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxjsjbxx:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TsbzJxjsjbxx tsbzJxjsjbxx) {
|
||||
//首先判断是否为学校用户
|
||||
String jdxId=schoolCommonController.deptIdToJdxId();
|
||||
if(!schoolCommonController.isStringEmpty(jdxId)){
|
||||
tsbzJxjsjbxx.setJdxid(jdxId);
|
||||
}
|
||||
|
||||
startPage();
|
||||
List<TsbzJxjsjbxx> list = tsbzJxjsjbxxService.selectTsbzJxjsjbxxList(tsbzJxjsjbxx);
|
||||
return getDataTable(list);
|
||||
|
@ -37,7 +37,7 @@ public class TsbzJxzxpxfaController extends BaseController {
|
||||
/**
|
||||
* 查询见习之星评选方案列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxzxpxfa:list')")
|
||||
@PreAuthorize("@ss.hasPermi('jxjs:jxzxpxfa:list')"+ "||@ss.hasPermi('jxjs:jdcx:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TsbzJxzxpxfa tsbzJxzxpxfa) {
|
||||
startPage();
|
||||
|
@ -172,6 +172,9 @@ public class TsbzJdcx extends BaseEntity {
|
||||
@Excel(name = "面试综合得分", type = Type.IMPORT)
|
||||
private BigDecimal zhdf2;
|
||||
|
||||
//基地校id
|
||||
private String jdxid;
|
||||
|
||||
|
||||
public String getFaname() {
|
||||
return faname;
|
||||
@ -421,6 +424,14 @@ public class TsbzJdcx extends BaseEntity {
|
||||
return lqzt;
|
||||
}
|
||||
|
||||
public String getJdxid() {
|
||||
return jdxid;
|
||||
}
|
||||
|
||||
public void setJdxid(String jdxid) {
|
||||
this.jdxid = jdxid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
@ -447,8 +458,8 @@ public class TsbzJdcx extends BaseEntity {
|
||||
.append("msjgmnktjxdf", getMsjgmnktjxdf())
|
||||
.append("yjdf", getYjdf())
|
||||
.append("zhdf2", getZhdf2())
|
||||
.append("lqzt", getLqzt()
|
||||
)
|
||||
.append("lqzt", getLqzt())
|
||||
.append("jdxid", getJdxid())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="yjdf" column="yjdf" />
|
||||
<result property="zhdf2" column="zhdf2" />
|
||||
<result property="lqzt" column="lqzt" />
|
||||
<result property="jdxid" column="jdxid" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTsbzJdcxVo">
|
||||
@ -164,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<select id="selectTsbzJdcxExport" parameterType="TsbzJdcx" resultMap="TsbzJdcxResult">
|
||||
select a.id, a.faid, a.jsid, a.dqzt, a.createuserid, a.create_time, a.jdxshr, a.jdxshzt, a.sbly, a.qjshr, a.qjshzt, a.qjshyj, a.jdpx, a.alfxdf, a.jasjdf, a.gbzdf, a.zhdf, a.cjdrcreate_time, a.msqr, a.msqrcreate_time, a.msjgmnktjxdf, a.yjdf, a.zhdf2,a.lqzt, c.name as faname, d.jdxmc,b.name as jsname,b.xb,b.rjxd,b.rjxk,b.phone,b.prdwmc from tsbz_jdcx a LEFT JOIN tsbz_jxjsjbxx b ON a.jsid=b.id LEFT JOIN tsbz_jxzxpxfa c ON a.faid=c.id LEFT JOIN tsbz_jdx d ON b.jdxid=d.id
|
||||
select d.id as jdxid,a.id, a.faid, a.jsid, a.dqzt, a.createuserid, a.create_time, a.jdxshr, a.jdxshzt, a.sbly, a.qjshr, a.qjshzt, a.qjshyj, a.jdpx, a.alfxdf, a.jasjdf, a.gbzdf, a.zhdf, a.cjdrcreate_time, a.msqr, a.msqrcreate_time, a.msjgmnktjxdf, a.yjdf, a.zhdf2,a.lqzt, c.name as faname, d.jdxmc,b.name as jsname,b.xb,b.rjxd,b.rjxk,b.phone,b.prdwmc from tsbz_jdcx a LEFT JOIN tsbz_jxjsjbxx b ON a.jsid=b.id LEFT JOIN tsbz_jxzxpxfa c ON a.faid=c.id LEFT JOIN tsbz_jdx d ON b.jdxid=d.id
|
||||
<where>
|
||||
<if test="faid != null "> and a.faid = #{faid}</if>
|
||||
<if test="jsid != null "> and a.jsid = #{jsid}</if>
|
||||
@ -188,6 +189,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="yjdf != null "> and a.yjdf = #{yjdf}</if>
|
||||
<if test="zhdf2 != null "> and a.zhdf2 = #{zhdf2}</if>
|
||||
<if test="lqzt != null and lqzt != ''"> and lqzt = #{lqzt}</if>
|
||||
<if test="jdxid != null and jdxid != ''"> and d.id = #{jdxid}</if>
|
||||
</where>
|
||||
</select>
|
||||
<update id="updateTsbzJdcxforjsfa" parameterType="TsbzJdcx">
|
||||
|
@ -40,6 +40,9 @@
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="schoolid != null and schoolid != ''">
|
||||
AND schoolid = #{schoolid}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by d.parent_id, d.order_num
|
||||
|
@ -166,9 +166,11 @@ import { listJxzxpxfa } from "@/api/jxjs/jxzxpxfa";
|
||||
import { listJxjsjbxx, getJxjsjbxx } from "@/api/jxjs/jxjsjbxx";
|
||||
|
||||
export default {
|
||||
name: "Jdcx",
|
||||
name: "Jdxcx",
|
||||
data() {
|
||||
return {
|
||||
//默认选中方案id
|
||||
defaultFaId: "",
|
||||
isable: false,
|
||||
isCheck: true,
|
||||
checkAll: false,
|
||||
@ -231,7 +233,7 @@ export default {
|
||||
},
|
||||
// 查询参数
|
||||
queryParams_fa: {
|
||||
fazt: null,
|
||||
fazt: "1",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -249,7 +251,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getFaList();
|
||||
this.getList();
|
||||
this.getJsList();
|
||||
this.getDicts("sys_dm_shzt").then((response) => {
|
||||
this.dqztOptions = response.data;
|
||||
@ -293,10 +294,13 @@ export default {
|
||||
});
|
||||
return actions.join("");
|
||||
},
|
||||
getFaList() {
|
||||
this.queryParams_fa.fazt = "1";
|
||||
listJxzxpxfa(this.queryParams_fa).then((response) => {
|
||||
async getFaList() {
|
||||
await listJxzxpxfa(this.queryParams_fa).then((response) => {
|
||||
this.faOptions = response.rows;
|
||||
this.defaultFaId = response.rows[0].id;
|
||||
this.queryParams.faid = this.defaultFaId;
|
||||
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
getJsList() {
|
||||
@ -355,6 +359,7 @@ export default {
|
||||
};
|
||||
this.resetForm("form");
|
||||
|
||||
this.form.faid = this.defaultFaId;
|
||||
this.checkedJss = [];
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -365,6 +370,7 @@ export default {
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.faid = this.defaultFaId;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -392,7 +398,6 @@ export default {
|
||||
this.form = response.data;
|
||||
listJxjsjbxx(null).then((response) => {
|
||||
this.jss = response.rows;
|
||||
|
||||
});
|
||||
this.checkedJss.push(response.data.jsid);
|
||||
this.open = true;
|
||||
@ -427,7 +432,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm(
|
||||
'是否确认删除基地校初级审核编号为"' + ids + '"的数据项?',
|
||||
'是否确认删除基地校初级审核数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
@ -448,7 +453,7 @@ export default {
|
||||
handleCheck(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm(
|
||||
'确认提交基地校初级审核编号为"' + ids + '"的数据项?',
|
||||
'确认提交基地校初级审核数据项?提交后数据不能维护',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
|
@ -234,8 +234,8 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改见习教师基本信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
|
@ -66,6 +66,7 @@
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
v-if="!(scope.row.parentId==200)"
|
||||
v-show="!(scope.row.deptId==200)"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
|
Loading…
x
Reference in New Issue
Block a user