Browse Source

Merge remote-tracking branch 'origin/dev' into dev

phoenix 1 year ago
parent
commit
b36873d435

+ 1 - 1
Makefile

@@ -2,7 +2,7 @@ merge:
 	git checkout master;git merge dev;git push;git checkout dev;
 
 create-tag:
-	git checkout master;git tag v1.2.4;git push origin --tags;git checkout dev;
+	git checkout master;git tag v1.2.5;git push origin --tags;git checkout dev;
 
 remove-tag:
 	git tag -d v1.2.0;git push origin :refs/tags/v1.1.8;

+ 18 - 0
src/main/java/com/xjrsoft/module/room/controller/RoomBedAdjustController.java

@@ -7,20 +7,25 @@ import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.room.dto.AdjustBedPageDto;
 import com.xjrsoft.module.room.dto.AdjustClassPageDto;
+import com.xjrsoft.module.room.dto.DistributeRoomBedDto;
 import com.xjrsoft.module.room.service.IRoomBedService;
 import com.xjrsoft.module.room.vo.AdjustBedClassPageVo;
 import com.xjrsoft.module.room.vo.AdjustBedStudentPageVo;
+import com.xjrsoft.module.room.vo.DistributeResultClassVo;
 import com.xjrsoft.module.room.vo.NoBedStudentPageVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
 * @title: 调整床位
@@ -72,4 +77,17 @@ public class RoomBedAdjustController {
     public RT<Boolean> delete(@Valid @RequestBody Long id){
         return RT.ok(roomBedService.clearStudentInfoByRoomId(id));
     }
+
+    @PutMapping
+    @ApiOperation(value = "修改寝室床位")
+    @SaCheckPermission("roomBedAdjust:edit")
+    public RT<List<DistributeResultClassVo>> adjustBed(@Valid @RequestBody DistributeRoomBedDto dto){
+        Boolean result = roomBedService.distributeRoomBed(dto);
+        List<DistributeResultClassVo> list = new ArrayList<>();
+        if(result){
+            list = roomBedService.getDistributeResult(dto);
+            return RT.ok(list);
+        }
+        return RT.ok(list);
+    }
 }

+ 95 - 0
src/main/java/com/xjrsoft/module/weekly/controller/WeeklyDutyScheduleController.java

