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