Commit 67725b50 by Cat
parents 418fd5ff e84cb5d5
...@@ -13,7 +13,12 @@ spring: ...@@ -13,7 +13,12 @@ spring:
url: jdbc:mysql://1.116.38.25:3986/dd_smart_school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true url: jdbc:mysql://1.116.38.25:3986/dd_smart_school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
username: root username: root
password: qianhe2022 password: qianhe2022
#二中
# master: # master:
# url: jdbc:mysql://10.20.100.201:3306/dd_smart_school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
# username: root
# password: root!@#$%^123
## master:
# url: jdbc:mysql://43.143.63.140:3306/school_platform?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true # url: jdbc:mysql://43.143.63.140:3306/school_platform?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
# username: root # username: root
# password: lbt@@18062367596 # password: lbt@@18062367596
...@@ -21,10 +26,11 @@ spring: ...@@ -21,10 +26,11 @@ spring:
# url: jdbc:mysql://localhost:3306/school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true # url: jdbc:mysql://localhost:3306/school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
# username: root # username: root
# password: root # password: root
# 二中部署地址
# master: # master:
# url: jdbc:mysql://10.20.100.201:3306/school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true # url: jdbc:mysql://10.20.100.201:3306/dd_smart_school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
# username: root # username: root
# password: root # password: root!@#$%^123
# master: # master:
# url: jdbc:mysql://rm-2zert6y5n3f3499g6fo.mysql.rds.aliyuncs.com:3306/school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true # url: jdbc:mysql://rm-2zert6y5n3f3499g6fo.mysql.rds.aliyuncs.com:3306/school?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
# username: zhxy # username: zhxy
......
...@@ -88,6 +88,13 @@ spring: ...@@ -88,6 +88,13 @@ spring:
enabled: false enabled: false
# redis 配置 # redis 配置
redis: redis:
# #二中
# host: 10.20.100.200
# port: 6379
# # 数据库索引
# database: 10
# # 密码
# password: root@!@#123
# 地址 # 地址
# host: localhost # host: localhost
host: 1.116.38.25 host: 1.116.38.25
......
...@@ -86,3 +86,10 @@ export function listDisciplinetg(query) { ...@@ -86,3 +86,10 @@ export function listDisciplinetg(query) {
params: query, params: query,
}); });
} }
//获取教师下拉框
export function getTeacher() {
return request({
url: "/schoolLabCompetition/getTeacher",
method: "get",
});
}
...@@ -298,8 +298,19 @@ export default { ...@@ -298,8 +298,19 @@ export default {
getAwards(id).then((response) => { getAwards(id).then((response) => {
this.form = response.data; this.form = response.data;
this.accessoryUrl = this.pev + this.picUrl this.accessoryUrl = this.pev + this.picUrl
this.form.competentDeptId = response.data.competentDeptId;
const params = {
competentDeptId: this.form.competentDeptId
}
getDeptLeader(params).then(response => {
this.getDeptLeaders = response.rows;
}).catch(error => {
});
this.dialogTableVisible = true; this.dialogTableVisible = true;
}).catch(error => { }
).catch(error => {
this.$modal.closeLoading(); this.$modal.closeLoading();
}) })
......
...@@ -301,8 +301,19 @@ export default { ...@@ -301,8 +301,19 @@ export default {
getAwards(id).then((response) => { getAwards(id).then((response) => {
this.form = response.data; this.form = response.data;
this.accessoryUrl = this.pev + this.picUrl this.accessoryUrl = this.pev + this.picUrl
this.form.competentDeptId = response.data.competentDeptId;
const params = {
competentDeptId: this.form.competentDeptId
}
getDeptLeader(params).then(response => {
this.getDeptLeaders = response.rows;
}).catch(error => {
});
this.dialogTableVisible = true; this.dialogTableVisible = true;
}).catch(error => { }
).catch(error => {
this.$modal.closeLoading(); this.$modal.closeLoading();
}) })
...@@ -445,7 +456,7 @@ export default { ...@@ -445,7 +456,7 @@ export default {
}, },
getLeader(competentDeptId) { getLeader(competentDeptId) {
getDeptLeader({ competentDeptId }).then(response => { // 使用 ES6 简写对象字面量 getDeptLeader({ competentDeptId }).then(response => {
this.getDeptLeaders = response.rows; this.getDeptLeaders = response.rows;
console.log(response.rows, 'response.rows'); console.log(response.rows, 'response.rows');
console.log(this.getDeptLeaders, 'getDeptLeaders'); console.log(this.getDeptLeaders, 'getDeptLeaders');
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<!-- 查看弹框 --> <!-- 查看弹框 -->
<el-dialog title="详细信息" :visible.sync="dialogTableVisible" width="1100px"> <el-dialog title="详细信息" :visible.sync="dialogTableVisible" width="1100px">
<el-form :model="form" ref="form" size="small" label-width="110px" :rules="rules"> <el-form :model="form" ref="form" size="small" label-width="110px" :rules="rules" :disabled="isEdit">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="比赛名称" prop="competitionName"> <el-form-item label="比赛名称" prop="competitionName">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="获奖名称" prop="awardsName "> <el-form-item label="获奖名称" prop="awardsName">
<el-input v-model="form.awardsName" placeholder="请输入" clearable <el-input v-model="form.awardsName" placeholder="请输入" clearable
:style="{ width: '100%' }"></el-input> :style="{ width: '100%' }"></el-input>
</el-form-item> </el-form-item>
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="主管部门" prop="competentDeptId"> <el-form-item label="主管部门" prop="competentDeptId">
<Treeselect v-model="form.competentDeptId" :options="deptOptions" :show-count="true" <Treeselect v-model="form.competentDeptId" :options="deptOptions" :show-count="true"
placeholder="请选择" :default-expand-level=1 :style="{ width: '100%' }" placeholder="请选择" :default-expand-level=1 :style="{ width: '100%' }" @change="onOrgSelect"
@change="onOrgSelect" /> :disabled="isEdit" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -168,7 +168,6 @@ ...@@ -168,7 +168,6 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer" style="text-align: center;"> <div slot="footer" class="dialog-footer" style="text-align: center;">
<el-button type="primary" @click="submitForm"> 确 定</el-button>
<el-button @click="cancelDialog"> 取 消 </el-button> <el-button @click="cancelDialog"> 取 消 </el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -192,6 +191,7 @@ import { ...@@ -192,6 +191,7 @@ import {
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar' import picAvatar from '@/views/smartSchool/schoolManage/introduce/schoolInfo/profile/picAvatar'
import { InsertDropdownListsHeaders } from '@alicloud/dingtalk/dist/doc_1_0/client'
export default { export default {
name: 'index', name: 'index',
components: { Treeselect, picAvatar }, components: { Treeselect, picAvatar },
...@@ -209,6 +209,7 @@ export default { ...@@ -209,6 +209,7 @@ export default {
competentDeptId: null, competentDeptId: null,
}, },
isEdit: false,
uploadLoading: false, uploadLoading: false,
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
getDeptLeaders: [], getDeptLeaders: [],
...@@ -275,7 +276,7 @@ export default { ...@@ -275,7 +276,7 @@ export default {
}, },
methods: { methods: {
//查看
handleEdit(row) { handleEdit(row) {
console.log(row); console.log(row);
const id = row.id || this.ids; const id = row.id || this.ids;
...@@ -283,6 +284,7 @@ export default { ...@@ -283,6 +284,7 @@ export default {
this.form = response.data; this.form = response.data;
this.accessoryUrl = this.pev + this.picUrl this.accessoryUrl = this.pev + this.picUrl
this.dialogTableVisible = true; this.dialogTableVisible = true;
this.isEdit = true;
}).catch(error => { }).catch(error => {
this.$modal.closeLoading(); this.$modal.closeLoading();
}) })
...@@ -384,26 +386,18 @@ export default { ...@@ -384,26 +386,18 @@ export default {
}, },
resetQuery() { resetQuery() {
this.form = { this.queryForm = {
pageNum: 1,
pageSize: 10,
competitionName: "",
organizer: "",
awardsName: "",
competentDeptId: null,
awardsLevel: "", awardsLevel: "",
deptDirectorId: null,
awardsTime: "",
awardsType: "", awardsType: "",
remark: "", startTime: "",
schoolAccessoryList: [], endTime: "",
competentDeptId: null,
}, },
this.schoolAccessoryList = [], this.schoolAccessoryList = [],
this.getList(); this.getList();
}, },
}, },
} }
</script> </script>
......
...@@ -30,6 +30,7 @@ export default { ...@@ -30,6 +30,7 @@ export default {
getCode() { getCode() {
dd.getAuthCode({ dd.getAuthCode({
corpId: 'dingaa3937ff8b7dd267f2c783f7214b6d69', corpId: 'dingaa3937ff8b7dd267f2c783f7214b6d69',
// corpId: 'dingccea40788226c988f2c783f7214b6d69',
success: (res) => { success: (res) => {
console.log('获取新的免登码成功', res); console.log('获取新的免登码成功', res);
const code = res.code const code = res.code
......
package yangtz.cs.liu.campus.controller.schoolRewardsPunishments; package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -40,27 +41,41 @@ public class SchoolScAwardsController extends BaseController ...@@ -40,27 +41,41 @@ public class SchoolScAwardsController extends BaseController
private ISchoolScAwardsService schoolScAwardsService; private ISchoolScAwardsService schoolScAwardsService;
/** /**
* 查询学校获奖列表 * 查询学校获奖列表(管理员)
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SchoolScAwardsVo schoolScAwardsVo) public TableDataInfo list(SchoolScAwardsVo schoolScAwardsVo)
{ {
schoolScAwardsVo.setAuditState("0");
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
}
/**
* 查询学校获奖列表(查看已通过)
*/
@GetMapping("/listTg")
public TableDataInfo listTg(SchoolScAwardsVo schoolScAwardsVo)
{
schoolScAwardsVo.setAuditState("2");
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsListTg(schoolScAwardsVo);
return getDataTable(list);
}
/**
* 查询学校获奖列表(个人)
*/
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolScAwardsVo schoolScAwardsVo)
{
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
//用户角色集合
List<SysRole> roles = user.getRoles();
//管理员查询全部 //管理员查询全部
if (user.isAdmin()) { if (user.isAdmin()) {
startPage(); startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo); List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list); return getDataTable(list);
} else if (roles.size() > 0){
for (SysRole role : roles) {
if (role.getRoleKey().equals("award_admin")){
startPage();
List<SchoolScAwardsVo> list = schoolScAwardsService.selectSchoolScAwardsList(schoolScAwardsVo);
return getDataTable(list);
}
}
} }
//用户查看个人列表 //用户查看个人列表
schoolScAwardsVo.setApplyId(user.getUserId()); schoolScAwardsVo.setApplyId(user.getUserId());
...@@ -91,12 +106,23 @@ public class SchoolScAwardsController extends BaseController ...@@ -91,12 +106,23 @@ public class SchoolScAwardsController extends BaseController
} }
/** /**
* 新增学校获奖 * 新增学校获奖(管理员)
*/ */
@Log(title = "学校获奖", businessType = BusinessType.INSERT) @Log(title = "学校获奖", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolScAwardsVo schoolScAwardsVo) public AjaxResult add(@RequestBody SchoolScAwardsVo schoolScAwardsVo)
{ {
schoolScAwardsVo.setAuditState("1");
return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo));
}
/**
* 新增学校获奖(个人)
*/
@Log(title = "学校获奖", businessType = BusinessType.INSERT)
@PostMapping("/addGr")
public AjaxResult addGr(@RequestBody SchoolScAwardsVo schoolScAwardsVo)
{
return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo)); return toAjax(schoolScAwardsService.insertSchoolScAwards(schoolScAwardsVo));
} }
......
...@@ -2,6 +2,9 @@ package yangtz.cs.liu.campus.controller.schoolRewardsPunishments; ...@@ -2,6 +2,9 @@ package yangtz.cs.liu.campus.controller.schoolRewardsPunishments;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
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;
...@@ -18,6 +21,7 @@ import com.ruoyi.common.core.domain.AjaxResult; ...@@ -18,6 +21,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScAwards;
import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline; import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService; import yangtz.cs.liu.campus.service.schoolRewardsPunishments.ISchoolScDisciplineService;
...@@ -35,11 +39,43 @@ public class SchoolScDisciplineController extends BaseController ...@@ -35,11 +39,43 @@ public class SchoolScDisciplineController extends BaseController
private ISchoolScDisciplineService schoolScDisciplineService; private ISchoolScDisciplineService schoolScDisciplineService;
/** /**
* 查询学生违纪列表 * 查询学生违纪列表(管理员)
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SchoolScDiscipline schoolScDiscipline) public TableDataInfo list(SchoolScDiscipline schoolScDiscipline)
{ {
schoolScDiscipline.setAuditState("0");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
}
/**
* 查询学生违纪列表(查看已通过)
*/
@GetMapping("/listTg")
public TableDataInfo listTg(SchoolScDiscipline schoolScDiscipline)
{
schoolScDiscipline.setAuditState("2");
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineListTg(schoolScDiscipline);
return getDataTable(list);
}
/**
* 查询学生违纪列表(个人)
*/
@GetMapping("/listGr")
public TableDataInfo listGr(SchoolScDiscipline schoolScDiscipline)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//管理员返回全部
if (user.isAdmin()) {
startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list);
}
schoolScDiscipline.setApplyId(SecurityUtils.getUserId());
startPage(); startPage();
List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline); List<SchoolScDiscipline> list = schoolScDisciplineService.selectSchoolScDisciplineList(schoolScDiscipline);
return getDataTable(list); return getDataTable(list);
...@@ -67,12 +103,23 @@ public class SchoolScDisciplineController extends BaseController ...@@ -67,12 +103,23 @@ public class SchoolScDisciplineController extends BaseController
} }
/** /**
* 新增学生违纪 * 新增学生违纪(管理员)
*/ */
@Log(title = "学生违纪", businessType = BusinessType.INSERT) @Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping @PostMapping("/add")
public AjaxResult add(@RequestBody SchoolScDiscipline schoolScDiscipline) public AjaxResult add(@RequestBody SchoolScDiscipline schoolScDiscipline)
{ {
schoolScDiscipline.setAuditState("1");
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
}
/**
* 新增学生违纪(个人)
*/
@Log(title = "学生违纪", businessType = BusinessType.INSERT)
@PostMapping("/addGr")
public AjaxResult addGr(@RequestBody SchoolScDiscipline schoolScDiscipline)
{
return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline)); return toAjax(schoolScDisciplineService.insertSchoolScDiscipline(schoolScDiscipline));
} }
...@@ -80,7 +127,7 @@ public class SchoolScDisciplineController extends BaseController ...@@ -80,7 +127,7 @@ public class SchoolScDisciplineController extends BaseController
* 修改学生违纪 * 修改学生违纪
*/ */
@Log(title = "学生违纪", businessType = BusinessType.UPDATE) @Log(title = "学生违纪", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolScDiscipline schoolScDiscipline) public AjaxResult edit(@RequestBody SchoolScDiscipline schoolScDiscipline)
{ {
return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDiscipline)); return toAjax(schoolScDisciplineService.updateSchoolScDiscipline(schoolScDiscipline));
...@@ -97,6 +144,15 @@ public class SchoolScDisciplineController extends BaseController ...@@ -97,6 +144,15 @@ public class SchoolScDisciplineController extends BaseController
} }
/** /**
* 提交/审核
*/
@PutMapping("/submit")
public AjaxResult submit(@RequestBody SchoolScDiscipline schoolScDiscipline)
{
return toAjax(schoolScDisciplineService.updateById(schoolScDiscipline));
}
/**
* 获取最新三个年级 * 获取最新三个年级
*/ */
@GetMapping("/getGrade") @GetMapping("/getGrade")
...@@ -107,8 +163,8 @@ public class SchoolScDisciplineController extends BaseController ...@@ -107,8 +163,8 @@ public class SchoolScDisciplineController extends BaseController
/** /**
* 根据年级获取班级 * 根据年级获取班级
*/ */
@GetMapping("/getClassList/{gradeId}") @GetMapping("/getClassList")
public AjaxResult getClassList(@PathVariable("gradeId") Long gradeId){ public AjaxResult getClassList(Long gradeId){
return AjaxResult.success(schoolScDisciplineService.getClassList(gradeId)); return AjaxResult.success(schoolScDisciplineService.getClassList(gradeId));
} }
} }
...@@ -60,10 +60,16 @@ public class SchoolScDiscipline extends OurBaseEntity ...@@ -60,10 +60,16 @@ public class SchoolScDiscipline extends OurBaseEntity
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String idCard; private String idCard;
/** 班主任id */
private Long classTeacherId;
/** 班主任 */ /** 班主任 */
@Excel(name = "班主任") @Excel(name = "班主任")
private String classTeacher; private String classTeacher;
/** 级部主任id */
private Long gradeDirectorId;
/** 级部主任 */ /** 级部主任 */
@Excel(name = "级部主任") @Excel(name = "级部主任")
private String gradeDirector; private String gradeDirector;
......
...@@ -32,6 +32,14 @@ public interface SchoolScAwardsMapper extends BaseMapper<SchoolScAwards> ...@@ -32,6 +32,14 @@ public interface SchoolScAwardsMapper extends BaseMapper<SchoolScAwards>
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo); public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo);
/** /**
* 查询学校获奖列表(查看已通过)
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖集合
*/
public List<SchoolScAwardsVo> selectSchoolScAwardsListTg(SchoolScAwardsVo schoolScAwardsVo);
/**
* 新增学校获奖 * 新增学校获奖
* *
* @param schoolScAwardsVo 学校获奖 * @param schoolScAwardsVo 学校获奖
......
...@@ -31,6 +31,14 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline> ...@@ -31,6 +31,14 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline); public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline);
/** /**
* 查询学生违纪列表(查看已通过)
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪集合
*/
List<SchoolScDiscipline> selectSchoolScDisciplineListTg(SchoolScDiscipline schoolScDiscipline);
/**
* 新增学生违纪 * 新增学生违纪
* *
* @param schoolScDiscipline 学生违纪 * @param schoolScDiscipline 学生违纪
...@@ -74,4 +82,6 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline> ...@@ -74,4 +82,6 @@ public interface SchoolScDisciplineMapper extends BaseMapper<SchoolScDiscipline>
* @return * @return
*/ */
List<Map<String, Object>> getClassList(Long gradeId); List<Map<String, Object>> getClassList(Long gradeId);
} }
...@@ -52,19 +52,46 @@ public class SchoolScAwardsServiceImpl extends ServiceImpl<SchoolScAwardsMapper, ...@@ -52,19 +52,46 @@ public class SchoolScAwardsServiceImpl extends ServiceImpl<SchoolScAwardsMapper,
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo) public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo)
{ {
List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsList(schoolScAwardsVo); List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsList(schoolScAwardsVo);
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
//获取学校获奖所有附件 //获取学校获奖所有附件
List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList(); List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList();
schoolScAwardsVos.forEach(schoolScAwardsVo1 -> { for (SchoolScAwardsVo scAwardsVo : schoolScAwardsVos) {
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : schoolAccessories) { for (SchoolAccessory schoolAccessory : schoolAccessories) {
if (schoolAccessory.getBusinessId().equals(schoolScAwardsVo1.getId())){ if (schoolAccessory.getBusinessId().equals(scAwardsVo.getId())){
schoolAccessoryList.add(schoolAccessory); schoolAccessoryList.add(schoolAccessory);
} }
} }
if (schoolAccessoryList.size() > 0){ if (schoolAccessoryList.size() > 0){
schoolScAwardsVo1.setSchoolAccessoryList(schoolAccessoryList); scAwardsVo.setSchoolAccessoryList(schoolAccessoryList);
} }
}); }
return schoolScAwardsVos;
}
/**
* 查询学校获奖列表(查看已通过)
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖
*/
@Override
public List<SchoolScAwardsVo> selectSchoolScAwardsListTg(SchoolScAwardsVo schoolScAwardsVo)
{
List<SchoolScAwardsVo> schoolScAwardsVos = schoolScAwardsMapper.selectSchoolScAwardsListTg(schoolScAwardsVo);
//获取学校获奖所有附件
List<SchoolAccessory> schoolAccessories = schoolScAwardsMapper.selectAccessoryList();
for (SchoolScAwardsVo scAwardsVo : schoolScAwardsVos) {
List<SchoolAccessory> schoolAccessoryList = new ArrayList<>();
for (SchoolAccessory schoolAccessory : schoolAccessories) {
if (schoolAccessory.getBusinessId().equals(scAwardsVo.getId())){
schoolAccessoryList.add(schoolAccessory);
}
}
if (schoolAccessoryList.size() > 0){
scAwardsVo.setSchoolAccessoryList(schoolAccessoryList);
}
}
return schoolScAwardsVos; return schoolScAwardsVos;
} }
......
package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments; package yangtz.cs.liu.campus.service.impl.schoolRewardsPunishments;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
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 yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline; import yangtz.cs.liu.campus.domain.schoolRewardsPunishments.SchoolScDiscipline;
...@@ -48,6 +50,18 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin ...@@ -48,6 +50,18 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
} }
/** /**
* 查询学生违纪列表(查看已通过)
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪
*/
@Override
public List<SchoolScDiscipline> selectSchoolScDisciplineListTg(SchoolScDiscipline schoolScDiscipline)
{
return schoolScDisciplineMapper.selectSchoolScDisciplineListTg(schoolScDiscipline);
}
/**
* 新增学生违纪 * 新增学生违纪
* *
* @param schoolScDiscipline 学生违纪 * @param schoolScDiscipline 学生违纪
...@@ -56,6 +70,11 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin ...@@ -56,6 +70,11 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
@Override @Override
public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline) public int insertSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
{ {
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolScDiscipline.setApplyId(user.getUserId());
schoolScDiscipline.setApplyName(user.getUserName());
schoolScDiscipline.setApplyTime(DateUtils.getNowDate());
schoolScDiscipline.setCreateBy(user.getUserName());
schoolScDiscipline.setCreateTime(DateUtils.getNowDate()); schoolScDiscipline.setCreateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDiscipline); return schoolScDisciplineMapper.insertSchoolScDiscipline(schoolScDiscipline);
} }
...@@ -69,6 +88,7 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin ...@@ -69,6 +88,7 @@ public class SchoolScDisciplineServiceImpl extends ServiceImpl<SchoolScDisciplin
@Override @Override
public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline) public int updateSchoolScDiscipline(SchoolScDiscipline schoolScDiscipline)
{ {
schoolScDiscipline.setUpdateBy(SecurityUtils.getUsername());
schoolScDiscipline.setUpdateTime(DateUtils.getNowDate()); schoolScDiscipline.setUpdateTime(DateUtils.getNowDate());
return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDiscipline); return schoolScDisciplineMapper.updateSchoolScDiscipline(schoolScDiscipline);
} }
......
...@@ -31,6 +31,14 @@ public interface ISchoolScAwardsService extends IService<SchoolScAwards> ...@@ -31,6 +31,14 @@ public interface ISchoolScAwardsService extends IService<SchoolScAwards>
public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo); public List<SchoolScAwardsVo> selectSchoolScAwardsList(SchoolScAwardsVo schoolScAwardsVo);
/** /**
* 查询学校获奖列表(查看已通过)
*
* @param schoolScAwardsVo 学校获奖
* @return 学校获奖集合
*/
public List<SchoolScAwardsVo> selectSchoolScAwardsListTg(SchoolScAwardsVo schoolScAwardsVo);
/**
* 新增学校获奖 * 新增学校获奖
* *
* @param schoolScAwardsVo 学校获奖 * @param schoolScAwardsVo 学校获奖
......
...@@ -31,6 +31,14 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline> ...@@ -31,6 +31,14 @@ public interface ISchoolScDisciplineService extends IService<SchoolScDiscipline>
public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline); public List<SchoolScDiscipline> selectSchoolScDisciplineList(SchoolScDiscipline schoolScDiscipline);
/** /**
* 查询学生违纪列表(查看已通过)
*
* @param schoolScDiscipline 学生违纪
* @return 学生违纪集合
*/
public List<SchoolScDiscipline> selectSchoolScDisciplineListTg(SchoolScDiscipline schoolScDiscipline);
/**
* 新增学生违纪 * 新增学生违纪
* *
* @param schoolScDiscipline 学生违纪 * @param schoolScDiscipline 学生违纪
......
...@@ -102,10 +102,8 @@ public class SchoolScAwardsVo ...@@ -102,10 +102,8 @@ public class SchoolScAwardsVo
private List<SchoolAccessory> schoolAccessoryList; private List<SchoolAccessory> schoolAccessoryList;
/** 开始时间 */ /** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd") private String startTime;
private Date startTime;
/** 结束时间 */ /** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd") private String endTime;
private Date endTime;
} }
...@@ -469,7 +469,9 @@ public class DingJiaXiaoController { ...@@ -469,7 +469,9 @@ public class DingJiaXiaoController {
schoolStudentParent1.setStudentId(ddUserId); schoolStudentParent1.setStudentId(ddUserId);
schoolStudentParent1.setUserId(userId); schoolStudentParent1.setUserId(userId);
schoolStudentParent1.setParentName(guarDate.getName()); schoolStudentParent1.setParentName(guarDate.getName());
schoolStudentParent1.setTelephone(guarDate.getMobile()); schoolStudentParent1.setTelephone(guarDate.getMobile
());
Integer patriarch = this.getPatriarch(guarDate.getName().substring(guarDate.getName().length() - 2)); Integer patriarch = this.getPatriarch(guarDate.getName().substring(guarDate.getName().length() - 2));
schoolStudentParent1.setRelationship(String.valueOf(patriarch)); schoolStudentParent1.setRelationship(String.valueOf(patriarch));
iSchoolStudentParentService.updateById(schoolStudentParent1); iSchoolStudentParentService.updateById(schoolStudentParent1);
...@@ -478,9 +480,6 @@ public class DingJiaXiaoController { ...@@ -478,9 +480,6 @@ public class DingJiaXiaoController {
} }
} }
} }
return "完成"; return "完成";
} }
......
...@@ -219,94 +219,99 @@ public class DdDeptServcieImpl implements IDdDeptService { ...@@ -219,94 +219,99 @@ public class DdDeptServcieImpl implements IDdDeptService {
@Override @Override
@Transactional @Transactional
public String syncDdDept() { public String syncDdDept() {
//获取钉钉所有部门列表
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList = getDeptList();
//存放钉钉部门不存在系统库集合
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList1 = new ArrayList<>();
ddDeptList1.addAll(ddDeptList);
//获取系统所有部门列表 //获取系统所有部门列表
List<SysDdDept> deptList = ddDeptMapper.selectDdDeptList(new SysDdDept()); List<SysDdDept> deptList = ddDeptMapper.selectDdDeptList(new SysDdDept());
//存放钉钉删除了的部门集合 if (deptList.size() <= 0){
List<SysDdDept> deptList1 = new ArrayList<>(); addDdDept();
deptList1.addAll(deptList); }else{
//获取钉钉所有部门列表
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList = getDeptList();
//存放钉钉部门不存在系统库集合
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> ddDeptList1 = new ArrayList<>();
ddDeptList1.addAll(ddDeptList);
//判断钉钉部门列表是否都在系统部门列表中
for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList) { //存放钉钉删除了的部门集合
for (SysDdDept dept : deptList) { List<SysDdDept> deptList1 = new ArrayList<>();
if (ddDept.getDeptId().equals(dept.getDdDeptId())){ deptList1.addAll(deptList);
//存在,从集合中去除
ddDeptList1.remove(ddDept); //判断钉钉部门列表是否都在系统部门列表中
for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList) {
for (SysDdDept dept : deptList) {
if (ddDept.getDeptId().equals(dept.getDdDeptId())){
//存在,从集合中去除
ddDeptList1.remove(ddDept);
}
} }
} }
}
//新增不存在系统库的部门 //新增不存在系统库的部门
if(ddDeptList1.size() > 0){ if(ddDeptList1.size() > 0){
for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList1) { for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList1) {
//钉钉父部门id //钉钉父部门id
Long ddParentId = ddDept.getParentId(); Long ddParentId = ddDept.getParentId();
//查询父部门信息 //查询父部门信息
SysDdDept ddDept1 = ddDeptMapper.selectDeptByDdDeptId(ddParentId); SysDdDept ddDept1 = ddDeptMapper.selectDeptByDdDeptId(ddParentId);
//新增 //新增
SysDdDept sysDdDept = new SysDdDept(); SysDdDept sysDdDept = new SysDdDept();
sysDdDept.setParentId(ddDept1.getDeptId()); sysDdDept.setParentId(ddDept1.getDeptId());
sysDdDept.setAncestors(ddDept1.getAncestors() + ddDept1.getDeptId()); sysDdDept.setAncestors(ddDept1.getAncestors() + ddDept1.getDeptId());
sysDdDept.setDeptName(ddDept.getName()); sysDdDept.setDeptName(ddDept.getName());
sysDdDept.setOrderNum(ddDept.getDeptId()); sysDdDept.setOrderNum(ddDept.getDeptId());
sysDdDept.setDdDeptId(ddDept.getDeptId()); sysDdDept.setDdDeptId(ddDept.getDeptId());
sysDdDept.setDdParentId(ddParentId); sysDdDept.setDdParentId(ddParentId);
sysDdDept.setCreateBy("钉钉管理员"); sysDdDept.setCreateBy("钉钉管理员");
ddDeptMapper.insertDdDept(sysDdDept); ddDeptMapper.insertDdDept(sysDdDept);
}
} }
}
//判断钉钉中删除的部门是否还存在系统部门中 //判断钉钉中删除的部门是否还存在系统部门中
for (SysDdDept dept : deptList) { for (SysDdDept dept : deptList) {
for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList) { for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList) {
if (dept.getDdDeptId().equals(ddDept.getDeptId())){ if (ddDept.getDeptId().equals(dept.getDdDeptId())){
deptList1.remove(dept); deptList1.remove(dept);
}
} }
} }
} //删除系统部门中存在的钉钉已删除的部门
//删除系统部门中存在的钉钉已删除的部门 if (deptList1.size() > 0){
if (deptList1.size() > 0){ for (SysDdDept dept : deptList1) {
for (SysDdDept dept : deptList1) { if (dept.getDeptId() != 100){
if (dept.getDeptId() != 100){ ddDeptMapper.deleteDdDeptById(dept.getDeptId());
ddDeptMapper.deleteDdDeptById(dept.getDeptId()); }
} }
} }
}
//更新系统部门信息 //更新系统部门信息
//获取部门详情 //获取部门详情
OapiV2DepartmentGetResponse.DeptGetResponse djDept = dingDeptUtils.getDept(1L, ""); OapiV2DepartmentGetResponse.DeptGetResponse djDept = dingDeptUtils.getDept(1L, "");
//修改顶级目录 //修改顶级目录
SysDdDept dept = new SysDdDept(); SysDdDept dept = new SysDdDept();
dept.setDdDeptId(djDept.getDeptId()); dept.setDdDeptId(djDept.getDeptId());
dept.setDeptName(djDept.getName()); dept.setDeptName(djDept.getName());
dept.setUpdateBy("钉钉管理员"); dept.setUpdateBy("钉钉管理员");
ddDeptMapper.updateDdDeptByDdDeptId(dept); ddDeptMapper.updateDdDeptByDdDeptId(dept);
for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList) { for (OapiV2DepartmentListsubResponse.DeptBaseResponse ddDept : ddDeptList) {
for (SysDdDept sysDdDept : deptList) { for (SysDdDept sysDdDept : deptList) {
if (ddDept.getDeptId().equals(sysDdDept.getDdDeptId())){ if (ddDept.getDeptId().equals(sysDdDept.getDdDeptId())){
//判断父部门是否发生改变 //判断父部门是否发生改变
if (!(ddDept.getParentId().equals(sysDdDept.getDdParentId()))){ if (!(ddDept.getParentId().equals(sysDdDept.getDdParentId()))){
//钉钉父部门id //钉钉父部门id
Long ddParentId = ddDept.getParentId(); Long ddParentId = ddDept.getParentId();
//查询父部门信息 //查询父部门信息
SysDdDept ddParentDept = ddDeptMapper.selectDeptByDdDeptId(ddParentId); SysDdDept ddParentDept = ddDeptMapper.selectDeptByDdDeptId(ddParentId);
sysDdDept.setParentId(ddParentDept.getDeptId()); sysDdDept.setParentId(ddParentDept.getDeptId());
sysDdDept.setAncestors(ddParentDept.getAncestors() + "," + ddParentDept.getDeptId()); sysDdDept.setAncestors(ddParentDept.getAncestors() + "," + ddParentDept.getDeptId());
sysDdDept.setDdParentId(ddDept.getParentId()); sysDdDept.setDdParentId(ddDept.getParentId());
sysDdDept.setUpdateBy("钉钉管理员"); sysDdDept.setUpdateBy("钉钉管理员");
ddDeptMapper.updateDdDeptByDdDeptId(sysDdDept); ddDeptMapper.updateDdDeptByDdDeptId(sysDdDept);
} }
//判断部门基本信息是否发生改变 //判断部门基本信息是否发生改变
if(!(ddDept.getName().equals(sysDdDept.getDeptName()))){ if(!(ddDept.getName().equals(sysDdDept.getDeptName()))){
sysDdDept.setDeptName(ddDept.getName()); sysDdDept.setDeptName(ddDept.getName());
sysDdDept.setUpdateBy("钉钉管理员"); sysDdDept.setUpdateBy("钉钉管理员");
ddDeptMapper.updateDdDeptByDdDeptId(sysDdDept); ddDeptMapper.updateDdDeptByDdDeptId(sysDdDept);
}
} }
} }
} }
......
...@@ -390,7 +390,7 @@ public class DdUserServiceImpl implements IDdUserService { ...@@ -390,7 +390,7 @@ public class DdUserServiceImpl implements IDdUserService {
//设置主部门和任职部门 //设置主部门和任职部门
if (deptPositionList.size()>0){ if (deptPositionList.size()>0){
for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) { for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) {
if (deptPosition.getIsMain()){ if (StringUtils.isNotNull(deptPosition.getIsMain()) && deptPosition.getIsMain()){
SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId()); SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId());
if (StringUtils.isNotNull(dept)){ if (StringUtils.isNotNull(dept)){
sysDdUser.setDeptId(dept.getDeptId()); sysDdUser.setDeptId(dept.getDeptId());
...@@ -533,7 +533,7 @@ public class DdUserServiceImpl implements IDdUserService { ...@@ -533,7 +533,7 @@ public class DdUserServiceImpl implements IDdUserService {
//判断钉钉已删除的用户 //判断钉钉已删除的用户
for (SysDdUser ddUser : userList) { for (SysDdUser ddUser : userList) {
for (String ddUserId : ddUserIdList) { for (String ddUserId : ddUserIdList) {
if (ddUser.getDdUserId().equals(ddUserId)){ if (ddUserId.equals(ddUser.getDdUserId())){
//存在从集合中剔除 //存在从集合中剔除
userList1.remove(ddUser); userList1.remove(ddUser);
} }
...@@ -593,7 +593,7 @@ public class DdUserServiceImpl implements IDdUserService { ...@@ -593,7 +593,7 @@ public class DdUserServiceImpl implements IDdUserService {
//设置主部门和任职部门 //设置主部门和任职部门
if (deptPositionList.size()>0){ if (deptPositionList.size()>0){
for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) { for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) {
if (deptPosition.getIsMain()){ if (StringUtils.isNotNull(deptPosition.getIsMain()) && deptPosition.getIsMain()){
SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId()); SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId());
if (StringUtils.isNotNull(dept)){ if (StringUtils.isNotNull(dept)){
sysDdUser.setDeptId(dept.getDeptId()); sysDdUser.setDeptId(dept.getDeptId());
...@@ -772,7 +772,7 @@ public class DdUserServiceImpl implements IDdUserService { ...@@ -772,7 +772,7 @@ public class DdUserServiceImpl implements IDdUserService {
//设置主部门和任职部门 //设置主部门和任职部门
if (deptPositionList.size()>0){ if (deptPositionList.size()>0){
for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) { for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) {
if (deptPosition.getIsMain()){ if (StringUtils.isNotNull(deptPosition.getIsMain()) && deptPosition.getIsMain()){
SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId()); SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId());
if (StringUtils.isNotNull(dept)){ if (StringUtils.isNotNull(dept)){
sysDdUser.setDeptId(dept.getDeptId()); sysDdUser.setDeptId(dept.getDeptId());
...@@ -948,7 +948,7 @@ public class DdUserServiceImpl implements IDdUserService { ...@@ -948,7 +948,7 @@ public class DdUserServiceImpl implements IDdUserService {
//设置主部门和任职部门 //设置主部门和任职部门
if (deptPositionList.size()>0){ if (deptPositionList.size()>0){
for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) { for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) {
if (deptPosition.getIsMain()){ if (StringUtils.isNotNull(deptPosition.getIsMain()) && deptPosition.getIsMain()){
SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId()); SysDdDept dept = ddDeptMapper.selectDeptByDdDeptId(deptPosition.getDeptId());
if (StringUtils.isNotNull(dept)){ if (StringUtils.isNotNull(dept)){
sysDdUser.setDeptId(dept.getDeptId()); sysDdUser.setDeptId(dept.getDeptId());
......
...@@ -91,7 +91,8 @@ public class WxSchoolClassController extends BaseController { ...@@ -91,7 +91,8 @@ public class WxSchoolClassController extends BaseController {
@GetMapping("/getClassById/{classId}") @GetMapping("/getClassById/{classId}")
public AjaxResult getClassById(@PathVariable("classId") Long classId) { public AjaxResult getClassById(@PathVariable("classId") Long classId) {
return AjaxResult.success(schoolClassService.getById(classId)); SchoolClass byId = schoolClassService.getById(classId);
return AjaxResult.success(byId);
} }
/** /**
...@@ -141,6 +142,9 @@ public class WxSchoolClassController extends BaseController { ...@@ -141,6 +142,9 @@ public class WxSchoolClassController extends BaseController {
*/ */
@GetMapping("/getTeachers/{classId}") @GetMapping("/getTeachers/{classId}")
public AjaxResult getTeachers(@PathVariable("classId") Long classId){ public AjaxResult getTeachers(@PathVariable("classId") Long classId){
List<SchoolTeacherVO> teachers = schoolTeacherService.getTeachers(classId); List<SchoolTeacherVO> teachers = schoolTeacherService.getTeachers(classId);
return AjaxResult.success(teachers); return AjaxResult.success(teachers);
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</resultMap> </resultMap>
<insert id="addTeacherList" parameterType="SysDdTeacher" useGeneratedKeys="true" keyProperty="id"> <insert id="addTeacherList" parameterType="SysDdTeacher" useGeneratedKeys="true" keyProperty="id">
insert into sys_teacher insert into school_teacher
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="teacherName != null">teacher_name,</if> <if test="teacherName != null">teacher_name,</if>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</insert> </insert>
<update id="updateDdTeacher" parameterType="SysDdTeacher"> <update id="updateDdTeacher" parameterType="SysDdTeacher">
update sys_teacher update school_teacher
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="teacherName != null">teacher_name = #{teacherName},</if> <if test="teacherName != null">teacher_name = #{teacherName},</if>
<if test="teacherTel != null">teacher_tel = #{teacherTel},</if> <if test="teacherTel != null">teacher_tel = #{teacherTel},</if>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<!--批量新增教师--> <!--批量新增教师-->
<insert id="batchInsertTeacher" parameterType="SysDdTeacher" useGeneratedKeys="true" keyProperty="id"> <insert id="batchInsertTeacher" parameterType="SysDdTeacher" useGeneratedKeys="true" keyProperty="id">
<foreach collection="list" item="data" separator=";"> <foreach collection="list" item="data" separator=";">
insert into sys_teacher insert into school_teacher
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="data.id != null">id,</if> <if test="data.id != null">id,</if>
<if test="data.teacherName != null">teacher_name,</if> <if test="data.teacherName != null">teacher_name,</if>
...@@ -147,7 +147,4 @@ ...@@ -147,7 +147,4 @@
</trim> </trim>
</foreach> </foreach>
</insert> </insert>
</mapper> </mapper>
...@@ -310,7 +310,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -310,7 +310,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<update id="deleteDdTeacher" parameterType="Long"> <update id="deleteDdTeacher" parameterType="Long">
update sys_teacher set del_flag = "2" where id = #{userId} update school_teacher set del_flag = "2" where id = #{userId}
</update> </update>
<select id="selectDeptIdByUserId" parameterType="Long" resultType="Long"> <select id="selectDeptIdByUserId" parameterType="Long" resultType="Long">
......
...@@ -123,6 +123,8 @@ ...@@ -123,6 +123,8 @@
WHERE m.class_id = #{classId} and m.del_flag = '0' and t.del_flag = '0' WHERE m.class_id = #{classId} and m.del_flag = '0' and t.del_flag = '0'
</select> </select>
<select id="getTeacherClass" resultType="yangtz.cs.liu.wechat.vo.schoolClass.SchoolClassVo"> <select id="getTeacherClass" resultType="yangtz.cs.liu.wechat.vo.schoolClass.SchoolClassVo">
SELECT sg.id, SELECT sg.id,
sg.teacher_name, sg.teacher_name,
...@@ -140,9 +142,11 @@ ...@@ -140,9 +142,11 @@
sg.is_graduated, sg.is_graduated,
sg.pic_url, sg.pic_url,
sg.house_name sg.house_name
FROM school_class sg FROM school_class_mentor scm
LEFT JOIN school_class_mentor scm on scm.class_id = sg.id INNER JOIN school_class_headmaster ch
WHERE scm.teacher_id = #{teacherId} and sg.school_year = #{schoolYear} ON scm.teacher_id = ch.teacher_id
INNER JOIN school_class sg on sg.id in (scm.class_id,ch.class_id)
WHERE scm.teacher_id = #{teacherId} and sg.school_year = #{schoolYear}
and sg.del_flag = '0' and sg.del_flag = '0'
and scm.del_flag = '0' and scm.del_flag = '0'
</select> </select>
......
...@@ -63,7 +63,26 @@ ...@@ -63,7 +63,26 @@
<if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if> <if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if>
<if test="awardsTime != null "> and awards_time = #{awardsTime}</if> <if test="awardsTime != null "> and awards_time = #{awardsTime}</if>
<if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if> <if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if>
<if test="auditState != null and auditState != ''"> and audit_state = #{auditState}</if> <if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where>
</select>
<select id="selectSchoolScAwardsListTg" parameterType="SchoolScAwardsVo" resultMap="SchoolScAwardsVoResult">
<include refid="selectSchoolScAwardsVo"/>
<where>
del_flag = '0' and audit_state = #{auditState}
<if test="competitionName != null and competitionName != ''"> and competition_name like concat('%', #{competitionName}, '%')</if>
<if test="organizer != null and organizer != ''"> and organizer = #{organizer}</if>
<if test="awardsName != null and awardsName != ''"> and awards_name like concat('%', #{awardsName}, '%')</if>
<if test="competentDeptId != null "> and competent_dept_id = #{competentDeptId}</if>
<if test="competentDept != null and competentDept != ''"> and competent_dept = #{competentDept}</if>
<if test="awardsLevel != null and awardsLevel != ''"> and awards_level = #{awardsLevel}</if>
<if test="deptDirectorId != null "> and dept_director_id = #{deptDirectorId}</if>
<if test="deptDirector != null and deptDirector != ''"> and dept_director = #{deptDirector}</if>
<if test="awardsTime != null "> and awards_time = #{awardsTime}</if>
<if test="awardsType != null and awardsType != ''"> and awards_type = #{awardsType}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if> <if test="applyId != null "> and apply_id = #{applyId}</if>
<if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if> <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">and DATE_FORMAT(awards_time,'%Y-%m-%d') between #{startTime} and #{endTime}</if>
</where> </where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment