20200416-zlp-1
班级管理
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 2.8 KiB |
@ -26,7 +26,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '本一智慧平台管理系统',
|
title: '本一智慧平台',
|
||||||
logo: logoImg
|
logo: logoImg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,24 +96,12 @@
|
|||||||
|
|
||||||
<el-table v-loading="loading" :data="classList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="classList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="班级编号" align="center" prop="bjbh" />
|
<el-table-column label="班级编号" align="center" prop="bjbh" v-if="false" />>
|
||||||
<el-table-column label="学校代码" align="center" prop="schoolid" />
|
<el-table-column label="班级类型" align="center" :formatter="bjtypeFormat" prop="bjtype" />
|
||||||
<el-table-column label="班级类型" align="center" :formatter="bjtypeFormat" prop="bjtype" />
|
|
||||||
<el-table-column label="班级序号" align="center" prop="bhxh" />
|
|
||||||
<el-table-column label="学年" align="center" prop="xn" />
|
|
||||||
<el-table-column label="班级名称" align="center" prop="bjmc" />
|
<el-table-column label="班级名称" align="center" prop="bjmc" />
|
||||||
<el-table-column label="班级荣誉称号" align="center" prop="bjrych" />
|
|
||||||
<el-table-column label="建班年月" align="center" prop="jbny" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.jbny) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="主班教师" align="center" prop="zbjs" />
|
<el-table-column label="主班教师" align="center" prop="zbjs" />
|
||||||
<el-table-column label="配班教师" align="center" prop="pbjs" />
|
<el-table-column label="配班教师" align="center" prop="pbjs" />
|
||||||
<el-table-column label="助理教师" align="center" prop="zljs" />
|
<el-table-column label="助理教师" align="center" prop="zljs" />
|
||||||
<el-table-column label="是否删除
|
|
||||||
1:删除
|
|
||||||
0:正常" align="center" prop="isdel" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createtime) }}</span>
|
<span>{{ parseTime(scope.row.createtime) }}</span>
|
||||||
@ -217,17 +205,12 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
schoolid: undefined,
|
deptId: undefined,
|
||||||
bjtype: undefined,
|
bjtype: undefined,
|
||||||
bhxh: undefined,
|
bjmc: undefined,
|
||||||
xn: undefined,
|
|
||||||
bjmc: undefined,
|
|
||||||
bjrych: undefined,
|
|
||||||
jbny: undefined,
|
|
||||||
zbjs: undefined,
|
zbjs: undefined,
|
||||||
pbjs: undefined,
|
pbjs: undefined,
|
||||||
zljs: undefined,
|
zljs: undefined,
|
||||||
isdel: undefined,
|
|
||||||
createtime: undefined
|
createtime: undefined
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
@ -270,17 +253,12 @@ export default {
|
|||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
bjbh: undefined,
|
bjbh: undefined,
|
||||||
schoolid: undefined,
|
deptId: undefined,
|
||||||
bjtype: undefined,
|
bjtype: undefined,
|
||||||
bhxh: undefined,
|
|
||||||
xn: undefined,
|
|
||||||
bjmc: undefined,
|
bjmc: undefined,
|
||||||
bjrych: undefined,
|
|
||||||
jbny: undefined,
|
|
||||||
zbjs: undefined,
|
zbjs: undefined,
|
||||||
pbjs: undefined,
|
pbjs: undefined,
|
||||||
zljs: undefined,
|
zljs: undefined,
|
||||||
isdel: undefined,
|
|
||||||
createtime: undefined
|
createtime: undefined
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
@ -349,7 +327,7 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const bjbhs = row.bjbh || this.ids;
|
const bjbhs = row.bjbh || this.ids;
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
'是否确认删除班级信息编号为"' + bjbhs + '"的数据项?',
|
'是否确认删除选中的班级信息?',
|
||||||
"警告",
|
"警告",
|
||||||
{
|
{
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
|
104
ruoyi/src/main/java/com/ruoyi/project/common/SchoolCommon.java
Normal file
104
ruoyi/src/main/java/com/ruoyi/project/common/SchoolCommon.java
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
package com.ruoyi.project.common;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.framework.security.LoginUser;
|
||||||
|
import com.ruoyi.project.system.domain.BySchool;
|
||||||
|
import com.ruoyi.project.system.domain.SysDept;
|
||||||
|
import com.ruoyi.project.system.service.IBySchoolService;
|
||||||
|
import com.ruoyi.project.system.service.ISysDeptService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class SchoolCommon {
|
||||||
|
@Autowired
|
||||||
|
private ISysDeptService deptService;
|
||||||
|
@Autowired
|
||||||
|
private IBySchoolService schoolService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门id转学校id
|
||||||
|
**/
|
||||||
|
public Long deptIdToSchoolId() {
|
||||||
|
Long schoolId = (long) 0;//转换值
|
||||||
|
try {
|
||||||
|
SysDept sysDept = getDept();
|
||||||
|
BySchool SchoolInfo = new BySchool();
|
||||||
|
System.out.println("schoolId is Empty======:" + isStringEmpty(sysDept.getSchoolId()));
|
||||||
|
if (sysDept != null && !isStringEmpty(sysDept.getSchoolId())) {
|
||||||
|
SchoolInfo.setXxdm(sysDept.getSchoolId());
|
||||||
|
List<BySchool> list = schoolService.selectBySchoolList(SchoolInfo);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
schoolId = list.get(0).getId();
|
||||||
|
System.out.println("部门id转换学校id为======:" + schoolId);
|
||||||
|
return schoolId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return schoolId;
|
||||||
|
} catch (Exception e) {
|
||||||
|
//throw new CustomException("部门id转换学校id异常", HttpStatus.UNAUTHORIZED);
|
||||||
|
return schoolId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 isSchool() {
|
||||||
|
SysDept sysDept = getDept();
|
||||||
|
//如果schoolid不为空 暂且认为是学校用户
|
||||||
|
String strSchoolId = sysDept.getSchoolId();
|
||||||
|
if (!isStringEmpty(strSchoolId)) {
|
||||||
|
//去school表验证 是否真的是学校数据
|
||||||
|
BySchool SchoolInfo = new BySchool();
|
||||||
|
SchoolInfo.setXxdm(strSchoolId);
|
||||||
|
List<BySchool> list = schoolService.selectBySchoolList(SchoolInfo);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentXnXq() {
|
||||||
|
Calendar date = Calendar.getInstance();
|
||||||
|
Integer iYear = date.get(Calendar.YEAR);
|
||||||
|
System.out.println("当前年======:" + iYear);
|
||||||
|
Integer iMonth = date.get(Calendar.MONTH) + 1;//Calendar.MONTH 少一个月
|
||||||
|
System.out.println("当前月======:" + iMonth);
|
||||||
|
String strNxNq = "";
|
||||||
|
|
||||||
|
if (iMonth < 9) {
|
||||||
|
strNxNq = (iYear - 1) + "-" + iYear + "2";
|
||||||
|
} else {
|
||||||
|
strNxNq = iYear + "-" + (iYear + 1) + "1";
|
||||||
|
}
|
||||||
|
return strNxNq;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentXn() {
|
||||||
|
return getCurrentXnXq().substring(0,9);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isStringEmpty(String str) {
|
||||||
|
if (str == null || "".equals(str)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,8 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.project.common.SchoolCommon;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -34,6 +36,8 @@ import com.ruoyi.framework.web.page.TableDataInfo;
|
|||||||
public class ByClassController extends BaseController {
|
public class ByClassController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByClassService byClassService;
|
private IByClassService byClassService;
|
||||||
|
@Autowired
|
||||||
|
private SchoolCommon schoolCommon;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询班级信息列表
|
* 查询班级信息列表
|
||||||
@ -74,11 +78,19 @@ public class ByClassController extends BaseController {
|
|||||||
@Log(title = "班级信息", businessType = BusinessType.INSERT)
|
@Log(title = "班级信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ByClass byClass) {
|
public AjaxResult add(@RequestBody ByClass byClass) {
|
||||||
|
|
||||||
|
//首先判断 当前用户是否为学校
|
||||||
|
if(schoolCommon.isSchool()){
|
||||||
String strBjbh = UUID.randomUUID().toString().replace("-","");
|
String strBjbh = UUID.randomUUID().toString().replace("-","");
|
||||||
System.out.println("bjbh:==" + strBjbh);
|
System.out.println("bjbh:==" + strBjbh);
|
||||||
byClass.setBjbh(strBjbh);
|
byClass.setBjbh(strBjbh);
|
||||||
|
byClass.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());
|
||||||
|
byClass.setXn(schoolCommon.getCurrentXn());
|
||||||
byClass.setCreatetime(new Date());
|
byClass.setCreatetime(new Date());
|
||||||
return toAjax(byClassService.insertByClass(byClass));
|
return toAjax(byClassService.insertByClass(byClass));}
|
||||||
|
else {
|
||||||
|
return AjaxResult.error("当前用户非幼儿园,无法创建班级");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,7 +100,11 @@ public class ByClassController extends BaseController {
|
|||||||
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
@Log(title = "班级信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ByClass byClass) {
|
public AjaxResult edit(@RequestBody ByClass byClass) {
|
||||||
return toAjax(byClassService.updateByClass(byClass));
|
//首先判断 当前用户是否为学校
|
||||||
|
if(schoolCommon.isSchool()) {
|
||||||
|
return toAjax(byClassService.updateByClass(byClass));
|
||||||
|
}
|
||||||
|
return AjaxResult.error("当前用户非幼儿园,无法编辑班级");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,6 +114,11 @@ public class ByClassController extends BaseController {
|
|||||||
@Log(title = "班级信息", businessType = BusinessType.DELETE)
|
@Log(title = "班级信息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{bjbhs}")
|
@DeleteMapping("/{bjbhs}")
|
||||||
public AjaxResult remove(@PathVariable String[] bjbhs) {
|
public AjaxResult remove(@PathVariable String[] bjbhs) {
|
||||||
return toAjax(byClassService.deleteByClassByIds(bjbhs));
|
//首先判断 当前用户是否为学校
|
||||||
|
if(schoolCommon.isSchool()) {
|
||||||
|
return toAjax(byClassService.deleteByClassByIds(bjbhs));
|
||||||
|
}
|
||||||
|
return AjaxResult.error("当前用户非幼儿园,无法删除班级");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.project.system.domain;
|
package com.ruoyi.project.system.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||||
@ -25,7 +26,7 @@ public class ByClass extends BaseEntity {
|
|||||||
* 学校代码
|
* 学校代码
|
||||||
*/
|
*/
|
||||||
@Excel(name = "学校代码")
|
@Excel(name = "学校代码")
|
||||||
private String schoolid;
|
private Long deptId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 班级类型
|
* 班级类型
|
||||||
@ -91,7 +92,7 @@ public class ByClass extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createtime;
|
private Date createtime;
|
||||||
|
|
||||||
public void setBjbh(String bjbh) {
|
public void setBjbh(String bjbh) {
|
||||||
@ -102,12 +103,12 @@ public class ByClass extends BaseEntity {
|
|||||||
return bjbh;
|
return bjbh;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSchoolid(String schoolid) {
|
public void setDeptId(Long deptId) {
|
||||||
this.schoolid = schoolid;
|
this.deptId = deptId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSchoolid() {
|
public Long getDeptId() {
|
||||||
return schoolid;
|
return deptId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBjtype(String bjtype) {
|
public void setBjtype(String bjtype) {
|
||||||
@ -202,7 +203,7 @@ public class ByClass extends BaseEntity {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("bjbh", getBjbh())
|
.append("bjbh", getBjbh())
|
||||||
.append("schoolid", getSchoolid())
|
.append("deptId", getDeptId())
|
||||||
.append("bjtype", getBjtype())
|
.append("bjtype", getBjtype())
|
||||||
.append("bhxh", getBhxh())
|
.append("bhxh", getBhxh())
|
||||||
.append("xn", getXn())
|
.append("xn", getXn())
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.project.system.service.impl;
|
package com.ruoyi.project.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.project.system.mapper.ByClassMapper;
|
import com.ruoyi.project.system.mapper.ByClassMapper;
|
||||||
@ -38,6 +40,7 @@ public class ByClassServiceImpl implements IByClassService
|
|||||||
* @return 班级信息
|
* @return 班级信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@DataScope(deptAlias = "d")
|
||||||
public List<ByClass> selectByClassList(ByClass byClass)
|
public List<ByClass> selectByClassList(ByClass byClass)
|
||||||
{
|
{
|
||||||
return byClassMapper.selectByClassList(byClass);
|
return byClassMapper.selectByClassList(byClass);
|
||||||
|
@ -5,41 +5,44 @@
|
|||||||
<mapper namespace="com.ruoyi.project.system.mapper.ByClassMapper">
|
<mapper namespace="com.ruoyi.project.system.mapper.ByClassMapper">
|
||||||
|
|
||||||
<resultMap type="ByClass" id="ByClassResult">
|
<resultMap type="ByClass" id="ByClassResult">
|
||||||
<result property="bjbh" column="bjbh" />
|
<result property="bjbh" column="bjbh"/>
|
||||||
<result property="schoolid" column="schoolid" />
|
<result property="deptId" column="dept_id"/>
|
||||||
<result property="bjtype" column="bjtype" />
|
<result property="bjtype" column="bjtype"/>
|
||||||
<result property="bhxh" column="bhxh" />
|
<result property="bhxh" column="bhxh"/>
|
||||||
<result property="xn" column="xn" />
|
<result property="xn" column="xn"/>
|
||||||
<result property="bjmc" column="bjmc" />
|
<result property="bjmc" column="bjmc"/>
|
||||||
<result property="bjrych" column="bjrych" />
|
<result property="bjrych" column="bjrych"/>
|
||||||
<result property="jbny" column="jbny" />
|
<result property="jbny" column="jbny"/>
|
||||||
<result property="zbjs" column="zbjs" />
|
<result property="zbjs" column="zbjs"/>
|
||||||
<result property="pbjs" column="pbjs" />
|
<result property="pbjs" column="pbjs"/>
|
||||||
<result property="zljs" column="zljs" />
|
<result property="zljs" column="zljs"/>
|
||||||
<result property="isdel" column="isdel" />
|
<result property="isdel" column="isdel"/>
|
||||||
<result property="createtime" column="createtime" />
|
<result property="createtime" column="createtime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectByClassVo">
|
<sql id="selectByClassVo">
|
||||||
select bjbh, schoolid, bjtype, bhxh, xn, bjmc, bjrych, jbny, zbjs, pbjs, zljs, isdel, createtime from by_class
|
select bjbh, dept_id, bjtype, bhxh, xn, bjmc, bjrych, jbny, zbjs, pbjs, zljs, isdel, createtime from by_class d
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult">
|
<select id="selectByClassList" parameterType="ByClass" resultMap="ByClassResult">
|
||||||
<include refid="selectByClassVo"/>
|
<include refid="selectByClassVo"/>
|
||||||
<where>
|
where isdel='0'
|
||||||
<if test="schoolid != null and schoolid != ''"> and schoolid = #{schoolid}</if>
|
<if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
|
||||||
<if test="bjtype != null and bjtype != ''"> and bjtype = #{bjtype}</if>
|
<if test="bjtype != null and bjtype != ''">and bjtype = #{bjtype}</if>
|
||||||
<if test="bhxh != null "> and bhxh = #{bhxh}</if>
|
<if test="bhxh != null ">and bhxh = #{bhxh}</if>
|
||||||
<if test="xn != null and xn != ''"> and xn = #{xn}</if>
|
<if test="xn != null and xn != ''">and xn = #{xn}</if>
|
||||||
<if test="bjmc != null and bjmc != ''"> and bjmc = #{bjmc}</if>
|
<if test="bjmc != null and bjmc != ''">and bjmc like concat('%', #{bjmc}, '%')</if>
|
||||||
<if test="bjrych != null and bjrych != ''"> and bjrych = #{bjrych}</if>
|
<if test="bjrych != null and bjrych != ''">and bjrych = #{bjrych}</if>
|
||||||
<if test="jbny != null "> and jbny = #{jbny}</if>
|
<if test="jbny != null ">and jbny = #{jbny}</if>
|
||||||
<if test="zbjs != null "> and zbjs = #{zbjs}</if>
|
<if test="zbjs != null ">and zbjs = #{zbjs}</if>
|
||||||
<if test="pbjs != null "> and pbjs = #{pbjs}</if>
|
<if test="pbjs != null ">and pbjs = #{pbjs}</if>
|
||||||
<if test="zljs != null "> and zljs = #{zljs}</if>
|
<if test="zljs != null ">and zljs = #{zljs}</if>
|
||||||
<if test="isdel != null and isdel != ''"> and isdel = #{isdel}</if>
|
<if test="isdel != null and isdel != ''">and isdel = #{isdel}</if>
|
||||||
<if test="createtime != null "> and createtime = #{createtime}</if>
|
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||||
</where>
|
<!-- 数据范围过滤 -->
|
||||||
|
${dataScope}
|
||||||
|
|
||||||
|
order by createtime desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByClassById" parameterType="String" resultMap="ByClassResult">
|
<select id="selectByClassById" parameterType="String" resultMap="ByClassResult">
|
||||||
@ -51,7 +54,7 @@
|
|||||||
insert into by_class
|
insert into by_class
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="bjbh != null and bjbh != ''">bjbh,</if>
|
<if test="bjbh != null and bjbh != ''">bjbh,</if>
|
||||||
<if test="schoolid != null and schoolid != ''">schoolid,</if>
|
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||||
<if test="bjtype != null and bjtype != ''">bjtype,</if>
|
<if test="bjtype != null and bjtype != ''">bjtype,</if>
|
||||||
<if test="bhxh != null ">bhxh,</if>
|
<if test="bhxh != null ">bhxh,</if>
|
||||||
<if test="xn != null and xn != ''">xn,</if>
|
<if test="xn != null and xn != ''">xn,</if>
|
||||||
@ -66,7 +69,7 @@
|
|||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="bjbh != null and bjbh != ''">#{bjbh},</if>
|
<if test="bjbh != null and bjbh != ''">#{bjbh},</if>
|
||||||
<if test="schoolid != null and schoolid != ''">#{schoolid},</if>
|
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||||
<if test="bjtype != null and bjtype != ''">#{bjtype},</if>
|
<if test="bjtype != null and bjtype != ''">#{bjtype},</if>
|
||||||
<if test="bhxh != null ">#{bhxh},</if>
|
<if test="bhxh != null ">#{bhxh},</if>
|
||||||
<if test="xn != null and xn != ''">#{xn},</if>
|
<if test="xn != null and xn != ''">#{xn},</if>
|
||||||
@ -84,7 +87,7 @@
|
|||||||
<update id="updateByClass" parameterType="ByClass">
|
<update id="updateByClass" parameterType="ByClass">
|
||||||
update by_class
|
update by_class
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="schoolid != null and schoolid != ''">schoolid = #{schoolid},</if>
|
<if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
|
||||||
<if test="bjtype != null and bjtype != ''">bjtype = #{bjtype},</if>
|
<if test="bjtype != null and bjtype != ''">bjtype = #{bjtype},</if>
|
||||||
<if test="bhxh != null ">bhxh = #{bhxh},</if>
|
<if test="bhxh != null ">bhxh = #{bhxh},</if>
|
||||||
<if test="xn != null and xn != ''">xn = #{xn},</if>
|
<if test="xn != null and xn != ''">xn = #{xn},</if>
|
||||||
@ -101,11 +104,11 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteByClassById" parameterType="String">
|
<delete id="deleteByClassById" parameterType="String">
|
||||||
delete from by_class where bjbh = #{bjbh}
|
update by_class set isdel='1'where bjbh = #{bjbh}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteByClassByIds" parameterType="String">
|
<delete id="deleteByClassByIds" parameterType="String">
|
||||||
delete from by_class where bjbh in
|
update by_class set isdel='1' where bjbh in
|
||||||
<foreach item="bjbh" collection="array" open="(" separator="," close=")">
|
<foreach item="bjbh" collection="array" open="(" separator="," close=")">
|
||||||
#{bjbh}
|
#{bjbh}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
Reference in New Issue
Block a user