@@ -0,0 +1,95 @@
+package com.xjrsoft.module.weekly.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.weekly.dto.WeeklyDutySchedulePageDto;
+import com.xjrsoft.module.weekly.entity.WeeklyDutySchedule;
+import com.xjrsoft.module.weekly.service.IWeeklyDutyScheduleService;
+import com.xjrsoft.module.weekly.vo.WeeklyDutyScheduleListVo;
+import com.xjrsoft.module.weekly.vo.WeeklyDutySchedulePageVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/weekly" + "/weeklyDutySchedule")
+@Api(value = "/weekly"  + "/weeklyDutySchedule",tags = "值周排班代码")
+@AllArgsConstructor
+public class WeeklyDutyScheduleController {
+
+
+    private final IWeeklyDutyScheduleService weeklyDutyScheduleService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="值周排班列表(分页)")
+    @SaCheckPermission("weeklydutyschedule:detail")
+    public RT<PageOutput<WeeklyDutySchedulePageVo>> page(@Valid WeeklyDutySchedulePageDto dto){
+
+        LambdaQueryWrapper<WeeklyDutySchedule> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                    .orderByDesc(WeeklyDutySchedule::getId)
+                .select(WeeklyDutySchedule.class,x -> VoToColumnUtil.fieldsToColumns(WeeklyDutySchedulePageVo.class).contains(x.getProperty()));
+        IPage<WeeklyDutySchedule> page = weeklyDutyScheduleService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<WeeklyDutySchedulePageVo> pageOutput = ConventPage.getPageOutput(page, WeeklyDutySchedulePageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @PostMapping("/import")
+    @ApiOperation(value = "导入")
+    public RT<Boolean> importData(@RequestParam("file") MultipartFile file) throws IOException {
+        //先清空
+        weeklyDutyScheduleService.deleteAll();
+        //在导入
+        List<Map<Integer, Object>> excelDataList = EasyExcel.read(file.getInputStream()).sheet().headRowNumber(3).doReadSync();
+//        List<WeeklyDutySchedulePageVo> savedDataList = EasyExcel.read(file.getInputStream()).head(WeeklyDutySchedulePageVo.class).sheet().doReadSync();
+        Boolean result = weeklyDutyScheduleService.insertMany(excelDataList);
+        return RT.ok(result);
+    }
+
+    @GetMapping("/export")
+    @ApiOperation(value = "导出")
+    public ResponseEntity<byte[]> exportData(@Valid WeeklyDutySchedulePageDto dto, @RequestParam(defaultValue = "false") Boolean isTemplate) {
+        List<WeeklyDutySchedule> list = weeklyDutyScheduleService.list();
+        List<WeeklyDutyScheduleListVo> customerList = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+        for (WeeklyDutySchedule vo : list) {
+            WeeklyDutyScheduleListVo listVo = BeanUtil.toBean(vo, WeeklyDutyScheduleListVo.class);
+            listVo.setDateBirth(sdf.format(vo.getDateBirth()));
+
+            customerList.add(listVo);
+        }
+        ByteArrayOutputStream bot = new ByteArrayOutputStream();
+        EasyExcel.write(bot, WeeklyDutyScheduleListVo.class).automaticMergeHead(false).excelType(ExcelTypeEnum.XLSX).sheet().doWrite(customerList);
+
+        return RT.fileStream(bot.toByteArray(), "WeeklyDutySchedule" + ExcelTypeEnum.XLSX.getValue());
+    }
+}

+ 68 - 0
src/main/java/com/xjrsoft/module/weekly/dto/AddWeeklyDutyScheduleDto.java

@@ -0,0 +1,68 @@
+package com.xjrsoft.module.weekly.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+public class AddWeeklyDutyScheduleDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学号/工号
+    */
+    @ApiModelProperty("学号/工号")
+    private String userNumber;
+    /**
+    * 姓名
+    */
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+    * 性别
+    */
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 证件号码
+    */
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+    /**
+    * 出生日期
+    */
+    @ApiModelProperty("出生日期")
+    private Date dateBirth;
+    /**
+    * 年龄
+    */
+    @ApiModelProperty("年龄")
+    private Integer age;
+    /**
+    * 备注
+    */
+    @ApiModelProperty("备注")
+    private String remark;
+
+}

+ 32 - 0
src/main/java/com/xjrsoft/module/weekly/dto/UpdateWeeklyDutyScheduleDto.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.weekly.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+public class UpdateWeeklyDutyScheduleDto extends AddWeeklyDutyScheduleDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+}

+ 26 - 0
src/main/java/com/xjrsoft/module/weekly/dto/WeeklyDutySchedulePageDto.java

@@ -0,0 +1,26 @@
+package com.xjrsoft.module.weekly.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+/**
+* @title: 值周排班分页查询入参
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class WeeklyDutySchedulePageDto extends PageInput {
+
+
+}

+ 114 - 0
src/main/java/com/xjrsoft/module/weekly/entity/WeeklyDutySchedule.java

@@ -0,0 +1,114 @@
+package com.xjrsoft.module.weekly.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+@TableName("weekly_duty_schedule")
+@ApiModel(value = "weekly_duty_schedule", description = "值周排班")
+public class WeeklyDutySchedule implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学号/工号
+    */
+    @ApiModelProperty("学号/工号")
+    private String userNumber;
+    /**
+    * 姓名
+    */
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+    * 性别
+    */
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 证件号码
+    */
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+    /**
+    * 出生日期
+    */
+    @ApiModelProperty("出生日期")
+    private java.sql.Timestamp dateBirth;
+    /**
+    * 年龄
+    */
+    @ApiModelProperty("年龄")
+    private Integer age;
+    /**
+    * 备注
+    */
+    @ApiModelProperty("备注")
+    private String remark;
+
+
+}

