Commit 0fd091ed by zhaopanyu

Merge branch 'master' of 49.232.152.146:qangqi/dd_school

parents def45b0b 018ff7d1
...@@ -385,6 +385,11 @@ ...@@ -385,6 +385,11 @@
:src="baseUrl + accessory.accessoryUrl" :src="baseUrl + accessory.accessoryUrl"
style="width: 150px" style="width: 150px"
/> />
<a
:src="baseUrl + accessory.accessoryUrl"
style="width: 150px"
>{{ accessory.accessoryName }}</a
>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</template> </template>
...@@ -438,6 +443,11 @@ ...@@ -438,6 +443,11 @@
:src="baseUrl + accessory.accessoryUrl" :src="baseUrl + accessory.accessoryUrl"
style="width: 150px" style="width: 150px"
/> />
<a
:href="baseUrl + accessory.accessoryUrl"
style="width: 150px"
>{{ accessory.accessoryName }}</a
>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</template> </template>
...@@ -490,6 +500,11 @@ ...@@ -490,6 +500,11 @@
:src="baseUrl + accessory.accessoryUrl" :src="baseUrl + accessory.accessoryUrl"
style="width: 150px" style="width: 150px"
/> />
<a
:href="baseUrl + accessory.accessoryUrl"
style="width: 150px"
>{{ accessory.accessoryName }}</a
>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</template> </template>
...@@ -544,6 +559,11 @@ ...@@ -544,6 +559,11 @@
:src="baseUrl + accessory.accessoryUrl" :src="baseUrl + accessory.accessoryUrl"
style="width: 150px" style="width: 150px"
/> />
<a
:href="baseUrl + accessory.accessoryUrl"
style="width: 150px"
>{{ accessory.accessoryName }}</a
>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</template> </template>
...@@ -638,6 +658,7 @@ export default { ...@@ -638,6 +658,7 @@ export default {
tableForthDataInfo: [], //thesisList tableForthDataInfo: [], //thesisList
tableForthDataInfoRes: [], //4 tableForthDataInfoRes: [], //4
baseUrl: process.env.VUE_APP_BASE_API, baseUrl: process.env.VUE_APP_BASE_API,
tableDataInfo: [],
}; };
}, },
mounted() { mounted() {
...@@ -647,32 +668,75 @@ export default { ...@@ -647,32 +668,75 @@ export default {
/** 查询信息列表 */ /** 查询信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// const userId = this.$store.state.user.userId;
// const params = {
// // userId: this.$store.state.user.userId,
// noticeName: this.queryForm.noticeName,
// };
const params = { const params = {
userId: this.$store.state.user.userId, userId: this.$store.state.user.userId,
noticeName: this.queryForm.noticeName, noticeName: this.queryForm.noticeName,
}; };
getTeacherTnfo(params).then((res) => { getTeacherTnfo(params).then((res) => {
this.tableData = res.rows; this.tableData = res.rows;
console.log(params, "params"); this.tableDataInfo = res.rows.map((item) => {
console.log(res, "res"); return item.fid; // 如果需要将 fid 属性单独提取出来,可以返回一个包含 fid 的新数组
});
this.total = res.total; this.total = res.total;
}); });
}, },
// 提取 ` // 提取
handleExtract() { handleExtract() {
const id = this.form.id; const id = this.form.id;
syncNotice(id).then((res) => { syncNotice(id).then((res) => {
console.log(id, "id");
console.log("res提取", res);
this.$modal.msgSuccess("提取成功"); this.$modal.msgSuccess("提取成功");
this.tableDataInfo.forEach((item) => {
getFileTnfo(item).then((res) => {
this.form = res.data;
this.tableFirstData = res.data.thesisList;
this.tableSecondData = res.data.materialList;
this.tableThirdData = res.data.trainingList;
this.tableForthData = res.data.awardList;
// ----------------------------------------4
this.tableForthDataInfo = res.data.awardList.map((item) => {
item.accList = item.accessories;
return item;
});
this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
val.accListInfo = val.accList;
return val;
});
// ---------------------------------------2
this.tableSecondDataInfo = res.data.materialList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableSecondDataInfoRes = this.tableSecondDataInfo.map(
(val) => {
val.matListInfo = val.accessories;
return val;
}
);
// ---------------------------------------3
this.tableThirdDataInfo = res.data.trainingList.map((item) => {
item.accessoriesInfo = item.accessories;
return item;
});
this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
val.trainingListInfo = val.accessories;
return val;
});
// -----------------------------1
this.tableFirstDataInfo = res.data.thesisList.map((item) => {
item.accessoriesInfo = item.schoolAccessoryList;
return item;
});
this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
val.thesisListInfo = val.schoolAccessoryList;
return val;
});
this.$modal.msgSuccess("页面已刷新");
});
});
}); });
}, },
// 搜索按钮 // 搜索按钮
handleQuery() { handleQuery() {
this.queryForm.pageNum = 1; this.queryForm.pageNum = 1;
...@@ -683,9 +747,7 @@ export default { ...@@ -683,9 +747,7 @@ export default {
this.queryForm = { this.queryForm = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
level: "", noticeName: "",
name: "",
region: "",
}; };
this.handleQuery(); this.handleQuery();
}, },
...@@ -794,8 +856,6 @@ export default { ...@@ -794,8 +856,6 @@ export default {
//提交按钮 //提交按钮
handleSubmit(row) { handleSubmit(row) {
const id = row.fid; const id = row.fid;
console.log(id, "tijio");
this.$modal this.$modal
.confirm("是否提交该活动?") .confirm("是否提交该活动?")
.then(function () { .then(function () {
...@@ -817,7 +877,7 @@ export default { ...@@ -817,7 +877,7 @@ export default {
if (this.form.fid != null) { if (this.form.fid != null) {
// 修改 // 修改
const params = { const params = {
id: this.form.fid, id: this.form.id,
sex: this.form.sex, sex: this.form.sex,
age: this.form.age, age: this.form.age,
title: this.form.title, title: this.form.title,
...@@ -845,7 +905,7 @@ export default { ...@@ -845,7 +905,7 @@ export default {
} else { } else {
// 新增 // 新增
const params = { const params = {
id: this.form.fid, id: this.form.id,
sex: this.form.sex, sex: this.form.sex,
age: this.form.age, age: this.form.age,
title: this.form.title, title: this.form.title,
......
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;
} }
...@@ -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