Commit c3e5650c by xuwenhao

修改校产、实验室代码、新增仪器药品管理

parent ddf3a95c
package yangtz.cs.liu.campus.controller.schoolInstrument;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentClassifyService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 仪器药品分类Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolInstrumentClassify")
public class SchoolInstrumentClassifyController extends BaseController {
@Autowired
private ISchoolInstrumentClassifyService schoolInstrumentClassifyService;
/**
* 查询仪器药品分类列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolInstrumentClassify schoolInstrumentClassify)
{
List<SchoolInstrumentClassify> list = schoolInstrumentClassifyService.selectSchoolInstrumentClassifyList(schoolInstrumentClassify);
return getDataTable(list);
}
/**
* 获取仪器药品分类详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolInstrumentClassifyService.selectSchoolInstrumentClassifyById(id));
}
/**
* 新增仪器药品分类
*/
@Log(title = "仪器药品分类", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolInstrumentClassify schoolInstrumentClassify)
{
return toAjax(schoolInstrumentClassifyService.insertSchoolInstrumentClassify(schoolInstrumentClassify));
}
/**
* 修改仪器药品分类
*/
@Log(title = "仪器药品分类", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolInstrumentClassify schoolInstrumentClassify)
{
return toAjax(schoolInstrumentClassifyService.updateSchoolInstrumentClassify(schoolInstrumentClassify));
}
/**
* 删除仪器药品分类
*/
@Log(title = "仪器药品分类", businessType = BusinessType.DELETE)
@PostMapping("/{id}")
public AjaxResult remove(@PathVariable("id") Long id)
{
return toAjax(schoolInstrumentClassifyService.deleteSchoolInstrumentClassifyById(id));
}
}
package yangtz.cs.liu.campus.controller.schoolInstrument;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentService;
import java.util.List;
/**
* 仪器管理Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolInstrument")
public class SchoolInstrumentController extends BaseController {
@Autowired
private ISchoolInstrumentService schoolInstrumentService;
/**
* 查询仪器管理列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolInstrument schoolInstrument)
{
startPage();
List<SchoolInstrument> list = schoolInstrumentService.selectSchoolInstrumentList(schoolInstrument);
return getDataTable(list);
}
/**
* 获取仪器管理详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolInstrumentService.selectSchoolInstrumentById(id));
}
/**
* 新增仪器管理
*/
@Log(title = "仪器管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolInstrument schoolInstrument)
{
return toAjax(schoolInstrumentService.insertSchoolInstrument(schoolInstrument));
}
/**
* 修改仪器管理
*/
@Log(title = "仪器管理", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolInstrument schoolInstrument)
{
return toAjax(schoolInstrumentService.updateSchoolInstrument(schoolInstrument));
}
/**
* 删除仪器管理
*/
@Log(title = "仪器管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolInstrumentService.deleteSchoolInstrumentByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolInstrument;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentDetailService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 仪器出入库明细Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolInstrumentDetail")
public class SchoolInstrumentDetailController extends BaseController {
@Autowired
private ISchoolInstrumentDetailService schoolInstrumentDetailService;
/**
* 查询仪器出入库明细列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolInstrumentDetailVo schoolInstrumentDetailVo)
{
startPage();
List<SchoolInstrumentDetail> list = schoolInstrumentDetailService.selectSchoolInstrumentDetailList(schoolInstrumentDetailVo);
return getDataTable(list);
}
/**
* 获取仪器出入库明细详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolInstrumentDetailService.selectSchoolInstrumentDetailById(id));
}
/**
* 新增仪器出入库明细
*/
@Log(title = "仪器出入库明细", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolInstrumentDetail schoolInstrumentDetail)
{
return toAjax(schoolInstrumentDetailService.insertSchoolInstrumentDetail(schoolInstrumentDetail));
}
/**
* 修改仪器出入库明细
*/
@Log(title = "仪器出入库明细", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolInstrumentDetail schoolInstrumentDetail)
{
return toAjax(schoolInstrumentDetailService.updateSchoolInstrumentDetail(schoolInstrumentDetail));
}
/**
* 删除仪器出入库明细
*/
@Log(title = "仪器出入库明细", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolInstrumentDetailService.deleteSchoolInstrumentDetailByIds(ids));
}
}
package yangtz.cs.liu.campus.controller.schoolInstrument;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrow;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentService;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolTeacherBorrowService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 教师借用Controller
*
* @author ruoyi
* @date 2023-09-06
*/
@RestController
@RequestMapping("/schoolTeacherBorrow")
public class SchoolTeacherBorrowController extends BaseController {
@Autowired
private ISchoolTeacherBorrowService schoolTeacherBorrowService;
@Autowired
private ISchoolInstrumentService schoolInstrumentService;
/**
* 查询教师借用列表
*/
@GetMapping("/list")
public TableDataInfo list(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
startPage();
List<SchoolTeacherBorrowVo> list = schoolTeacherBorrowService.selectSchoolTeacherBorrowList(schoolTeacherBorrowVo);
return getDataTable(list);
}
/**
* 获取教师借用详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(schoolTeacherBorrowService.selectSchoolTeacherBorrowById(id));
}
/**
* 新增教师借用
*/
@Log(title = "教师借用", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
return toAjax(schoolTeacherBorrowService.insertSchoolTeacherBorrow(schoolTeacherBorrowVo));
}
/**
* 办理教师借用
*/
@Log(title = "教师借用", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
public AjaxResult edit(@RequestBody SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
return toAjax(schoolTeacherBorrowService.updateSchoolTeacherBorrow(schoolTeacherBorrowVo));
}
/**
* 删除教师借用
*/
@Log(title = "教师借用", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(schoolTeacherBorrowService.deleteSchoolTeacherBorrowByIds(ids));
}
/**
* 借用明细列表
*/
@GetMapping("/selectInstrumentList")
public TableDataInfo selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo)
{
return getDataTable(schoolInstrumentService.selectInstrumentList(schoolInstrumentVo));
}
/**
* 仓库借用管理列表
*/
@GetMapping("/selectBorrowInstrumentList")
public TableDataInfo selectBorrowInstrumentList(SchoolTeacherBorrowVo schoolTeacherBorrowVo)
{
startPage();
List<SchoolTeacherBorrowVo> list = schoolTeacherBorrowService.selectBorrowInstrumentList(schoolTeacherBorrowVo);
return getDataTable(list);
}
/**
* 归还教师借出仪器
*/
@PostMapping("/returnInstrument")
public AjaxResult returnInstrument(@RequestBody SchoolTeacherBorrowVo schoolTeacherBorrowVo){
return toAjax(schoolTeacherBorrowService.returnInstrument(schoolTeacherBorrowVo));
}
}
...@@ -527,6 +527,8 @@ public class SchoolExperimentPlanController extends BaseController ...@@ -527,6 +527,8 @@ public class SchoolExperimentPlanController extends BaseController
*/ */
@GetMapping("/getGradeClassDetails") @GetMapping("/getGradeClassDetails")
public TableDataInfo getGradeClassDetails(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){ public TableDataInfo getGradeClassDetails(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){
//查询完成的班级实验信息
schoolTeacherLabApplyVo.setState("1");
return getDataTable(schoolTeacherLabApplyService.getGradeClassDetails(schoolTeacherLabApplyVo)); return getDataTable(schoolTeacherLabApplyService.getGradeClassDetails(schoolTeacherLabApplyVo));
} }
} }
...@@ -2,6 +2,8 @@ package yangtz.cs.liu.campus.controller.schoolLab; ...@@ -2,6 +2,8 @@ package yangtz.cs.liu.campus.controller.schoolLab;
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 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;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -95,4 +97,12 @@ public class SchoolLabCompetitionController extends BaseController ...@@ -95,4 +97,12 @@ public class SchoolLabCompetitionController extends BaseController
{ {
return toAjax(schoolLabCompetitionService.deleteSchoolLabCompetitionByIds(ids)); return toAjax(schoolLabCompetitionService.deleteSchoolLabCompetitionByIds(ids));
} }
/**
* 获取教师
*/
@GetMapping("/getTeacher")
public AjaxResult getTeacher(SysUser sysUser){
return AjaxResult.success(schoolLabCompetitionService.getTeacher(sysUser));
}
} }
...@@ -208,6 +208,8 @@ public class SchoolTeacherLabApplyController extends BaseController ...@@ -208,6 +208,8 @@ public class SchoolTeacherLabApplyController extends BaseController
*/ */
@GetMapping("/getLabUserDetial") @GetMapping("/getLabUserDetial")
public TableDataInfo getLabUserDetial(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){ public TableDataInfo getLabUserDetial(SchoolTeacherLabApplyVo schoolTeacherLabApplyVo){
//查询已确认的实验室使用记录
schoolTeacherLabApplyVo.setApplyState("1");
startPage(); startPage();
return getDataTable(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo)); return getDataTable(schoolTeacherLabApplyService.selectSchoolTeacherLabApplyList(schoolTeacherLabApplyVo));
} }
......
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 仪器管理对象 school_instrument
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrument extends OurBaseEntity {
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 仪器型号 */
@Excel(name = "仪器型号")
private String instrumentModel;
/** 仪器数量 */
@Excel(name = "仪器数量")
private Integer instrumentNum;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 仪器药品分类对象 school_instrument_classify
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrumentClassify extends OurBaseEntity {
/** 仪器类名 */
@Excel(name = "仪器类名")
private String instrumentTypeName;
/** 上级分类id */
@Excel(name = "上级分类id")
private Long parentId;
/** 祖级列表 */
@Excel(name = "祖级列表")
private String ancestors;
/** 排序 */
@Excel(name = "排序")
private Integer orderNum;
/** 是否为消耗品(1是,0否) */
@Excel(name = "是否为消耗品",readConverterExp = ("1=是,0=否"))
private String isConsumables;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 仪器出入库明细对象 school_instrument_detail
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrumentDetail extends OurBaseEntity {
/** 仪器id */
@Excel(name = "仪器id")
private Long instrumentId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 变动类型(1出库,2入库) */
@Excel(name = "变动类型", readConverterExp = "1=出库,2入库")
private String variationType;
/** 变动数量 */
@Excel(name = "变动数量")
private Integer variationNum;
/** 旧库存数量 */
@Excel(name = "旧库存数量")
private Integer oldStockNum;
/** 新库存数量 */
@Excel(name = "新库存数量")
private Integer newStockNum;
/** 变更时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date variationTime;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 教师借用对象 school_teacher_borrow
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolTeacherBorrow extends OurBaseEntity {
/** 借用人id */
@Excel(name = "借用人id")
private Long borrowById;
/** 借用人 */
@Excel(name = "借用人")
private String borrowBy;
/** 借用学科(1物理,2化学,3生物) */
@Excel(name = "借用学科(1物理,2化学,3生物)")
private String borrowSub;
/** 借用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "借用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date borrowTime;
/** 借用状态(0未归还,1已归还,2已申请) */
@Excel(name = "借用状态(0未归还,1已归还,2已申请)")
private String borrowState;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 归还时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date returnTime;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.domain.schoolInstrument;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
/**
* 教师借用明细对象 school_teacher_borrow_detail
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolTeacherBorrowDetail {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 教师借用主键id */
@Excel(name = "教师借用主键id")
private Long teacherBorrowId;
/** 仪器id */
@Excel(name = "仪器id")
private Long instrumentId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器型号 */
@Excel(name = "仪器型号")
private String instrumentModel;
/** 仪器数量 */
@Excel(name = "仪器数量")
private Integer instrumentNum;
/** 借用数量 */
@Excel(name = "借用数量")
private Integer borrowNum;
/** 损坏数量 */
private Integer damageNum;
private String delFlag;
}
...@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.domain.teacher; ...@@ -2,6 +2,7 @@ package yangtz.cs.liu.campus.domain.teacher;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection; import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.core.domain.OurBaseEntity; import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import lombok.Data; import lombok.Data;
...@@ -33,7 +34,8 @@ public class TeacherJy extends OurBaseEntity { ...@@ -33,7 +34,8 @@ public class TeacherJy extends OurBaseEntity {
//借用日期 //借用日期
@Excel(name = "借用日期") @Excel(name = "借用日期")
private String borrowTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date borrowTime;
//借用人 //借用人
@Excel(name = "借用人") @Excel(name = "借用人")
......
package yangtz.cs.liu.campus.domain.teacher; package yangtz.cs.liu.campus.domain.teacher;
import com.core.domain.OurBaseEntity; import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import lombok.Data; import lombok.Data;
import java.util.Date;
@Data @Data
public class TeacherLy extends OurBaseEntity { public class TeacherLy extends OurBaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -28,7 +31,8 @@ public class TeacherLy extends OurBaseEntity { ...@@ -28,7 +31,8 @@ public class TeacherLy extends OurBaseEntity {
//领用日期 //领用日期
@Excel(name = "领用日期") @Excel(name = "领用日期")
private String recipientTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date recipientTime;
private Long recipientById; private Long recipientById;
//领用人 //领用人
......
...@@ -27,7 +27,7 @@ public interface EquipmentLedgerMapper extends BaseMapper<SchoolEquipmentLedger> ...@@ -27,7 +27,7 @@ public interface EquipmentLedgerMapper extends BaseMapper<SchoolEquipmentLedger>
* 获取用户 * 获取用户
* @return * @return
*/ */
List<Map<String, String>> getUser(SysUser sysUser); List<Map<String, Object>> getUser(SysUser sysUser);
/** /**
* 查看个人设备台账列表 * 查看个人设备台账列表
......
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import java.util.List;
/**
* 仪器药品分类Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolInstrumentClassifyMapper extends BaseMapper<SchoolInstrumentClassify> {
/**
* 查询仪器药品分类
*
* @param id 仪器药品分类主键
* @return 仪器药品分类
*/
public SchoolInstrumentClassify selectSchoolInstrumentClassifyById(Long id);
/**
* 查询仪器药品分类列表
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 仪器药品分类集合
*/
public List<SchoolInstrumentClassify> selectSchoolInstrumentClassifyList(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 新增仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int insertSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 修改仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int updateSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 删除仪器药品分类
*
* @param id 仪器药品分类主键
* @return 结果
*/
public int deleteSchoolInstrumentClassifyById(Long id);
/**
* 批量删除仪器药品分类
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolInstrumentClassifyByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import java.util.List;
/**
* 仪器出入库明细Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolInstrumentDetailMapper extends BaseMapper<SchoolInstrumentDetail> {
/**
* 查询仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 仪器出入库明细
*/
public SchoolInstrumentDetail selectSchoolInstrumentDetailById(Long id);
/**
* 查询仪器出入库明细列表
*
* @param schoolInstrumentDetailVo 仪器出入库明细
* @return 仪器出入库明细集合
*/
public List<SchoolInstrumentDetail> selectSchoolInstrumentDetailList(SchoolInstrumentDetailVo schoolInstrumentDetailVo);
/**
* 新增仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int insertSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 修改仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int updateSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 删除仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 结果
*/
public int deleteSchoolInstrumentDetailById(Long id);
/**
* 批量删除仪器出入库明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolInstrumentDetailByIds(Long[] ids);
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import java.util.List;
/**
* 仪器管理Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolInstrumentMapper extends BaseMapper<SchoolInstrument> {
/**
* 查询仪器管理
*
* @param id 仪器管理主键
* @return 仪器管理
*/
public SchoolInstrument selectSchoolInstrumentById(Long id);
/**
* 查询仪器管理列表
*
* @param schoolInstrument 仪器管理
* @return 仪器管理集合
*/
public List<SchoolInstrument> selectSchoolInstrumentList(SchoolInstrument schoolInstrument);
/**
* 新增仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int insertSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 修改仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int updateSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 删除仪器管理
*
* @param id 仪器管理主键
* @return 结果
*/
public int deleteSchoolInstrumentById(Long id);
/**
* 批量删除仪器管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolInstrumentByIds(Long[] ids);
/**
* 教师借用-明细列表
* @param schoolInstrumentVo
* @return
*/
List<SchoolInstrument> selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo);
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
/**
* 教师借用明细Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolTeacherBorrowDetailMapper extends BaseMapper<SchoolTeacherBorrowDetail> {
}
package yangtz.cs.liu.campus.mapper.schoolInstrument;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrow;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import java.util.List;
/**
* 教师借用Mapper接口
*
* @author ruoyi
* @date 2023-09-06
*/
@Repository
public interface SchoolTeacherBorrowMapper extends BaseMapper<SchoolTeacherBorrow> {
/**
* 查询教师借用
*
* @param id 教师借用主键
* @return 教师借用
*/
public SchoolTeacherBorrowVo selectSchoolTeacherBorrowById(Long id);
/**
* 查询教师借用列表
*
* @param schoolTeacherBorrowVo 教师借用
* @return 教师借用集合
*/
public List<SchoolTeacherBorrowVo> selectSchoolTeacherBorrowList(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 新增教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int insertSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 修改教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int updateSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 删除教师借用
*
* @param id 教师借用主键
* @return 结果
*/
public int deleteSchoolTeacherBorrowById(Long id);
/**
* 批量删除教师借用
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherBorrowByIds(Long[] ids);
/**
* 批量删除教师借用明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherBorrowDetailByTeacherBorrowIds(Long[] ids);
/**
* 批量新增教师借用明细
*
* @param schoolTeacherBorrowDetailList 教师借用明细列表
* @return 结果
*/
public int batchSchoolTeacherBorrowDetail(List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList);
/**
* 通过教师借用主键删除教师借用明细信息
*
* @param id 教师借用ID
* @return 结果
*/
public int deleteSchoolTeacherBorrowDetailByTeacherBorrowId(Long id);
/**
* 批量修改归还教师借用明细
* @param list
* @return
*/
int updateSchoolTeacherBorrowDetails(@Param("list") List<SchoolTeacherBorrowDetail> list);
}
package yangtz.cs.liu.campus.mapper.schoolLab; package yangtz.cs.liu.campus.mapper.schoolLab;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory; import yangtz.cs.liu.campus.domain.accessory.SchoolAccessory;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabCompetitionVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabCompetitionVo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 实验室竞赛Mapper接口 * 实验室竞赛Mapper接口
...@@ -84,4 +86,11 @@ public interface SchoolLabCompetitionMapper extends BaseMapper<SchoolLabCompetit ...@@ -84,4 +86,11 @@ public interface SchoolLabCompetitionMapper extends BaseMapper<SchoolLabCompetit
* @return * @return
*/ */
int deleteSchoolAccessoryByBusinessId(Long id); int deleteSchoolAccessoryByBusinessId(Long id);
/**
* 获取教师
* @param sysUser
* @return
*/
List<Map<String, Object>> getTeacher(SysUser sysUser);
} }
...@@ -75,7 +75,7 @@ public interface SchoolLabMapper extends BaseMapper<SchoolLab> ...@@ -75,7 +75,7 @@ public interface SchoolLabMapper extends BaseMapper<SchoolLab>
* 查询指定实验室管理员 * 查询指定实验室管理员
* @return * @return
*/ */
public Map<String,String> getLabAdmin(@Param("roleKey") String roleKey); public Map<String,String> getLabAdmin(@Param("roleKey") String roleKey,@Param("userId") Long userId);
/** /**
* 查询全部学科 * 查询全部学科
......
...@@ -51,26 +51,21 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo ...@@ -51,26 +51,21 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolCirculationVo> selectSchoolCirculationVoList(SchoolCirculationVo schoolCirculationVo) { public List<SchoolCirculationVo> selectSchoolCirculationVoList(SchoolCirculationVo schoolCirculationVo) {
List<SchoolCirculationVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo); return circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolCirculationVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolCirculationVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = circulationMapper.selectSchoolCirculationVoListGr(schoolCirculationVo); return circulationMapper.selectSchoolCirculationVoListGr(schoolCirculationVo);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo); return circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
}
} }
return list; return new ArrayList<>();
} }
public List<SchoolCirculationVo> selectVxSchoolCirculationVoList( public List<SchoolCirculationVo> selectVxSchoolCirculationVoList(
SchoolReceiveQuery schoolReceiveQuery) { SchoolReceiveQuery schoolReceiveQuery) {
......
...@@ -46,26 +46,21 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe ...@@ -46,26 +46,21 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolEquipmentLedger> selectSchoolEquipmentLedgerList(SchoolEquipmentLedgerVo schoolEquipmentLedgerVo) { public List<SchoolEquipmentLedger> selectSchoolEquipmentLedgerList(SchoolEquipmentLedgerVo schoolEquipmentLedgerVo) {
List<SchoolEquipmentLedger> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo); return equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolEquipmentLedgerVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolEquipmentLedgerVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = equipmentLedgerMapper.selectSchoolEquipmentLedgerListGr(schoolEquipmentLedgerVo); return equipmentLedgerMapper.selectSchoolEquipmentLedgerListGr(schoolEquipmentLedgerVo);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo); return equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
}
} }
return list; return new ArrayList<>();
} }
/** /**
...@@ -278,7 +273,7 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe ...@@ -278,7 +273,7 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
* @return * @return
*/ */
@Override @Override
public List<Map<String, String>> getUser(SysUser sysUser) { public List<Map<String, Object>> getUser(SysUser sysUser) {
return equipmentLedgerMapper.getUser(sysUser); return equipmentLedgerMapper.getUser(sysUser);
} }
} }
...@@ -37,26 +37,21 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe ...@@ -37,26 +37,21 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolEquipmentRepairVo> selectSchoolEquipmentRepairVoList(SchoolEquipmentRepairVo schoolEquipmentRepairVo) { public List<SchoolEquipmentRepairVo> selectSchoolEquipmentRepairVoList(SchoolEquipmentRepairVo schoolEquipmentRepairVo) {
List<SchoolEquipmentRepairVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo); return equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolEquipmentRepairVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolEquipmentRepairVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = equipmentRepairMapper.selectSchoolEquipmentRepairVoListGr(schoolEquipmentRepairVo); return equipmentRepairMapper.selectSchoolEquipmentRepairVoListGr(schoolEquipmentRepairVo);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo); return equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
} }
} return new ArrayList<>();
return list;
} }
/** /**
......
...@@ -27,26 +27,21 @@ public class InStockServiceImpl extends ServiceImpl<InStockMapper, SchoolInStock ...@@ -27,26 +27,21 @@ public class InStockServiceImpl extends ServiceImpl<InStockMapper, SchoolInStock
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolInStockVo> selectSchoolInStockVoList(SchoolInStockVo schoolInStockVo) { public List<SchoolInStockVo> selectSchoolInStockVoList(SchoolInStockVo schoolInStockVo) {
List<SchoolInStockVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = inStockMapper.selectSchoolInStockVoList(schoolInStockVo); return inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolInStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolInStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = inStockMapper.selectSchoolInStockVoListGr(schoolInStockVo); return inStockMapper.selectSchoolInStockVoListGr(schoolInStockVo);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = inStockMapper.selectSchoolInStockVoList(schoolInStockVo); return inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
} }
} return new ArrayList<>();
return list;
} }
/** /**
......
...@@ -27,26 +27,21 @@ public class OutStockServiceImpl extends ServiceImpl<OutStockMapper, SchoolOutSt ...@@ -27,26 +27,21 @@ public class OutStockServiceImpl extends ServiceImpl<OutStockMapper, SchoolOutSt
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolOutStockVo> selectSchoolOutStockVoList(SchoolOutStockVo schoolOutStockVo) { public List<SchoolOutStockVo> selectSchoolOutStockVoList(SchoolOutStockVo schoolOutStockVo) {
List<SchoolOutStockVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo); return outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolOutStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolOutStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = outStockMapper.selectSchoolOutStockVoListGr(schoolOutStockVo); return outStockMapper.selectSchoolOutStockVoListGr(schoolOutStockVo);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo); return outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
} }
} return new ArrayList<>();
return list;
} }
/** /**
......
...@@ -36,26 +36,21 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe ...@@ -36,26 +36,21 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolProductCategory> selectSchoolProductCateGory(SchoolProductCategory schoolProductCategory) { public List<SchoolProductCategory> selectSchoolProductCateGory(SchoolProductCategory schoolProductCategory) {
List<SchoolProductCategory> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory); return productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolProductCategory.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolProductCategory.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = productCategoryMapper.selectSchoolProductCateGoryGr(schoolProductCategory); return productCategoryMapper.selectSchoolProductCateGoryGr(schoolProductCategory);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory); return productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
}
} }
return list; return new ArrayList<>();
} }
/** /**
......
...@@ -37,26 +37,21 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive ...@@ -37,26 +37,21 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive
* @return * @return
*/ */
@Override @Override
// @DataScope(userAlias = "u")
public List<SchoolReceiveVo> selectSchoolReceiveVoList(SchoolReceiveVo schoolReceiveVo) { public List<SchoolReceiveVo> selectSchoolReceiveVoList(SchoolReceiveVo schoolReceiveVo) {
List<SchoolReceiveVo> list = new ArrayList<>();
List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
for (SysRole role : roles) { for (SysRole role : roles) {
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
list = receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo); return receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
break;
}else if (role.getRoleKey().equals("productCategoryAdmin")){ }else if (role.getRoleKey().equals("productCategoryAdmin")){
schoolReceiveVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId()); schoolReceiveVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
list = receiveMapper.selectSchoolReceiveVoListGr(schoolReceiveVo); return receiveMapper.selectSchoolReceiveVoListGr(schoolReceiveVo);
} }
} }
if (roles.size() <= 0){
if (user.isAdmin()){ if (user.isAdmin()){
list = receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo); return receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
} }
} return new ArrayList<>();
return list;
} }
/** /**
......
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
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 com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentClassifyMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentClassifyService;
import java.util.List;
/**
* 仪器药品分类Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolInstrumentClassifyServiceImpl extends ServiceImpl<SchoolInstrumentClassifyMapper, SchoolInstrumentClassify> implements ISchoolInstrumentClassifyService {
@Autowired
private SchoolInstrumentClassifyMapper schoolInstrumentClassifyMapper;
/**
* 查询仪器药品分类
*
* @param id 仪器药品分类主键
* @return 仪器药品分类
*/
@Override
public SchoolInstrumentClassify selectSchoolInstrumentClassifyById(Long id)
{
return schoolInstrumentClassifyMapper.selectSchoolInstrumentClassifyById(id);
}
/**
* 查询仪器药品分类列表
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 仪器药品分类
*/
@Override
public List<SchoolInstrumentClassify> selectSchoolInstrumentClassifyList(SchoolInstrumentClassify schoolInstrumentClassify)
{
return schoolInstrumentClassifyMapper.selectSchoolInstrumentClassifyList(schoolInstrumentClassify);
}
/**
* 新增仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
@Override
public int insertSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify)
{
//获取登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//父id
if (StringUtils.isNotNull(schoolInstrumentClassify.getParentId())){
SchoolInstrumentClassify instrumentClassify = schoolInstrumentClassifyMapper.selectById(schoolInstrumentClassify.getParentId());
schoolInstrumentClassify.setAncestors(instrumentClassify.getAncestors() + "," + schoolInstrumentClassify.getParentId());
}else {
schoolInstrumentClassify.setParentId((long)0);
schoolInstrumentClassify.setAncestors("0");
}
schoolInstrumentClassify.setCreateBy(user.getUserName());
schoolInstrumentClassify.setCreateTime(DateUtils.getNowDate());
return schoolInstrumentClassifyMapper.insert(schoolInstrumentClassify);
}
/**
* 修改仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
@Override
public int updateSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify)
{
//获取登录用户
SysUser user = SecurityUtils.getLoginUser().getUser();
//父id
if (StringUtils.isNotNull(schoolInstrumentClassify.getParentId())){
SchoolInstrumentClassify instrumentClassify = schoolInstrumentClassifyMapper.selectById(schoolInstrumentClassify.getParentId());
schoolInstrumentClassify.setAncestors(instrumentClassify.getAncestors() + "," + schoolInstrumentClassify.getParentId());
}else {
schoolInstrumentClassify.setParentId((long)0);
schoolInstrumentClassify.setAncestors("0");
}
schoolInstrumentClassify.setUpdateBy(user.getUserName());
schoolInstrumentClassify.setUpdateTime(DateUtils.getNowDate());
return schoolInstrumentClassifyMapper.updateById(schoolInstrumentClassify);
}
/**
* 批量删除仪器药品分类
*
* @param ids 需要删除的仪器药品分类主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentClassifyByIds(Long[] ids)
{
return schoolInstrumentClassifyMapper.deleteSchoolInstrumentClassifyByIds(ids);
}
/**
* 删除仪器药品分类信息
*
* @param id 仪器药品分类主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentClassifyById(Long id)
{
return schoolInstrumentClassifyMapper.deleteSchoolInstrumentClassifyById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
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.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentDetailMapper;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentDetailService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import java.util.List;
/**
* 仪器出入库明细Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolInstrumentDetailServiceImpl extends ServiceImpl<SchoolInstrumentDetailMapper, SchoolInstrumentDetail> implements ISchoolInstrumentDetailService {
@Autowired
private SchoolInstrumentDetailMapper schoolInstrumentDetailMapper;
@Autowired
private SchoolInstrumentMapper schoolInstrumentMapper;
/**
* 查询仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 仪器出入库明细
*/
@Override
public SchoolInstrumentDetail selectSchoolInstrumentDetailById(Long id)
{
return schoolInstrumentDetailMapper.selectSchoolInstrumentDetailById(id);
}
/**
* 查询仪器出入库明细列表
*
* @param schoolInstrumentDetailVo 仪器出入库明细
* @return 仪器出入库明细
*/
@Override
public List<SchoolInstrumentDetail> selectSchoolInstrumentDetailList(SchoolInstrumentDetailVo schoolInstrumentDetailVo)
{
return schoolInstrumentDetailMapper.selectSchoolInstrumentDetailList(schoolInstrumentDetailVo);
}
/**
* 新增仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
@Override
public int insertSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
//修改仪器库存
//仪器id
Long instrumentId = schoolInstrumentDetail.getInstrumentId();
//新库存数量
Integer newStockNum = schoolInstrumentDetail.getNewStockNum();
SchoolInstrument schoolInstrument = new SchoolInstrument();
schoolInstrument.setId(instrumentId);
schoolInstrument.setInstrumentNum(newStockNum);
schoolInstrumentMapper.updateById(schoolInstrument);
SchoolInstrument instrument = schoolInstrumentMapper.selectById(instrumentId);
schoolInstrumentDetail.setInstrumentName(instrument.getInstrumentName());
schoolInstrumentDetail.setInstrumentTypeId(instrument.getInstrumentTypeId());
schoolInstrumentDetail.setInstrumentTypeName(instrument.getInstrumentTypeName());
schoolInstrumentDetail.setVariationTime(DateUtils.getNowDate());
schoolInstrumentDetail.setCreateBy(user.getUserName());
schoolInstrumentDetail.setCreateTime(DateUtils.getNowDate());
return schoolInstrumentDetailMapper.insertSchoolInstrumentDetail(schoolInstrumentDetail);
}
/**
* 修改仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
@Override
public int updateSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolInstrumentDetail.setUpdateBy(user.getUserName());
schoolInstrumentDetail.setUpdateTime(DateUtils.getNowDate());
return schoolInstrumentDetailMapper.updateSchoolInstrumentDetail(schoolInstrumentDetail);
}
/**
* 批量删除仪器出入库明细
*
* @param ids 需要删除的仪器出入库明细主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentDetailByIds(Long[] ids)
{
return schoolInstrumentDetailMapper.deleteSchoolInstrumentDetailByIds(ids);
}
/**
* 删除仪器出入库明细信息
*
* @param id 仪器出入库明细主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentDetailById(Long id)
{
return schoolInstrumentDetailMapper.deleteSchoolInstrumentDetailById(id);
}
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
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.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolInstrumentService;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import java.util.List;
/**
* 仪器管理Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolInstrumentServiceImpl extends ServiceImpl<SchoolInstrumentMapper, SchoolInstrument> implements ISchoolInstrumentService {
@Autowired
private SchoolInstrumentMapper schoolInstrumentMapper;
/**
* 查询仪器管理
*
* @param id 仪器管理主键
* @return 仪器管理
*/
@Override
public SchoolInstrument selectSchoolInstrumentById(Long id)
{
return schoolInstrumentMapper.selectSchoolInstrumentById(id);
}
/**
* 查询仪器管理列表
*
* @param schoolInstrument 仪器管理
* @return 仪器管理
*/
@Override
public List<SchoolInstrument> selectSchoolInstrumentList(SchoolInstrument schoolInstrument)
{
return schoolInstrumentMapper.selectSchoolInstrumentList(schoolInstrument);
}
/**
* 新增仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
@Override
public int insertSchoolInstrument(SchoolInstrument schoolInstrument)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolInstrument.setCreateBy(user.getUserName());
schoolInstrument.setCreateTime(DateUtils.getNowDate());
return schoolInstrumentMapper.insertSchoolInstrument(schoolInstrument);
}
/**
* 修改仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
@Override
public int updateSchoolInstrument(SchoolInstrument schoolInstrument)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
schoolInstrument.setUpdateBy(user.getUserName());
schoolInstrument.setUpdateTime(DateUtils.getNowDate());
return schoolInstrumentMapper.updateSchoolInstrument(schoolInstrument);
}
/**
* 批量删除仪器管理
*
* @param ids 需要删除的仪器管理主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentByIds(Long[] ids)
{
return schoolInstrumentMapper.deleteSchoolInstrumentByIds(ids);
}
/**
* 删除仪器管理信息
*
* @param id 仪器管理主键
* @return 结果
*/
@Override
public int deleteSchoolInstrumentById(Long id)
{
return schoolInstrumentMapper.deleteSchoolInstrumentById(id);
}
@Override
public List<SchoolInstrument> selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo) {
if (schoolInstrumentVo.getIds().size() <= 0){
schoolInstrumentVo.setIds(null);
}
return schoolInstrumentMapper.selectInstrumentList(schoolInstrumentVo);
}
}
package yangtz.cs.liu.campus.service.impl.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
import yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolTeacherBorrowDetailMapper;
import yangtz.cs.liu.campus.service.schoolInstrument.ISchoolTeacherBorrowDetailService;
/**
* 教师借用明细Service业务层处理
*
* @author ruoyi
* @date 2023-09-06
*/
@Service
public class SchoolTeacherBorrowDetailServiceImpl extends ServiceImpl<SchoolTeacherBorrowDetailMapper, SchoolTeacherBorrowDetail> implements ISchoolTeacherBorrowDetailService {
}
...@@ -170,7 +170,6 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -170,7 +170,6 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
@Override @Override
public int updateSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear) public int updateSchoolLabClassYear(SchoolLabClassYear schoolLabClassYear)
{ {
schoolLabClassYear.setUpdateBy(SecurityUtils.getLoginUser().getUser().getUserName());
schoolLabClassYear.setUpdateTime(DateUtils.getNowDate()); schoolLabClassYear.setUpdateTime(DateUtils.getNowDate());
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(schoolLabClassYear.getId()); schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(schoolLabClassYear.getId());
insertSchoolLabClassYearRelation(schoolLabClassYear); insertSchoolLabClassYearRelation(schoolLabClassYear);
...@@ -307,7 +306,7 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -307,7 +306,7 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
public int updateLabClassYear(SchoolLabClassYearVo schoolLabClassYearVo) { public int updateLabClassYear(SchoolLabClassYearVo schoolLabClassYearVo) {
List<SchoolLabClassYearRelation> schoolLabClassYearRelationList = schoolLabClassYearVo.getSchoolLabClassYearRelationList(); List<SchoolLabClassYearRelation> schoolLabClassYearRelationList = schoolLabClassYearVo.getSchoolLabClassYearRelationList();
Long id = schoolLabClassYearVo.getId(); Long id = schoolLabClassYearVo.getId();
if (StringUtils.isNull(schoolLabClassYearRelationList)){ if (schoolLabClassYearRelationList.size() <= 0){
throw new ServiceException("您未选择实验室"); throw new ServiceException("您未选择实验室");
} }
List<SchoolLabClassYearRelation> list = new ArrayList<SchoolLabClassYearRelation>(); List<SchoolLabClassYearRelation> list = new ArrayList<SchoolLabClassYearRelation>();
...@@ -325,7 +324,6 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea ...@@ -325,7 +324,6 @@ public class SchoolLabClassYearServiceImpl extends ServiceImpl<SchoolLabClassYea
schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id); schoolLabClassYearMapper.deleteSchoolLabClassYearRelationByLabClassYearId(id);
schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list); schoolLabClassYearMapper.batchSchoolLabClassYearRelation(list);
} }
schoolLabClassYearVo.setDeclareState("3");
SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear(); SchoolLabClassYear schoolLabClassYear = new SchoolLabClassYear();
BeanUtils.copyProperties(schoolLabClassYearVo,schoolLabClassYear); BeanUtils.copyProperties(schoolLabClassYearVo,schoolLabClassYear);
return schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear); return schoolLabClassYearMapper.updateSchoolLabClassYear(schoolLabClassYear);
......
...@@ -2,9 +2,11 @@ package yangtz.cs.liu.campus.service.impl.schoolLab; ...@@ -2,9 +2,11 @@ package yangtz.cs.liu.campus.service.impl.schoolLab;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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 com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
...@@ -138,6 +140,16 @@ public class SchoolLabCompetitionServiceImpl extends ServiceImpl<SchoolLabCompet ...@@ -138,6 +140,16 @@ public class SchoolLabCompetitionServiceImpl extends ServiceImpl<SchoolLabCompet
} }
/** /**
* 获取教师
* @param sysUser
* @return
*/
@Override
public List<Map<String, Object>> getTeacher(SysUser sysUser) {
return schoolLabCompetitionMapper.getTeacher(sysUser);
}
/**
* 新增证书照片 * 新增证书照片
* @param * @param
*/ */
......
...@@ -7,7 +7,6 @@ import com.ruoyi.common.exception.ServiceException; ...@@ -7,7 +7,6 @@ import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysUserService;
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.schoolLab.SchoolLab; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLab;
...@@ -33,6 +32,7 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> ...@@ -33,6 +32,7 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
private SchoolLabMapper schoolLabMapper; private SchoolLabMapper schoolLabMapper;
@Autowired @Autowired
private SysUserMapper sysUserMapper; private SysUserMapper sysUserMapper;
/** /**
* 查询实验室 * 查询实验室
* *
...@@ -62,7 +62,6 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> ...@@ -62,7 +62,6 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
}else { }else {
user = sysUserMapper.selectUserById(userId); user = sysUserMapper.selectUserById(userId);
} }
//获取用户角色集合 //获取用户角色集合
List<SysRole> roles = user.getRoles(); List<SysRole> roles = user.getRoles();
...@@ -159,11 +158,11 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab> ...@@ -159,11 +158,11 @@ public class SchoolLabServiceImpl extends ServiceImpl<SchoolLabMapper,SchoolLab>
if (role.getRoleKey().equals("admin")){ if (role.getRoleKey().equals("admin")){
return schoolLabMapper.getLabAdminAll(); return schoolLabMapper.getLabAdminAll();
}else if (role.getRoleKey().equals("phy_lab_admin")){ }else if (role.getRoleKey().equals("phy_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey())); list.add(schoolLabMapper.getLabAdmin(role.getRoleKey(), user.getUserId()));
}else if (role.getRoleKey().equals("che_lab_admin")){ }else if (role.getRoleKey().equals("che_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey())); list.add(schoolLabMapper.getLabAdmin(role.getRoleKey(),user.getUserId()));
}else if (role.getRoleKey().equals("bio_lab_admin")){ }else if (role.getRoleKey().equals("bio_lab_admin")){
list.add(schoolLabMapper.getLabAdmin(role.getRoleKey())); list.add(schoolLabMapper.getLabAdmin(role.getRoleKey(),user.getUserId()));
} }
} }
if (user.isAdmin()){ if (user.isAdmin()){
......
...@@ -442,6 +442,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL ...@@ -442,6 +442,7 @@ public class SchoolTeacherLabApplyServiceImpl extends ServiceImpl<SchoolTeacherL
throw new ServiceException("请选择实验室"); throw new ServiceException("请选择实验室");
} }
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
schoolTeacherLabApplyVo.setChapterContent(schoolLabClassYear.getChapterContent());
schoolTeacherLabApplyVo.setApplyId(user.getUserId()); schoolTeacherLabApplyVo.setApplyId(user.getUserId());
schoolTeacherLabApplyVo.setApplyName(user.getUserName()); schoolTeacherLabApplyVo.setApplyName(user.getUserName());
schoolTeacherLabApplyVo.setApplyTime(DateUtils.getNowDate()); schoolTeacherLabApplyVo.setApplyTime(DateUtils.getNowDate());
......
...@@ -68,6 +68,6 @@ public interface IEquipmentLedgerService extends IService<SchoolEquipmentLedger> ...@@ -68,6 +68,6 @@ public interface IEquipmentLedgerService extends IService<SchoolEquipmentLedger>
* 获取用户 * 获取用户
* @return * @return
*/ */
List<Map<String,String>> getUser(SysUser sysUser); List<Map<String,Object>> getUser(SysUser sysUser);
} }
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentClassify;
import java.util.List;
/**
* 仪器药品分类Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolInstrumentClassifyService extends IService<SchoolInstrumentClassify> {
/**
* 查询仪器药品分类
*
* @param id 仪器药品分类主键
* @return 仪器药品分类
*/
public SchoolInstrumentClassify selectSchoolInstrumentClassifyById(Long id);
/**
* 查询仪器药品分类列表
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 仪器药品分类集合
*/
public List<SchoolInstrumentClassify> selectSchoolInstrumentClassifyList(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 新增仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int insertSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 修改仪器药品分类
*
* @param schoolInstrumentClassify 仪器药品分类
* @return 结果
*/
public int updateSchoolInstrumentClassify(SchoolInstrumentClassify schoolInstrumentClassify);
/**
* 批量删除仪器药品分类
*
* @param ids 需要删除的仪器药品分类主键集合
* @return 结果
*/
public int deleteSchoolInstrumentClassifyByIds(Long[] ids);
/**
* 删除仪器药品分类信息
*
* @param id 仪器药品分类主键
* @return 结果
*/
public int deleteSchoolInstrumentClassifyById(Long id);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrumentDetail;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentDetailVo;
import java.util.List;
/**
* 仪器出入库明细Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolInstrumentDetailService extends IService<SchoolInstrumentDetail> {
/**
* 查询仪器出入库明细
*
* @param id 仪器出入库明细主键
* @return 仪器出入库明细
*/
public SchoolInstrumentDetail selectSchoolInstrumentDetailById(Long id);
/**
* 查询仪器出入库明细列表
*
* @param schoolInstrumentDetailVo 仪器出入库明细
* @return 仪器出入库明细集合
*/
public List<SchoolInstrumentDetail> selectSchoolInstrumentDetailList(SchoolInstrumentDetailVo schoolInstrumentDetailVo);
/**
* 新增仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int insertSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 修改仪器出入库明细
*
* @param schoolInstrumentDetail 仪器出入库明细
* @return 结果
*/
public int updateSchoolInstrumentDetail(SchoolInstrumentDetail schoolInstrumentDetail);
/**
* 批量删除仪器出入库明细
*
* @param ids 需要删除的仪器出入库明细主键集合
* @return 结果
*/
public int deleteSchoolInstrumentDetailByIds(Long[] ids);
/**
* 删除仪器出入库明细信息
*
* @param id 仪器出入库明细主键
* @return 结果
*/
public int deleteSchoolInstrumentDetailById(Long id);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolInstrument;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolInstrumentVo;
import java.util.List;
/**
* 仪器管理Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolInstrumentService extends IService<SchoolInstrument> {
/**
* 查询仪器管理
*
* @param id 仪器管理主键
* @return 仪器管理
*/
public SchoolInstrument selectSchoolInstrumentById(Long id);
/**
* 查询仪器管理列表
*
* @param schoolInstrument 仪器管理
* @return 仪器管理集合
*/
public List<SchoolInstrument> selectSchoolInstrumentList(SchoolInstrument schoolInstrument);
/**
* 新增仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int insertSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 修改仪器管理
*
* @param schoolInstrument 仪器管理
* @return 结果
*/
public int updateSchoolInstrument(SchoolInstrument schoolInstrument);
/**
* 批量删除仪器管理
*
* @param ids 需要删除的仪器管理主键集合
* @return 结果
*/
public int deleteSchoolInstrumentByIds(Long[] ids);
/**
* 删除仪器管理信息
*
* @param id 仪器管理主键
* @return 结果
*/
public int deleteSchoolInstrumentById(Long id);
/**
* 教师借用明细列表
* @param schoolInstrumentVo
* @return
*/
List<SchoolInstrument> selectInstrumentList(SchoolInstrumentVo schoolInstrumentVo);
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
/**
* 教师借用明细Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolTeacherBorrowDetailService extends IService<SchoolTeacherBorrowDetail> {
}
package yangtz.cs.liu.campus.service.schoolInstrument;
import com.baomidou.mybatisplus.extension.service.IService;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrow;
import yangtz.cs.liu.campus.vo.schoolInstrument.SchoolTeacherBorrowVo;
import java.util.List;
/**
* 教师借用Service接口
*
* @author ruoyi
* @date 2023-09-06
*/
public interface ISchoolTeacherBorrowService extends IService<SchoolTeacherBorrow> {
/**
* 查询教师借用
*
* @param id 教师借用主键
* @return 教师借用
*/
public SchoolTeacherBorrowVo selectSchoolTeacherBorrowById(Long id);
/**
* 查询教师借用列表
*
* @param schoolTeacherBorrowVo 教师借用
* @return 教师借用集合
*/
public List<SchoolTeacherBorrowVo> selectSchoolTeacherBorrowList(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 新增教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int insertSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 修改教师借用
*
* @param schoolTeacherBorrowVo 教师借用
* @return 结果
*/
public int updateSchoolTeacherBorrow(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 批量删除教师借用
*
* @param ids 需要删除的教师借用主键集合
* @return 结果
*/
public int deleteSchoolTeacherBorrowByIds(Long[] ids);
/**
* 删除教师借用信息
*
* @param id 教师借用主键
* @return 结果
*/
public int deleteSchoolTeacherBorrowById(Long id);
/**
* 仓库借用管理列表
* @param schoolTeacherBorrowVo
* @return
*/
List<SchoolTeacherBorrowVo> selectBorrowInstrumentList(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
/**
* 归还教师借出仪器
* @param schoolTeacherBorrowVo
* @return
*/
int returnInstrument(SchoolTeacherBorrowVo schoolTeacherBorrowVo);
}
package yangtz.cs.liu.campus.service.schoolLab; package yangtz.cs.liu.campus.service.schoolLab;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.entity.SysUser;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition; import yangtz.cs.liu.campus.domain.schoolLab.SchoolLabCompetition;
import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabCompetitionVo; import yangtz.cs.liu.campus.vo.schoolLab.SchoolLabCompetitionVo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 实验室竞赛Service接口 * 实验室竞赛Service接口
...@@ -61,4 +63,11 @@ public interface ISchoolLabCompetitionService extends IService<SchoolLabCompetit ...@@ -61,4 +63,11 @@ public interface ISchoolLabCompetitionService extends IService<SchoolLabCompetit
* @return 结果 * @return 结果
*/ */
public int deleteSchoolLabCompetitionById(Long id); public int deleteSchoolLabCompetitionById(Long id);
/**
* 获取教师
* @param sysUser
* @return
*/
List<Map<String,Object>> getTeacher(SysUser sysUser);
} }
package yangtz.cs.liu.campus.vo.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 仪器出入库明细对象Vo school_instrument_detail
*
* @author ruoyi
* @date 2023-09-06
*/
@Data
public class SchoolInstrumentDetailVo extends OurBaseEntity {
/** 仪器id */
@Excel(name = "仪器id")
private Long instrumentId;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 变动类型(1出库,2入库) */
@Excel(name = "变动类型", readConverterExp = "1=出库,2入库")
private String variationType;
/** 变动数量 */
@Excel(name = "变动数量")
private Integer variationNum;
/** 旧库存数量 */
@Excel(name = "旧库存数量")
private Integer oldStockNum;
/** 新库存数量 */
@Excel(name = "新库存数量")
private Integer newStockNum;
/** 变更时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date variationTime;
/** 备注 */
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
}
package yangtz.cs.liu.campus.vo.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import java.util.List;
@Data
public class SchoolInstrumentVo extends OurBaseEntity {
private List<Long> ids;
/** 仪器名称 */
@Excel(name = "仪器名称")
private String instrumentName;
/** 仪器分类id */
private Long instrumentTypeId;
/** 仪器分类 */
@Excel(name = "仪器分类")
private String instrumentTypeName;
/** 仪器型号 */
@Excel(name = "仪器型号")
private String instrumentModel;
/** 仪器数量 */
@Excel(name = "仪器数量")
private Integer instrumentNum;
/** 备注 */
private String remark;
}
package yangtz.cs.liu.campus.vo.schoolInstrument;
import com.core.domain.OurBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import yangtz.cs.liu.campus.domain.schoolInstrument.SchoolTeacherBorrowDetail;
import java.util.Date;
import java.util.List;
@Data
public class SchoolTeacherBorrowVo extends OurBaseEntity {
/** 借用人id */
@Excel(name = "借用人id")
private Long borrowById;
/** 借用人 */
@Excel(name = "借用人")
private String borrowBy;
/** 借用学科(1物理,2化学,3生物) */
@Excel(name = "借用学科(1物理,2化学,3生物)")
private String borrowSub;
/** 借用时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "借用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date borrowTime;
/** 借用状态(0未归还,1已归还,2已申请) */
@Excel(name = "借用状态(0未归还,1已归还,2已申请)")
private String borrowState;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 归还时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date returnTime;
/** 备注 */
private String remark;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/** 教师借用明细信息 */
private List<SchoolTeacherBorrowDetail> schoolTeacherBorrowDetailList;
}
package yangtz.cs.liu.campus.vo.schoolLab;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import yangtz.cs.liu.campus.domain.schoolLab.SchoolExperimentPlanClass;
import java.util.List;
@Data
public class SchoolExperimentPlanMbVo extends BaseEntity {
/** 实验计划主键id */
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/** 级部 */
@Excel(name = "级部")
private String grade;
/** 学年 */
@Excel(name = "学年")
private String schoolYear;
/** 学期(1上学期,2下学期) */
@Excel(name = "学期", combo = {"上学期","下学期"}, readConverterExp = "1=上学期,2=下学期")
private String semester;
/** 学科(1物理,2化学,3生物) */
@Excel(name = "学科", combo = {"物理","化学","生物"}, readConverterExp = "1=物理,2=化学,3=生物")
private String sub;
private List<String> subs;
/** 级部id */
private Long gradeId;
private List<Long> gradeIds;
/** 学年+学期 */
private String schoolYearSemester;
/** 实验分类(1分组实验,2演示实验,3探究实验) */
@Excel(name = "实验分类", combo = {"分组实验","演示实验","探究实验"}, readConverterExp = "1=分组实验,2=演示实验,3=探究实验")
private String experimentClassify;
/** 实验名称 */
@Excel(name = "实验名称")
private String experimentName;
/** 章节内容 */
@Excel(name = "章节内容")
private String chapterContent;
/** 是否已预约 */
private String isAppointment;
/** 计划开始时间 */
@Excel(name = "计划开始时间")
private String plannedStartTime;
/** 计划结束时间 */
@Excel(name = "计划结束时间")
private String plannedEndTime;
/** 计划时间 */
private String plannedTime;
/** 实验用品 */
@Excel(name = "实验用品")
private String experimentUseGoods;
private Long classId1;
@Excel(name = "班级名称1", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className1;
private Long classId2;
@Excel(name = "班级名称2", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className2;
private Long classId3;
@Excel(name = "班级名称3", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className3;
private Long classId4;
@Excel(name = "班级名称4", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className4;
private Long classId5;
@Excel(name = "班级名称5", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className5;
private Long classId6;
@Excel(name = "班级名称6", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className6;
private Long classId7;
@Excel(name = "班级名称7", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className7;
private Long classId8;
@Excel(name = "班级名称8", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className8;
private Long classId9;
@Excel(name = "班级名称9", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className9;
private Long classId10;
@Excel(name = "班级名称10", combo = {"一班","二班","三班","四班","五班","六班","七班","八班","九班","十班","十一班","十二班","十三班",
"十四班","十五班","十六班","十七班","十八班","十九班","二十班","二十一班","二十二班","二十三班","二十四班",
"二十五班","二十六班","二十七班","二十八班","二十九班","三十班","三十一班","三十二班"})
private String className10;
/** 实验计划与班级关系信息 */
private List<SchoolExperimentPlanClass> schoolExperimentPlanClassList;
}
...@@ -220,6 +220,4 @@ public class ExperimentLevelController extends BaseController { ...@@ -220,6 +220,4 @@ public class ExperimentLevelController extends BaseController {
public AjaxResult getGrade(@PathVariable("userId") Long userId) { public AjaxResult getGrade(@PathVariable("userId") Long userId) {
return AjaxResult.success(schoolGradeService.getGradeId(userId)); return AjaxResult.success(schoolGradeService.getGradeId(userId));
} }
} }
...@@ -61,8 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -61,8 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
c.del_flag = '0' c.del_flag = '0'
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="borrowTime != null and borrowTime != ''">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = #{borrowTime}</if> <if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if>
<if test="borrowById != null and borrowById != ''">and c.borrow_by_id = #{borrowById}</if> <if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if>
</select> </select>
<select id="selectSchoolCirculationVoListGr" parameterType="SchoolCirculationVo" resultMap="schoolCirculationVoResult"> <select id="selectSchoolCirculationVoListGr" parameterType="SchoolCirculationVo" resultMap="schoolCirculationVoResult">
...@@ -97,8 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -97,8 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
c.del_flag = '0' and u.user_id = #{adminId} c.del_flag = '0' and u.user_id = #{adminId}
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
<if test="borrowTime != null and borrowTime != ''">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = #{borrowTime}</if> <if test="borrowTime != null">and DATE_FORMAT(c.borrow_time,,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')</if>
<if test="borrowById != null and borrowById != ''">and c.borrow_by_id = #{borrowById}</if> <if test="borrowById != null">and c.borrow_by_id = #{borrowById}</if>
</select> </select>
<select id="selectSchoolCirculationVoById" parameterType="Long" resultMap="schoolCirculationVoResult"> <select id="selectSchoolCirculationVoById" parameterType="Long" resultMap="schoolCirculationVoResult">
...@@ -127,9 +127,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -127,9 +127,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.id = #{id} c.id = #{id}
</select> </select>
<select id="getReturningEquipmentByadminId" parameterType="SchoolReceiveQuery" resultMap="schoolCirculationVoResult"> <select id="getReturningEquipmentByadminId" parameterType="SchoolReceiveQuery" resultMap="schoolCirculationVoResult">
SELECT sc.id,sc.equipment_id,el.equipment_name,el.model,el.encode,sc.borrow_by_id,sc.borrow_by,sc.purpose,el.is_lend,sc.received_by_id,sc.received_by,sc.borrow_time,sc.return_state,sc.return_time,sc.deadline,sc.return_equipment_condition ,sc.remark SELECT sc.id,sc.equipment_id,el.equipment_name,el.model,el.encode,sc.borrow_by_id,sc.borrow_by,sc.purpose,el.is_lend,sc.received_by_id,sc.received_by,sc.borrow_time,sc.return_state,sc.return_time,sc.deadline,sc.return_equipment_condition ,sc.remark
...@@ -138,8 +135,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -138,8 +135,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if> <if test="equipmentName != null and equipmentName != ''">and el.equipment_name like concat('%', #{equipmentName}, '%')</if>
</select> </select>
<update id="deleteSchoolCirculationByIds" parameterType="String"> <update id="deleteSchoolCirculationByIds" parameterType="String">
update school_circulation set del_flag = '1' where id in update school_circulation set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentClassifyMapper">
<resultMap type="SchoolInstrumentClassify" id="SchoolInstrumentClassifyResult">
<result property="id" column="id" />
<result property="instrumentTypeName" column="instrument_type_name" />
<result property="parentId" column="parent_id" />
<result property="ancestors" column="ancestors" />
<result property="orderNum" column="order_num" />
<result property="isConsumables" column="is_consumables" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolInstrumentClassifyVo">
select id, instrument_type_name, parent_id, ancestors, order_num, is_consumables, remark, create_by, create_time, update_by, update_time, del_flag from school_instrument_classify
</sql>
<select id="selectSchoolInstrumentClassifyList" parameterType="SchoolInstrumentClassify" resultMap="SchoolInstrumentClassifyResult">
<include refid="selectSchoolInstrumentClassifyVo"/>
<where>
del_flag = '0'
<if test="id != null "> and (id = #{id} or FIND_IN_SET(#{id},ancestors))</if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="isConsumables != null and isConsumables != ''"> and is_consumables = #{isConsumables}</if>
</where>
order by order_num ASC
</select>
<select id="selectSchoolInstrumentClassifyById" parameterType="Long" resultMap="SchoolInstrumentClassifyResult">
<include refid="selectSchoolInstrumentClassifyVo"/>
where id = #{id}
</select>
<insert id="insertSchoolInstrumentClassify" parameterType="SchoolInstrumentClassify" useGeneratedKeys="true" keyProperty="id">
insert into school_instrument_classify
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="parentId != null">parent_id,</if>
<if test="ancestors != null">ancestors,</if>
<if test="orderNum != null">order_num,</if>
<if test="isConsumables != null">is_consumables,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="parentId != null">#{parentId},</if>
<if test="ancestors != null">#{ancestors},</if>
<if test="orderNum != null">#{orderNum},</if>
<if test="isConsumables != null">#{isConsumables},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolInstrumentClassify" parameterType="SchoolInstrumentClassify">
update school_instrument_classify
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="ancestors != null">ancestors = #{ancestors},</if>
<if test="orderNum != null">order_num = #{orderNum},</if>
<if test="isConsumables != null">is_consumables = #{isConsumables},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolInstrumentClassifyById" parameterType="Long">
update school_instrument_classify set del_flag = '1' where id = #{id} or FIND_IN_SET(#{id},ancestors)
</update>
<update id="deleteSchoolInstrumentClassifyByIds" parameterType="String">
update school_instrument_classify set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentDetailMapper">
<resultMap type="SchoolInstrumentDetail" id="SchoolInstrumentDetailResult">
<result property="id" column="id" />
<result property="instrumentId" column="instrument_id" />
<result property="instrumentName" column="instrument_name" />
<result property="instrumentTypeId" column="instrument_type_id" />
<result property="instrumentTypeName" column="instrument_type_name" />
<result property="variationType" column="variation_type" />
<result property="variationNum" column="variation_num" />
<result property="oldStockNum" column="old_stock_num" />
<result property="newStockNum" column="new_stock_num" />
<result property="variationTime" column="variation_time" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolInstrumentDetailVo">
select id, instrument_id, instrument_name, instrument_type_id, instrument_type_name, variation_type, variation_num, old_stock_num, new_stock_num, variation_time, remark, create_by, create_time, update_by, update_time, del_flag from school_instrument_detail
</sql>
<select id="selectSchoolInstrumentDetailList" parameterType="SchoolInstrumentDetailVo" resultMap="SchoolInstrumentDetailResult">
select i.id, i.instrument_id, i.instrument_name, i.instrument_type_id,
i.instrument_type_name, i.variation_type, i.variation_num, i.old_stock_num,
i.new_stock_num, i.variation_time, i.remark, i.create_by, i.create_time, i.update_by,
i.update_time, i.del_flag
from school_instrument_detail i
LEFT JOIN school_instrument_classify ic ON i.instrument_type_id = ic.id
<where>
i.del_flag = '0'
<if test="instrumentId != null "> and i.instrument_id = #{instrumentId}</if>
<if test="instrumentName != null and instrumentName != ''"> and i.instrument_name like concat('%', #{instrumentName}, '%')</if>
<if test="instrumentTypeId != null"> and i.instrument_type_id = #{instrumentTypeId} or FIND_IN_SET(#{instrumentTypeId},ic.ancestors)</if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and i.instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="variationType != null and variationType != ''"> and i.variation_type = #{variationType}</if>
<if test="variationNum != null "> and i.variation_num = #{variationNum}</if>
<if test="oldStockNum != null "> and i.old_stock_num = #{oldStockNum}</if>
<if test="newStockNum != null "> and i.new_stock_num = #{newStockNum}</if>
<if test="startTime != null and endTime != null "> and i.variation_time between #{startTime} and #{endTime}</if>
</where>
order by i.create_time DESC
</select>
<select id="selectSchoolInstrumentDetailById" parameterType="Long" resultMap="SchoolInstrumentDetailResult">
<include refid="selectSchoolInstrumentDetailVo"/>
where id = #{id}
</select>
<insert id="insertSchoolInstrumentDetail" parameterType="SchoolInstrumentDetail" useGeneratedKeys="true" keyProperty="id">
insert into school_instrument_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentId != null">instrument_id,</if>
<if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="variationType != null">variation_type,</if>
<if test="variationNum != null">variation_num,</if>
<if test="oldStockNum != null">old_stock_num,</if>
<if test="newStockNum != null">new_stock_num,</if>
<if test="variationTime != null">variation_time,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentId != null">#{instrumentId},</if>
<if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="variationType != null">#{variationType},</if>
<if test="variationNum != null">#{variationNum},</if>
<if test="oldStockNum != null">#{oldStockNum},</if>
<if test="newStockNum != null">#{newStockNum},</if>
<if test="variationTime != null">#{variationTime},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolInstrumentDetail" parameterType="SchoolInstrumentDetail">
update school_instrument_detail
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
<if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="variationType != null">variation_type = #{variationType},</if>
<if test="variationNum != null">variation_num = #{variationNum},</if>
<if test="oldStockNum != null">old_stock_num = #{oldStockNum},</if>
<if test="newStockNum != null">new_stock_num = #{newStockNum},</if>
<if test="variationTime != null">variation_time = #{variationTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolInstrumentDetailById" parameterType="Long">
update school_instrument_detail set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolInstrumentDetailByIds" parameterType="String">
update school_instrument_detail set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolInstrumentMapper">
<resultMap type="SchoolInstrument" id="SchoolInstrumentResult">
<result property="id" column="id" />
<result property="instrumentName" column="instrument_name" />
<result property="instrumentTypeId" column="instrument_type_id" />
<result property="instrumentTypeName" column="instrument_type_name" />
<result property="instrumentModel" column="instrument_model" />
<result property="instrumentNum" column="instrument_num" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectSchoolInstrumentVo">
select id, instrument_name, instrument_type_id, instrument_type_name, instrument_model, instrument_num, remark, create_by, create_time, update_by, update_time, del_flag from school_instrument
</sql>
<select id="selectSchoolInstrumentList" parameterType="SchoolInstrument" resultMap="SchoolInstrumentResult">
SELECT i.id, i.instrument_name, i.instrument_type_id, i.instrument_type_name, i.instrument_model,
i.instrument_num, i.remark, i.create_by, i.create_time, i.update_by, i.update_time, i.del_flag
FROM school_instrument i
LEFT JOIN school_instrument_classify ic ON i.instrument_type_id = ic.id
<where>
i.del_flag = '0'
<if test="instrumentName != null and instrumentName != ''"> and i.instrument_name like concat('%', #{instrumentName}, '%')</if>
<if test="instrumentTypeId != null"> and i.instrument_type_id = #{instrumentTypeId} or FIND_IN_SET(#{instrumentTypeId},ic.ancestors) </if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and i.instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="instrumentModel != null and instrumentModel != ''"> and i.instrument_model = #{instrumentModel}</if>
<if test="instrumentNum != null "> and i.instrument_num = #{instrumentNum}</if>
</where>
order by i.create_time DESC
</select>
<select id="selectInstrumentList" parameterType="SchoolInstrumentVo" resultMap="SchoolInstrumentResult">
SELECT i.id, i.instrument_name, i.instrument_type_id, i.instrument_type_name, i.instrument_model,
i.instrument_num, i.remark, i.create_by, i.create_time, i.update_by, i.update_time, i.del_flag
FROM school_instrument i
LEFT JOIN school_instrument_classify ic ON i.instrument_type_id = ic.id
<where>
i.del_flag = '0'
<if test="instrumentName != null and instrumentName != ''"> and i.instrument_name like concat('%', #{instrumentName}, '%')</if>
<if test="instrumentTypeId != null"> and i.instrument_type_id = #{instrumentTypeId} or FIND_IN_SET(#{instrumentTypeId},ic.ancestors) </if>
<if test="instrumentTypeName != null and instrumentTypeName != ''"> and i.instrument_type_name like concat('%', #{instrumentTypeName}, '%')</if>
<if test="instrumentModel != null and instrumentModel != ''"> and i.instrument_model = #{instrumentModel}</if>
<if test="instrumentNum != null "> and i.instrument_num = #{instrumentNum}</if>
<if test="ids != null">
and i.id not in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
order by i.create_time DESC
</select>
<select id="selectSchoolInstrumentById" parameterType="Long" resultMap="SchoolInstrumentResult">
<include refid="selectSchoolInstrumentVo"/>
where id = #{id}
</select>
<insert id="insertSchoolInstrument" parameterType="SchoolInstrument" useGeneratedKeys="true" keyProperty="id">
insert into school_instrument
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">instrument_name,</if>
<if test="instrumentTypeId != null">instrument_type_id,</if>
<if test="instrumentTypeName != null">instrument_type_name,</if>
<if test="instrumentModel != null">instrument_model,</if>
<if test="instrumentNum != null">instrument_num,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instrumentName != null">#{instrumentName},</if>
<if test="instrumentTypeId != null">#{instrumentTypeId},</if>
<if test="instrumentTypeName != null">#{instrumentTypeName},</if>
<if test="instrumentModel != null">#{instrumentModel},</if>
<if test="instrumentNum != null">#{instrumentNum},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
</trim>
</insert>
<update id="updateSchoolInstrument" parameterType="SchoolInstrument">
update school_instrument
<trim prefix="SET" suffixOverrides=",">
<if test="instrumentName != null">instrument_name = #{instrumentName},</if>
<if test="instrumentTypeId != null">instrument_type_id = #{instrumentTypeId},</if>
<if test="instrumentTypeName != null">instrument_type_name = #{instrumentTypeName},</if>
<if test="instrumentModel != null">instrument_model = #{instrumentModel},</if>
<if test="instrumentNum != null">instrument_num = #{instrumentNum},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolInstrumentById" parameterType="Long">
update school_instrument set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolInstrumentByIds" parameterType="String">
update school_instrument set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="yangtz.cs.liu.campus.mapper.schoolInstrument.SchoolTeacherBorrowMapper">
<resultMap type="SchoolTeacherBorrowVo" id="SchoolTeacherBorrowVoResult">
<result property="id" column="id" />
<result property="borrowById" column="borrow_by_id" />
<result property="borrowBy" column="borrow_by" />
<result property="borrowSub" column="borrow_sub" />
<result property="borrowTime" column="borrow_time" />
<result property="borrowState" column="borrow_state" />
<result property="applyTime" column="apply_time" />
<result property="returnTime" column="return_time" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<resultMap id="SchoolTeacherBorrowSchoolTeacherBorrowDetailResult" type="SchoolTeacherBorrowVo" extends="SchoolTeacherBorrowVoResult">
<collection property="schoolTeacherBorrowDetailList" notNullColumn="sub_id" javaType="java.util.List" resultMap="SchoolTeacherBorrowDetailResult" />
</resultMap>
<resultMap type="SchoolTeacherBorrowDetail" id="SchoolTeacherBorrowDetailResult">
<result property="id" column="sub_id" />
<result property="teacherBorrowId" column="sub_teacher_borrow_id" />
<result property="instrumentId" column="sub_instrument_id" />
<result property="instrumentName" column="sub_instrument_name" />
<result property="instrumentModel" column="sub_instrument_model" />
<result property="instrumentNum" column="sub_instrument_num" />
<result property="borrowNum" column="sub_borrow_num" />
<result property="damageNum" column="sub_damage_num" />
<result property="delFlag" column="sub_del_flag" />
</resultMap>
<sql id="selectSchoolTeacherBorrowVo">
select id, borrow_by_id, borrow_by, borrow_sub, borrow_time, borrow_state, apply_time, return_time, remark, create_by, create_time, update_by, update_time, del_flag from school_teacher_borrow
</sql>
<select id="selectSchoolTeacherBorrowList" parameterType="SchoolTeacherBorrowVo" resultMap="SchoolTeacherBorrowVoResult">
<include refid="selectSchoolTeacherBorrowVo"/>
<where>
del_flag = '0'
<if test="borrowById != null "> and borrow_by_id = #{borrowById}</if>
<if test="borrowBy != null and borrowBy != ''"> and borrow_by = #{borrowBy}</if>
<if test="borrowSub != null and borrowSub != ''"> and borrow_sub = #{borrowSub}</if>
<if test="borrowTime != null "> and borrow_time = #{borrowTime}</if>
<if test="borrowState != null and borrowState != ''"> and borrow_state = #{borrowState}</if>
<if test="startTime != null and endTime != null "> and apply_time between #{startTime} and #{endTime}</if>
<if test="returnTime != null "> and return_time = #{returnTime}</if>
</where>
order by create_time DESC
</select>
<select id="selectSchoolTeacherBorrowById" parameterType="Long" resultMap="SchoolTeacherBorrowSchoolTeacherBorrowDetailResult">
select a.id, a.borrow_by_id, a.borrow_by, a.borrow_sub, a.borrow_time, a.borrow_state, a.apply_time, a.return_time, a.remark, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
b.id as sub_id, b.teacher_borrow_id as sub_teacher_borrow_id, b.instrument_id as sub_instrument_id, b.instrument_name as sub_instrument_name, b.instrument_model as sub_instrument_model, b.instrument_num as sub_instrument_num, b.borrow_num as sub_borrow_num, b.damage_num as sub_damage_num, b.del_flag as sub_del_flag
from school_teacher_borrow a
left join school_teacher_borrow_detail b on b.teacher_borrow_id = a.id
where a.id = #{id}
</select>
<insert id="insertSchoolTeacherBorrow" parameterType="SchoolTeacherBorrowVo" useGeneratedKeys="true" keyProperty="id">
insert into school_teacher_borrow
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="borrowById != null">borrow_by_id,</if>
<if test="borrowBy != null">borrow_by,</if>
<if test="borrowSub != null">borrow_sub,</if>
<if test="borrowTime != null">borrow_time,</if>
<if test="borrowState != null">borrow_state,</if>
<if test="applyTime != null">apply_time,</if>
<if test="returnTime != null">return_time,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="borrowById != null">#{borrowById},</if>
<if test="borrowBy != null">#{borrowBy},</if>
<if test="borrowSub != null">#{borrowSub},</if>
<if test="borrowTime != null">#{borrowTime},</if>
<if test="borrowState != null">#{borrowState},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="returnTime != null">#{returnTime},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSchoolTeacherBorrow" parameterType="SchoolTeacherBorrowVo">
update school_teacher_borrow
<trim prefix="SET" suffixOverrides=",">
<if test="borrowById != null">borrow_by_id = #{borrowById},</if>
<if test="borrowBy != null">borrow_by = #{borrowBy},</if>
<if test="borrowSub != null">borrow_sub = #{borrowSub},</if>
<if test="borrowTime != null">borrow_time = #{borrowTime},</if>
<if test="borrowState != null">borrow_state = #{borrowState},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="returnTime != null">return_time = #{returnTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<update id="deleteSchoolTeacherBorrowById" parameterType="Long">
update school_teacher_borrow set del_flag = '1' where id = #{id}
</update>
<update id="deleteSchoolTeacherBorrowByIds" parameterType="String">
update school_teacher_borrow set del_flag = '1' where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="deleteSchoolTeacherBorrowDetailByTeacherBorrowIds" parameterType="String">
update school_teacher_borrow_detail set del_flag = '1' where teacher_borrow_id in
<foreach item="teacherBorrowId" collection="array" open="(" separator="," close=")">
#{teacherBorrowId}
</foreach>
</update>
<update id="deleteSchoolTeacherBorrowDetailByTeacherBorrowId" parameterType="Long">
update school_teacher_borrow_detail set del_flag = '1' where teacher_borrow_id = #{teacherBorrowId}
</update>
<insert id="batchSchoolTeacherBorrowDetail">
insert into school_teacher_borrow_detail( id, teacher_borrow_id, instrument_id, instrument_name, instrument_model, instrument_num, borrow_num) values
<foreach item="item" index="index" collection="list" separator=",">
( 0, #{item.teacherBorrowId}, #{item.instrumentId}, #{item.instrumentName}, #{item.instrumentModel}, #{item.instrumentNum}, #{item.borrowNum})
</foreach>
</insert>
<update id="updateSchoolTeacherBorrowDetails">
<foreach collection="list" item="data" separator=";">
update school_teacher_borrow_detail set damage_num = #{data.damageNum} where id = #{data.id}
</foreach>
</update>
</mapper>
\ No newline at end of file
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<result property="experimentClassify" column="experiment_classify" /> <result property="experimentClassify" column="experiment_classify" />
<result property="experimentName" column="experiment_name" /> <result property="experimentName" column="experiment_name" />
<result property="chapterContent" column="chapter_content" /> <result property="chapterContent" column="chapter_content" />
<result property="isAppointment" column="is_appointment" />
<result property="plannedStartTime" column="planned_start_time" /> <result property="plannedStartTime" column="planned_start_time" />
<result property="plannedEndTime" column="planned_end_time" /> <result property="plannedEndTime" column="planned_end_time" />
<result property="experimentUseGoods" column="experiment_use_goods" /> <result property="experimentUseGoods" column="experiment_use_goods" />
...@@ -36,7 +37,7 @@ ...@@ -36,7 +37,7 @@
</resultMap> </resultMap>
<sql id="selectSchoolExperimentPlanVo"> <sql id="selectSchoolExperimentPlanVo">
select id, sub, grade_id, grade, school_year, semester, experiment_classify, experiment_name, chapter_content, planned_start_time, planned_end_time, experiment_use_goods, create_by, create_time, update_by, update_time, del_flag from school_experiment_plan select id, sub, grade_id, grade, school_year, semester, experiment_classify, experiment_name, chapter_content, is_appointment, planned_start_time, planned_end_time, experiment_use_goods, create_by, create_time, update_by, update_time, del_flag from school_experiment_plan
</sql> </sql>
<select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult"> <select id="selectSchoolExperimentPlanList" parameterType="SchoolExperimentPlanVo" resultMap="SchoolExperimentPlanVoResult">
...@@ -119,7 +120,7 @@ ...@@ -119,7 +120,7 @@
</select> </select>
<select id="selectSchoolExperimentPlanById" parameterType="Long" resultMap="ExperimentPlanClassResult"> <select id="selectSchoolExperimentPlanById" parameterType="Long" resultMap="ExperimentPlanClassResult">
select a.id, a.sub, a.grade_id, a.grade, a.school_year, a.semester, a.experiment_classify, a.experiment_name, a.chapter_content, a.planned_start_time, a.planned_end_time, a.experiment_use_goods, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag, select a.id, a.sub, a.grade_id, a.grade, a.school_year, a.semester, a.experiment_classify, a.experiment_name, a.chapter_content, a.is_appointment, a.planned_start_time, a.planned_end_time, a.experiment_use_goods, a.create_by, a.create_time, a.update_by, a.update_time, a.del_flag,
b.id as sub_id, b.experiment_plan_id as sub_experiment_plan_id, b.class_id as sub_class_id, b.del_flag as sub_del_flag b.id as sub_id, b.experiment_plan_id as sub_experiment_plan_id, b.class_id as sub_class_id, b.del_flag as sub_del_flag
from school_experiment_plan a from school_experiment_plan a
left join school_experiment_plan_class b on b.experiment_plan_id = a.id left join school_experiment_plan_class b on b.experiment_plan_id = a.id
...@@ -137,6 +138,7 @@ ...@@ -137,6 +138,7 @@
<if test="experimentClassify != null">experiment_classify,</if> <if test="experimentClassify != null">experiment_classify,</if>
<if test="experimentName != null">experiment_name,</if> <if test="experimentName != null">experiment_name,</if>
<if test="chapterContent != null">chapter_content,</if> <if test="chapterContent != null">chapter_content,</if>
<if test="isAppointment != null">is_appointment,</if>
<if test="plannedStartTime != null">planned_start_time,</if> <if test="plannedStartTime != null">planned_start_time,</if>
<if test="plannedEndTime != null">planned_end_time,</if> <if test="plannedEndTime != null">planned_end_time,</if>
<if test="experimentUseGoods != null">experiment_use_goods,</if> <if test="experimentUseGoods != null">experiment_use_goods,</if>
...@@ -155,6 +157,7 @@ ...@@ -155,6 +157,7 @@
<if test="experimentClassify != null">#{experimentClassify},</if> <if test="experimentClassify != null">#{experimentClassify},</if>
<if test="experimentName != null">#{experimentName},</if> <if test="experimentName != null">#{experimentName},</if>
<if test="chapterContent != null">#{chapterContent},</if> <if test="chapterContent != null">#{chapterContent},</if>
<if test="isAppointment != null">#{isAppointment},</if>
<if test="plannedStartTime != null">#{plannedStartTime},</if> <if test="plannedStartTime != null">#{plannedStartTime},</if>
<if test="plannedEndTime != null">#{plannedEndTime},</if> <if test="plannedEndTime != null">#{plannedEndTime},</if>
<if test="experimentUseGoods != null">#{experimentUseGoods},</if> <if test="experimentUseGoods != null">#{experimentUseGoods},</if>
...@@ -177,6 +180,7 @@ ...@@ -177,6 +180,7 @@
<if test="experimentClassify != null">experiment_classify = #{experimentClassify},</if> <if test="experimentClassify != null">experiment_classify = #{experimentClassify},</if>
<if test="experimentName != null">experiment_name = #{experimentName},</if> <if test="experimentName != null">experiment_name = #{experimentName},</if>
<if test="chapterContent != null">chapter_content = #{chapterContent},</if> <if test="chapterContent != null">chapter_content = #{chapterContent},</if>
<if test="isAppointment != null">is_appointment = #{isAppointment},</if>
<if test="plannedStartTime != null">planned_start_time = #{plannedStartTime},</if> <if test="plannedStartTime != null">planned_start_time = #{plannedStartTime},</if>
<if test="plannedEndTime != null">planned_end_time = #{plannedEndTime},</if> <if test="plannedEndTime != null">planned_end_time = #{plannedEndTime},</if>
<if test="experimentUseGoods != null">experiment_use_goods = #{experimentUseGoods},</if> <if test="experimentUseGoods != null">experiment_use_goods = #{experimentUseGoods},</if>
......
...@@ -138,4 +138,19 @@ ...@@ -138,4 +138,19 @@
<delete id="deleteSchoolAccessoryByBusinessId" parameterType="Long"> <delete id="deleteSchoolAccessoryByBusinessId" parameterType="Long">
delete from school_accessory where accessory_type = "证书照片" and business_id = #{businessId} delete from school_accessory where accessory_type = "证书照片" and business_id = #{businessId}
</delete> </delete>
<select id="getTeacher" resultType="Map" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
SELECT
user_id as userId,
user_name as userName,
phonenumber as phone
FROM
sys_user
WHERE
del_flag = '0'
AND `status` = '0' and user_login_type = '0'
<if test="userName != null and userName != ''">
AND user_name like concat('%', #{userName}, '%')
</if>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
group by u.user_id,u.user_name group by u.user_id,u.user_name
</select> </select>
<select id="getLabAdmin" parameterType="String" resultType="Map"> <select id="getLabAdmin" resultType="Map">
select select
u.user_id as userId, u.user_id as userId,
u.user_name as userName u.user_name as userName
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
left join sys_user_role ur on u.user_id = ur.user_id left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on ur.role_id = r.role_id left join sys_role r on ur.role_id = r.role_id
where where
r.role_key = #{roleKey} r.role_key = #{roleKey} and u.user_id = #{userId}
</select> </select>
<select id="getSubAll" resultType="Map"> <select id="getSubAll" resultType="Map">
......
...@@ -49,27 +49,27 @@ ...@@ -49,27 +49,27 @@
from school_teacher_lab_apply tla from school_teacher_lab_apply tla
LEFT JOIN school_lab_class_year lcy ON tla.lab_class_year_id = lcy.id LEFT JOIN school_lab_class_year lcy ON tla.lab_class_year_id = lcy.id
<where> <where>
del_flag = '0' tla.del_flag = '0'
<if test="labClassYearId != null and labClassYearId != ''"> and lab_class_year_id = #{labClassYearId}</if> <if test="labClassYearId != null and labClassYearId != ''"> and tla.lab_class_year_id = #{labClassYearId}</if>
<if test="experimentClassify != null and experimentClassify != ''"> and experiment_classify = #{experimentClassify}</if> <if test="experimentClassify != null and experimentClassify != ''"> and tla.experiment_classify = #{experimentClassify}</if>
<if test="experimentName != null and experimentName != ''"> and experiment_name like concat('%', #{experimentName}, '%')</if> <if test="experimentName != null and experimentName != ''"> and tla.experiment_name like concat('%', #{experimentName}, '%')</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if> <if test="sub != null and sub != ''"> and tla.sub = #{sub}</if>
<if test="gradeId != null"> and grade_id = #{gradeId}</if> <if test="gradeId != null"> and tla.grade_id = #{gradeId}</if>
<if test="grade != null and grade != ''"> and grade like concat('%', #{grade}, '%')</if> <if test="grade != null and grade != ''"> and tla.grade like concat('%', #{grade}, '%')</if>
<if test="schoolYear != null and schoolYear != ''"> and school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''"> and tla.school_year = #{schoolYear}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if> <if test="semester != null and semester != ''"> and tla.semester = #{semester}</if>
<if test="classId != null and classId != ''"> and class_id = #{classId}</if> <if test="classId != null and classId != ''"> and tla.class_id = #{classId}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if> <if test="className != null and className != ''"> and tla.class_name like concat('%', #{className}, '%')</if>
<if test="chapterContent != null and chapterContent != ''"> and chapter_content = #{chapterContent}</if> <if test="chapterContent != null and chapterContent != ''"> and tla.chapter_content = #{chapterContent}</if>
<if test="startTime != null and endTime != null "> and experiment_time between #{startTime} and #{endTime}</if> <if test="startTime != null and endTime != null "> and tla.experiment_time between #{startTime} and #{endTime}</if>
<if test="section != null and section != ''"> and section = #{section}</if> <if test="section != null and section != ''"> and tla.section = #{section}</if>
<if test="labId != null "> and lab_id = #{labId}</if> <if test="labId != null "> and tla.lab_id = #{labId}</if>
<if test="labName != null and labName != ''"> and lab_name like concat('%', #{labName}, '%')</if> <if test="labName != null and labName != ''"> and tla.lab_name like concat('%', #{labName}, '%')</if>
<if test="applyState != null and applyState != ''"> and apply_state = #{applyState}</if> <if test="applyState != null and applyState != ''"> and tla.apply_state = #{applyState}</if>
<if test="applyId != null "> and apply_id = #{applyId}</if> <if test="applyId != null "> and tla.apply_id = #{applyId}</if>
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if> <if test="applyName != null and applyName != ''"> and tla.apply_name like concat('%', #{applyName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if> <if test="applyTime != null "> and tla.apply_time = #{applyTime}</if>
<if test="state != null "> and state = #{state}</if> <if test="state != null "> and tla.state = #{state}</if>
<if test="subs != null "> <if test="subs != null ">
and tla.sub in and tla.sub in
<foreach item="sub" collection="subs" open="(" separator="," close=")"> <foreach item="sub" collection="subs" open="(" separator="," close=")">
...@@ -250,13 +250,18 @@ ...@@ -250,13 +250,18 @@
COUNT(CASE WHEN experiment_classify = 2 THEN experiment_classify END) as sycount, COUNT(CASE WHEN experiment_classify = 2 THEN experiment_classify END) as sycount,
COUNT(CASE WHEN experiment_classify = 3 THEN experiment_classify END) as sjcount, COUNT(CASE WHEN experiment_classify = 3 THEN experiment_classify END) as sjcount,
COUNT(CASE WHEN state = 1 THEN state END) ywccount COUNT(CASE WHEN state = 1 THEN state END) ywccount
FROM school_teacher_lab_apply WHERE school_year = #{schoolYear} FROM school_teacher_lab_apply
<where>
<if test="schoolYear != null and schoolYear != ''">
and school_year = #{schoolYear}
</if>
<if test="semester != null and semester != ''"> <if test="semester != null and semester != ''">
AND semester = #{semester} AND semester = #{semester}
</if> </if>
<if test="applyName != null and applyName != ''"> <if test="applyName != null and applyName != ''">
AND apply_name like concat('%', #{applyName}, '%') AND apply_name like concat('%', #{applyName}, '%')
</if> </if>
</where>
GROUP BY apply_name GROUP BY apply_name
</select> </select>
...@@ -293,6 +298,7 @@ ...@@ -293,6 +298,7 @@
<select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult"> <select id="getGradeClassDetails" parameterType="SchoolTeacherLabApplyVo" resultMap="SchoolTeacherLabApplyVoResult">
<include refid="selectSchoolTeacherLabApplyVo"/> <include refid="selectSchoolTeacherLabApplyVo"/>
WHERE del_flag = '0' WHERE del_flag = '0'
<if test="state != null and state != ''">and state = #{state}</if>
<if test="semester != null and semester != ''">and semester = #{semester}</if> <if test="semester != null and semester != ''">and semester = #{semester}</if>
<if test="schoolYear != null and schoolYear != ''">and school_year = #{schoolYear}</if> <if test="schoolYear != null and schoolYear != ''">and school_year = #{schoolYear}</if>
<if test="gradeId != null">and grade_id = #{gradeId}</if> <if test="gradeId != null">and grade_id = #{gradeId}</if>
......
...@@ -24,12 +24,13 @@ ...@@ -24,12 +24,13 @@
</resultMap> </resultMap>
<select id="querylistbx" parameterType="TeacherBx" resultMap="TeacherBxResult"> <select id="querylistbx" parameterType="TeacherBx" resultMap="TeacherBxResult">
SELECT ser.id,encode,equipment_name,model,date_of_production,place,report_repair_time,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark SELECT ser.id,encode,equipment_name,model,date_of_production,place,report_repair_time,report_repair,problem,repair_name,repair_id,repair_time,repair_state,evaluate,ser.remark
FROM school_equipment_repair ser FROM school_equipment_repair ser
JOIN school_equipment_ledger sel JOIN school_equipment_ledger sel
ON ser.equipment_id=sel.id ON ser.equipment_id=sel.id
<where>
<if test="equipmentName!=null"> <if test="equipmentName!=null">
WHERE equipment_name like concat('%',#{equipmentName},'%') and equipment_name like concat('%',#{equipmentName},'%')
</if> </if>
<if test="classificationCode!=null"> <if test="classificationCode!=null">
AND ser.classification_code like concat('%',#{classificationCode},'%') AND ser.classification_code like concat('%',#{classificationCode},'%')
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
<if test="reportRepairId!=null"> <if test="reportRepairId!=null">
AND report_repair_id =#{reportRepairId} AND report_repair_id =#{reportRepairId}
</if> </if>
</where>
</select> </select>
</mapper> </mapper>
...@@ -19,15 +19,16 @@ ...@@ -19,15 +19,16 @@
FROM school_circulation ss FROM school_circulation ss
JOIN school_equipment_ledger ssc JOIN school_equipment_ledger ssc
ON ss.equipment_id=ssc.id ON ss.equipment_id=ssc.id
<where>
<if test="equipmentName!=null"> <if test="equipmentName!=null">
WHERE equipment_name like concat('%',#{equipmentName},'%') and equipment_name like concat('%',#{equipmentName},'%')
</if> </if>
<if test="borrowTime!=null"> <if test="borrowTime!=null">
AND borrow_time like concat('%',#{borrowTime},'%') AND DATE_FORMAT(ss.borrow_time,'%Y-%m-%d') = DATE_FORMAT(#{borrowTime},'%Y-%m-%d')
</if> </if>
<if test="borrowByid!=null"> <if test="borrowByid!=null">
AND borrow_by_id =#{borrowByid} AND borrow_by_id = #{borrowByid}
</if> </if>
</where>
</select> </select>
</mapper> </mapper>
...@@ -18,14 +18,19 @@ ...@@ -18,14 +18,19 @@
FROM school_receive sel FROM school_receive sel
JOIN school_equipment_ledger sr JOIN school_equipment_ledger sr
ON sel.equipment_id=sr.id ON sel.equipment_id=sr.id
<where>
<if test="equipmentName!=null"> <if test="equipmentName!=null">
WHERE equipment_name like concat('%',#{equipmentName},'%') and equipment_name like concat('%',#{equipmentName},'%')
</if> </if>
<if test="recipientTime!=null"> <if test="recipientTime!=null">
AND recipient_time like concat('%',#{recipientTime},'%') and DATE_FORMAT(recipient_time,'%Y-%m-%d') = DATE_FORMAT(#{recipientTime},'%Y-%m-%d')
</if>
<if test="recipientBy!=null">
AND recipient_by like concat('%',#{recipientBy},'%')
</if> </if>
<if test="recipientById!=null"> <if test="recipientById!=null">
AND recipient_by_id =#{recipientById} AND recipient_by_id =#{recipientById}
</if> </if>
</where>
</select> </select>
</mapper> </mapper>
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