+ 17 - 0
src/main/java/com/xjrsoft/module/weekly/mapper/WeeklyDutyScheduleMapper.java

@@ -0,0 +1,17 @@
+package com.xjrsoft.module.weekly.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.weekly.entity.WeeklyDutySchedule;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Mapper
+public interface WeeklyDutyScheduleMapper extends MPJBaseMapper<WeeklyDutySchedule> {
+
+}

+ 23 - 0
src/main/java/com/xjrsoft/module/weekly/service/IWeeklyDutyScheduleService.java

@@ -0,0 +1,23 @@
+package com.xjrsoft.module.weekly.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.weekly.entity.WeeklyDutySchedule;
+import com.xjrsoft.module.weekly.vo.WeeklyDutySchedulePageVo;
+import lombok.Data;
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+
+public interface IWeeklyDutyScheduleService extends MPJBaseService<WeeklyDutySchedule> {
+
+    void deleteAll();
+
+    Boolean insertMany(List<Map<Integer, Object>> savedDataList);
+}

+ 77 - 0
src/main/java/com/xjrsoft/module/weekly/service/impl/WeeklyDutyScheduleServiceImpl.java

@@ -0,0 +1,77 @@
+package com.xjrsoft.module.weekly.service.impl;
+
+import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.common.enums.EnabledMark;
+import com.xjrsoft.common.exception.MyException;
+import com.xjrsoft.module.weekly.entity.WeeklyDutySchedule;
+import com.xjrsoft.module.weekly.mapper.WeeklyDutyScheduleMapper;
+import com.xjrsoft.module.weekly.service.IWeeklyDutyScheduleService;
+import com.xjrsoft.module.weekly.vo.WeeklyDutySchedulePageVo;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.sql.Timestamp;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+* @title: 值周排班
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class WeeklyDutyScheduleServiceImpl extends MPJBaseServiceImpl<WeeklyDutyScheduleMapper, WeeklyDutySchedule> implements IWeeklyDutyScheduleService {
+    private final WeeklyDutyScheduleMapper weeklyDutyScheduleMapper;
+    @Override
+    public void deleteAll() {
+        weeklyDutyScheduleMapper.delete(
+            Wrappers.<WeeklyDutySchedule>query().lambda().gt(WeeklyDutySchedule::getCreateDate, new Date())
+        );
+    }
+
+    @Override
+    public Boolean insertMany(List<Map<Integer, Object>> savedDataList) {
+        int sortCode = 1;
+        long createUserId = StpUtil.getLoginIdAsLong();
+        Date createDate = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
+        for (Map<Integer, Object> ScheduleVo : savedDataList) {
+            if(ObjectUtil.isNull(ScheduleVo.get(0)) || ObjectUtil.isNull(ScheduleVo.get(1)) || ObjectUtil.isNull(ScheduleVo.get(3))){
+                throw new MyException("表中有必填项信息未填写,请填写" );
+            }
+            WeeklyDutySchedule schedule = new WeeklyDutySchedule();
+            schedule.setUserNumber(ScheduleVo.get(0).toString());
+            schedule.setName(ScheduleVo.get(1).toString());
+            schedule.setGender(ScheduleVo.get(2).toString());
+            schedule.setCredentialNumber(ScheduleVo.get(3).toString());
+            if(ObjectUtil.isNotNull(ScheduleVo.get(4))){
+                try {
+                    schedule.setDateBirth(new Timestamp(sdf.parse(ScheduleVo.get(4).toString()).getTime()));
+                } catch (ParseException e) {
+                    throw new MyException("出生日期格式错误" );
+                }
+            }
+
+            schedule.setAge(Integer.valueOf(ScheduleVo.get(5).toString()));
+            schedule.setRemark(ScheduleVo.get(6).toString());
+            schedule.setSortCode(sortCode);
+            schedule.setCreateDate(createDate);
+            schedule.setCreateUserId(createUserId);
+            schedule.setDeleteMark(DeleteMark.NODELETE.getCode());
+            schedule.setEnabledMark(EnabledMark.ENABLED.getCode());
+            weeklyDutyScheduleMapper.insert(schedule);
+            sortCode ++;
+        }
+        return true;
+    }
+}

+ 72 - 0
src/main/java/com/xjrsoft/module/weekly/vo/WeeklyDutyScheduleListVo.java

@@ -0,0 +1,72 @@
+package com.xjrsoft.module.weekly.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 值周排班分页列表出参
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+public class WeeklyDutyScheduleListVo {
+
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+
+    /**
+    * 学号/工号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("工号")
+    @ApiModelProperty("工号")
+    private String userNumber;
+    /**
+    * 姓名
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("姓名")
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+    * 性别
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("性别")
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 证件号码
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("证件号码")
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+    /**
+    * 年龄
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("年龄")
+    @ApiModelProperty("年龄")
+    private Integer age;
+    /**
+    * 备注
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("值周情况")
+    @ApiModelProperty("值周情况")
+    private String remark;
+
+    /**
+     * 出生日期
+     */
+    @ApiModelProperty("出生日期")
+    @ExcelProperty("出生日期")
+    private String dateBirth;
+
+}

+ 125 - 0
src/main/java/com/xjrsoft/module/weekly/vo/WeeklyDutySchedulePageVo.java

@@ -0,0 +1,125 @@
+package com.xjrsoft.module.weekly.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 值周排班分页列表出参
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+public class WeeklyDutySchedulePageVo {
+
+    /**
+    * 主键编号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("主键编号")
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 创建人
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("创建人")
+    @ApiModelProperty("创建人")
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("创建时间")
+    @ApiModelProperty("创建时间")
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("修改人")
+    @ApiModelProperty("修改人")
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("修改时间")
+    @ApiModelProperty("修改时间")
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("删除标记")
+    @ApiModelProperty("删除标记")
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("有效标志")
+    @ApiModelProperty("有效标志")
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学号/工号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("工号")
+    @ApiModelProperty("工号")
+    private String userNumber;
+    /**
+    * 姓名
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("姓名")
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+    * 性别
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("性别")
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 证件号码
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("证件号码")
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+    /**
+    * 年龄
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("年龄")
+    @ApiModelProperty("年龄")
+    private Integer age;
+    /**
+    * 备注
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("值周情况")
+    @ApiModelProperty("值周情况")
+    private String remark;
+
+    /**
+     * 出生日期
+     */
+    @ApiModelProperty("出生日期")
+    @ExcelProperty("出生日期")
+    private Date dateBirth;
+
+}

+ 69 - 0
src/main/java/com/xjrsoft/module/weekly/vo/WeeklyDutyScheduleVo.java

@@ -0,0 +1,69 @@
+package com.xjrsoft.module.weekly.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+/**
+* @title: 值周排班表单出参
+* @Author dzx
+* @Date: 2023-12-30
+* @Version 1.0
+*/
+@Data
+public class WeeklyDutyScheduleVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学号/工号
+    */
+    @ApiModelProperty("学号/工号")
+    private String userNumber;
+    /**
+    * 姓名
+    */
+    @ApiModelProperty("姓名")
+    private String name;
+    /**
+    * 性别
+    */
+    @ApiModelProperty("性别")
+    private String gender;
+    /**
+    * 证件号码
+    */
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+    /**
+    * 出生日期
+    */
+    @ApiModelProperty("出生日期")
+    private Date dateBirth;
+    /**
+    * 年龄
+    */
+    @ApiModelProperty("年龄")
+    private Integer age;
+    /**
+    * 备注
+    */
+    @ApiModelProperty("备注")
+    private String remark;
+
+
+
+}

+ 29 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -1644,6 +1644,35 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+    /**
+     * 宿管员管理
+     * @throws IOException
+     */
+    @Test
+    public void gcWeeklyDutySchedule() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("weekly_duty_schedule");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("weekly");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(true);//是否生成导入接口
+        params.setExport(true);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
+
 
     /**
      * 寝室干部任命(任命学生)