yys  1.仓储物流增加分类管理
2.仓储物流分类管理导出接口
4.新疆生产管控定制化
已添加2个文件
已修改20个文件
335 ■■■■ 文件已修改
src/main/java/com/ruoyi/compensationperformance/controller/CompensationPerformanceController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/compensationperformance/pojo/CompensationPerformance.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/device/dto/DeviceLedgerDto.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/device/pojo/DeviceLedger.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/system/controller/SysUserController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/system/mapper/SysUserMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/mapper/LossMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/pojo/Loss.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff/dto/SaveStaffSchedulingDto.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff/dto/StaffSchedulingDto.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff/pojo/StaffScheduling.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff/service/StaffSchedulingService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff/service/impl/StaffSchedulingServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/device/DeviceLedgerMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/staff/StaffSchedulingMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/system/SysUserMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/compensationperformance/controller/CompensationPerformanceController.java
@@ -1,5 +1,6 @@
package com.ruoyi.compensationperformance.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -9,16 +10,23 @@
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.mapper.SysUserMapper;
import com.ruoyi.purchase.dto.PaymentRegistrationDto;
import com.ruoyi.staff.mapper.StaffOnJobMapper;
import com.ruoyi.staff.pojo.StaffOnJob;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @author :yys
@@ -76,5 +84,31 @@
        util.exportExcel(response, list, "导出薪资管理列表");
    }
    @Log(title = "下载薪资管理列表模板", businessType = BusinessType.EXPORT)
    @PostMapping("/exportTemplate")
    public void exportTemplate(HttpServletResponse response) {
        List<CompensationPerformance> list = new ArrayList<>();
        ExcelUtil<CompensationPerformance> util = new ExcelUtil<>(CompensationPerformance.class);
        util.exportExcel(response, list, "下载薪资管理列表模板");
    }
    @Autowired
    private SysUserMapper sysUserMapper;
    @Log(title = "导入薪资管理列表", businessType = BusinessType.IMPORT)
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file) throws Exception {
        ExcelUtil<CompensationPerformance> util = new ExcelUtil<>(CompensationPerformance.class);
        List<CompensationPerformance> list = util.importExcel(file.getInputStream());
        list.forEach(item->{
            SysUser staffOnJob = sysUserMapper.selectUserByNickName(item.getName());
            if(staffOnJob!=null){
                item.setStaffId(staffOnJob.getUserId());
            }
        });
        boolean b = compensationPerformanceService.saveBatch(list);
        return AjaxResult.success(b);
    }
}
src/main/java/com/ruoyi/compensationperformance/pojo/CompensationPerformance.java
@@ -28,9 +28,9 @@
    private Long id;
    /**
     * å‘˜å·¥id
     * ç”¨æˆ·id
     */
    @ApiModelProperty("员工id")
    @ApiModelProperty("用户id")
    private Long staffId;
    /**
@@ -61,14 +61,14 @@
     * åº”出勤天数
     */
    @ApiModelProperty("应出勤天数")
    @Excel(name = "应出勤天数")
//    @Excel(name = "应出勤天数")
    private BigDecimal shouldAttendedNum;
    /**
     * å®žé™…出勤天数
     */
    @ApiModelProperty("实际出勤天数")
    @Excel(name = "实际出勤天数")
//    @Excel(name = "实际出勤天数")
    private BigDecimal actualAttendedNum;
@@ -76,21 +76,21 @@
     * åŸºæœ¬å·¥èµ„
     */
    @ApiModelProperty("基本工资")
    @Excel(name = "基本工资")
//    @Excel(name = "基本工资")
    private BigDecimal basicSalary;
    /**
     * å²—位工资
     */
    @ApiModelProperty("岗位工资")
    @Excel(name = "岗位工资")
//    @Excel(name = "岗位工资")
    private BigDecimal postSalary;
    /**
     * å…¥ç¦»èŒç¼ºå‹¤æ‰£æ¬¾
     */
    @ApiModelProperty("入离职缺勤扣款")
    @Excel(name = "入离职缺勤扣款")
//    @Excel(name = "入离职缺勤扣款")
    private BigDecimal deductionAbsenteeism;
@@ -98,34 +98,34 @@
     * ç—…假扣款
     */
    @ApiModelProperty("病假扣款")
    @Excel(name = "病假扣款")
//    @Excel(name = "病假扣款")
    private BigDecimal sickLeaveDeductions;
    /**
     * äº‹å‡æ‰£æ¬¾
     */
    @ApiModelProperty("事假扣款")
    @Excel(name = "事假扣款")
//    @Excel(name = "事假扣款")
    private BigDecimal deductionPersonalLeave;
    /**
     * å¿˜è®°æ‰“卡扣款
     */
    @ApiModelProperty("忘记打卡扣款")
    @Excel(name = "忘记打卡扣款")
//    @Excel(name = "忘记打卡扣款")
    private BigDecimal forgetClockDeduct;
    /**
     * ç»©æ•ˆå¾—分
     */
    @ApiModelProperty("绩效得分")
    @Excel(name = "绩效得分")
//    @Excel(name = "绩效得分")
    private BigDecimal performanceScore;
    /**
     * ç»©æ•ˆå·¥èµ„
     */
    @ApiModelProperty("绩效工资")
    @Excel(name = "绩效工资")
//    @Excel(name = "绩效工资")
    private BigDecimal performancePay;
@@ -133,67 +133,67 @@
     * åº”发合计
     */
    @ApiModelProperty("应发合计")
    @Excel(name = "应发合计")
//    @Excel(name = "应发合计")
    private BigDecimal payableWages;
    /**
     * ç¤¾ä¿ä¸ªäºº
     */
    @ApiModelProperty("社保个人")
    @Excel(name = "社保个人")
//    @Excel(name = "社保个人")
    private BigDecimal socialSecurityIndividuals;
    /**
     * ç¤¾ä¿å…¬å¸
     */
    @ApiModelProperty("社保公司")
    @Excel(name = "社保公司")
//    @Excel(name = "社保公司")
    private BigDecimal socialSecurityCompanies;
    /**
     * ç¤¾ä¿åˆè®¡
     */
    @ApiModelProperty("社保合计")
    @Excel(name = "社保合计")
//    @Excel(name = "社保合计")
    private BigDecimal socialSecurityTotal;
    /**
     * å…¬ç§¯é‡‘合计
     */
    @ApiModelProperty("公积金合计")
    @Excel(name = "公积金合计")
//    @Excel(name = "公积金合计")
    private BigDecimal providentFundTotal;
    /**
     * å…¬ç§¯é‡‘公司
     */
    @ApiModelProperty("公积金公司")
    @Excel(name = "公积金公司")
//    @Excel(name = "公积金公司")
    private BigDecimal providentFundCompany;
    /**
     * å…¬ç§¯é‡‘个人
     */
    @ApiModelProperty("公积金个人")
    @Excel(name = "公积金个人")
//    @Excel(name = "公积金个人")
    private BigDecimal providentFundIndividuals;
    /**
     * åº”税工资
     */
    @ApiModelProperty("应税工资")
    @Excel(name = "应税工资")
//    @Excel(name = "应税工资")
    private BigDecimal taxableWaget;
    /**
     * ä¸ªäººæ‰€å¾—税
     */
    @ApiModelProperty("个人所得税")
    @Excel(name = "个人所得税")
//    @Excel(name = "个人所得税")
    private BigDecimal personalIncomeTax;
    /**
     * å®žå‘工资
     */
    @ApiModelProperty("实发工资")
    @Excel(name = "实发工资")
    @Excel(name = "实发工资", width = 30)
    private BigDecimal actualWages;
    /**
src/main/java/com/ruoyi/device/dto/DeviceLedgerDto.java
@@ -37,6 +37,19 @@
    private String deviceModel;
    /**
     * è®¾å¤‡å“ç‰Œ
     */
    @ApiModelProperty("设备品牌")
    private String deviceBrand;
    /**
     * å­˜æ”¾ä½ç½®
     */
    @ApiModelProperty("存放位置")
    private String storageLocation;
    /**
     * ä¾›åº”商名称
     */
    private String supplierName;
src/main/java/com/ruoyi/device/pojo/DeviceLedger.java
@@ -41,6 +41,18 @@
    private String deviceModel;
    /**
     * è®¾å¤‡å“ç‰Œ
     */
    @ApiModelProperty("设备品牌")
    private String deviceBrand;
    /**
     * å­˜æ”¾ä½ç½®
     */
    @ApiModelProperty("存放位置")
    private String storageLocation;
    /**
     * ä¾›åº”商名称
     */
    private String supplierName;
src/main/java/com/ruoyi/production/controller/SalesLedgerSchedulingController.java
@@ -15,6 +15,8 @@
import com.ruoyi.production.mapper.SpeculativeTradingInfoMapper;
import com.ruoyi.production.pojo.SpeculativeTradingInfo;
import com.ruoyi.production.service.impl.SalesLedgerSchedulingServiceImpl;
import com.ruoyi.sales.mapper.LossMapper;
import com.ruoyi.sales.pojo.Loss;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -44,15 +46,40 @@
    @Autowired
    private SpeculativeTradingInfoMapper speculativeTradingInfoMapper;
    @Autowired
    private LossMapper lossMapper;
    @GetMapping("/loss")
    @Log(title = "生产管理-生产派工-损耗率", businessType = BusinessType.OTHER)
    @ApiOperation("生产管理-生产派工-损耗率")
    public AjaxResult loss() {
        return AjaxResult.success(lossMapper.selectList(null));
    }
    @PostMapping("/addLoss")
    @Log(title = "生产管理-生产派工-添加损耗率", businessType = BusinessType.INSERT)
    @ApiOperation("生产管理-生产派工-添加损耗率")
    public AjaxResult addLoss(@RequestBody Loss loss) {
        lossMapper.insert(loss);
        return AjaxResult.success("添加损耗率成功");
    }
    @PostMapping("/updateLoss")
    @Log(title = "生产管理-生产派工-修改损耗率", businessType = BusinessType.UPDATE)
    @ApiOperation("生产管理-生产派工-修改损耗率")
    public AjaxResult updateLoss(@RequestBody Loss loss) {
        lossMapper.updateById(loss);
        return AjaxResult.success("修改损耗率成功");
    }
    @GetMapping("/list")
    @Log(title = "生产管理-生产派工-炒机信息", businessType = BusinessType.OTHER)
    @ApiOperation("生产管理-生产派工-炒机信息")
    public AjaxResult list() {
        List<SpeculativeTradingInfo> result = speculativeTradingInfoMapper.selectList(null);
        result.forEach(item -> {
            item.setCurrentWorkLoad(salesLedgerSchedulingService.getSchedulingNumBySpeculativeTradingName(item.getName()).divide(new BigDecimal(1000),2, RoundingMode.CEILING));
            item.setVacant(item.getWorkLoad().subtract(item.getCurrentWorkLoad()));
            item.setVacant(item.getWorkLoad().subtract(item.getCurrentWorkLoad()).setScale(2, RoundingMode.HALF_UP)); //保留两位小数
        });
        return AjaxResult.success(result);
    }
src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingDto.java
@@ -27,6 +27,9 @@
    @ApiModelProperty(value = "销售台账ID")
    private Long salesLedgerId;
    @ApiModelProperty(value = "生产总量(单位kg)")
    private BigDecimal totalProduction;
    /**
     * ç”Ÿäº§ç‚’机
     */
src/main/java/com/ruoyi/production/dto/SalesLedgerSchedulingProcessDto.java
@@ -23,6 +23,9 @@
    @ApiModelProperty(value = "销售产品ID")
    private Long salesLedgerProductId;
    @ApiModelProperty(value = "生产总量(单位kg)")
    private BigDecimal totalProduction;
    @ApiModelProperty(value = "销售台账ID")
    private Long salesLedgerId;
src/main/java/com/ruoyi/production/service/impl/SalesLedgerProductionAccountingServiceImpl.java
@@ -11,6 +11,8 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
/**
 * @author :yys
 * @date : 2025/7/21 14:41
@@ -25,6 +27,13 @@
    @Override
    public IPage<SalesLedgerProductionAccountingDto> listPage(Page page, SalesLedgerProductionAccountingDto salesLedgerProductionAccountingDto) {
        IPage<SalesLedgerProductionAccountingDto> list = salesLedgerProductionAccountingMapper.listPage(page, salesLedgerProductionAccountingDto);
        list.getRecords().forEach(item -> {
            String[] split = item.getSpecificationModel().split("\\*");
            if(split.length == 2){
                // è®¡ç®—工资 = å·¥æ—¶å®šé¢ * æ•°é‡ * è§„æ ¼
                item.setWages(item.getWages().multiply(new BigDecimal(split[1])));
            }
        });
        return list;
    }
}
src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -18,7 +18,9 @@
import com.ruoyi.production.service.SalesLedgerSchedulingService;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.mapper.SysUserMapper;
import com.ruoyi.sales.mapper.LossMapper;
import com.ruoyi.sales.mapper.SalesLedgerProductMapper;
import com.ruoyi.sales.pojo.Loss;
import com.ruoyi.sales.pojo.SalesLedgerProduct;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -28,6 +30,7 @@
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
@@ -77,6 +80,15 @@
            }else{
                i.setStatus("生产中");
            }
            // è®¡ç®—生产总量 = è§„æ ¼ * æ•°é‡ / 1000
            String[] split = i.getSpecificationModel().split("\\*");
            if(split.length == 2){
                BigDecimal multiply = new BigDecimal(split[0])
                        .multiply(new BigDecimal(split[1])
                                .multiply(i.getQuantity()).divide(new BigDecimal(1000),2, RoundingMode.CEILING));
                i.setTotalProduction(multiply);
            }
        });
        return list;
    }
@@ -210,8 +222,14 @@
                totalNum.addAndGet(productionNum.intValue());
            }
        });
        return new BigDecimal(totalNum.get());
        // éœ€è¦ / æŸè€—率
        Loss loss = lossMapper.selectOne(new LambdaQueryWrapper<Loss>().last("limit 1"));
        BigDecimal lossNum = loss == null ? new BigDecimal(6) : loss.getRate(); //没有损耗率则默认为6
        return new BigDecimal(totalNum.get()).multiply(new BigDecimal(100)).divide(lossNum, 2,RoundingMode.HALF_UP);
    }
    private LossMapper lossMapper;
    /**
@@ -256,14 +274,16 @@
//        salesLedgerWorkLambdaQueryWrapper.in(SalesLedgerWork::getSalesLedgerSchedulingId, collect)
//                .ne(SalesLedgerWork::getStatus, 1);
//        List<SalesLedgerWork> salesLedgerWorks = salesLedgerWorkMapper.selectList(salesLedgerWorkLambdaQueryWrapper);
//        list.getRecords().forEach(i -> {
//            // èŽ·å–å®Œæˆæ•°é‡
//            i.setSuccessNum(salesLedgerWorks
//                    .stream()
//                    .filter(j -> j.getSalesLedgerSchedulingId().equals(i.getId()))
//                    .map(SalesLedgerWork::getFinishedNum)
//                    .reduce(BigDecimal.ZERO, BigDecimal::add));
//        });
        list.getRecords().forEach(i -> {
            // è®¡ç®—生产总量 = è§„æ ¼ * æ•°é‡ / 1000
            String[] split = i.getSpecificationModel().split("\\*");
            if(split.length == 2){
                BigDecimal multiply = new BigDecimal(split[0])
                        .multiply(new BigDecimal(split[1])
                                .multiply(i.getSuccessNum()).divide(new BigDecimal(1000),2, RoundingMode.CEILING));
                i.setTotalProduction(multiply);
            }
        });
        return list;
    }
src/main/java/com/ruoyi/project/system/controller/SysUserController.java
@@ -5,6 +5,7 @@
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.project.system.domain.vo.SysUserDeptVo;
import com.ruoyi.project.system.mapper.SysUserMapper;
import com.ruoyi.project.system.service.*;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -67,6 +68,17 @@
        return getDataTable(list);
    }
    /**
     * èŽ·å–ç”¨æˆ·åˆ—è¡¨
     */
    @PreAuthorize("@ss.hasPermi('system:user:list')")
    @GetMapping("/listAll")
    public AjaxResult listAll(SysUser user)
    {
        List<SysUser> list = userService.selectUserList(user);
        return AjaxResult.success(list);
    }
    @Log(title = "用户管理", businessType = BusinessType.EXPORT)
    @PreAuthorize("@ss.hasPermi('system:user:export')")
    @PostMapping("/export")
src/main/java/com/ruoyi/project/system/mapper/SysUserMapper.java
@@ -49,6 +49,14 @@
    public SysUser selectUserByUserName(String userName);
    /**
     * é€šè¿‡æ˜µç§°æŸ¥è¯¢ç”¨æˆ·
     *
     * @param nickName ç”¨æˆ·å
     * @return ç”¨æˆ·å¯¹è±¡ä¿¡æ¯
     */
    public SysUser selectUserByNickName(String nickName);
    /**
     * é€šè¿‡ç”¨æˆ·ID查询用户
     * 
     * @param userId ç”¨æˆ·ID
src/main/java/com/ruoyi/sales/mapper/LossMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
package com.ruoyi.sales.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.sales.pojo.Loss;
/**
 * @author :yys
 * @date : 2025/11/13 16:17
 */
public interface LossMapper extends BaseMapper<Loss> {
}
src/main/java/com/ruoyi/sales/pojo/Loss.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
package com.ruoyi.sales.pojo;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
 * @author :yys
 * @date : 2025/11/13 16:16
 */
@Data
@TableName("loss")
public class Loss {
    private static final long serialVersionUID = 1L;
    /**
     * åºå·
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    private BigDecimal rate;
    @ApiModelProperty(value = "租户ID")
    @TableField(fill = FieldFill.INSERT)
    private Long tenantId;
}
src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
@@ -53,6 +53,14 @@
        return AjaxResult.success();
    }
    /**
     * èŽ·å–å½“å‰ç”¨æˆ·æœ€æ–°æŽ’ç­è®°å½•
     */
    @GetMapping("/getCurrentUserLatestScheduling")
    public AjaxResult getCurrentUserLatestScheduling(){
        return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling());
    }
    @Log(title = "导出人员排班列表", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response ) {
src/main/java/com/ruoyi/staff/dto/SaveStaffSchedulingDto.java
@@ -1,5 +1,6 @@
package com.ruoyi.staff.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -21,27 +22,34 @@
public class SaveStaffSchedulingDto implements Serializable {
    private Integer id;
    @NotNull(message = "必须要选择员工")
    private Integer staffId;
//    @NotNull(message = "必须要选择员工")
    private String staffId;
    @NotNull(message = "部门id不能为空!")
    /**
     * åˆä¼‘æ—¶é—´
     */
    private String lunchTime;
    private String staffName;
//    @NotNull(message = "部门id不能为空!")
    private Integer department;
    @NotNull(message = "班次id不能为空!")
//    @NotNull(message = "班次id不能为空!")
    private Integer shiftType;
    @NotNull(message = "工作日不能为空!")
//    @NotNull(message = "工作日不能为空!")
    private Date workDate;
    @NotNull(message = "上班时间不能为空!")
//    @NotNull(message = "上班时间不能为空!")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime workStartTime;
    @NotNull(message = "下班时间不能为空!")
//    @NotNull(message = "下班时间不能为空!")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime workEndTime;
    @NotNull(message = "工时不能为空!")
//    @NotNull(message = "工时不能为空!")
    private Integer status;
    private String remark;
src/main/java/com/ruoyi/staff/dto/StaffSchedulingDto.java
@@ -1,6 +1,7 @@
package com.ruoyi.staff.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
@@ -24,7 +25,14 @@
    /**
     * å‘˜å·¥ID
     */
    private Integer staffId;
    private String staffId;
    /**
     * åˆä¼‘æ—¶é—´
     */
    @Excel(name = "午休时间")
    private String lunchTime;
    @Excel(name = "员工名称")
    private String staffName;
src/main/java/com/ruoyi/staff/pojo/StaffScheduling.java
@@ -24,7 +24,19 @@
     * å‘˜å·¥ID
     */
    @TableField(value = "staff_id")
    private Integer staffId;
    private String staffId;
    /**
     * æŽ’班人员
     */
    @TableField(value = "staff_name")
    private String staffName;
    /**
     * åˆä¼‘æ—¶é—´
     */
    @TableField(value = "lunch_time")
    private String lunchTime;
    /**
     * éƒ¨é—¨
@@ -44,6 +56,7 @@
    @TableField(value = "work_date")
    private Date workDate;
    /**
     * å¼€å§‹å·¥ä½œæ—¶é—´
     */
src/main/java/com/ruoyi/staff/service/StaffSchedulingService.java
@@ -17,4 +17,6 @@
    void saveStaffScheduling(SaveStaffSchedulingDto saveStaffSchedulingDto);
    IPage<StaffSchedulingDto> listPage(SearchSchedulingVo vo);
    StaffScheduling getCurrentUserLatestScheduling();
}
src/main/java/com/ruoyi/staff/service/impl/StaffSchedulingServiceImpl.java
@@ -1,8 +1,11 @@
package com.ruoyi.staff.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.staff.dto.SaveStaffSchedulingDto;
import com.ruoyi.staff.dto.StaffSchedulingDto;
import com.ruoyi.staff.mapper.StaffSchedulingMapper;
@@ -54,6 +57,15 @@
        return staffSchedulingMapper.listPage(page, vo);
    }
    @Override
    public StaffScheduling getCurrentUserLatestScheduling() {
        LoginUser loginUser = SecurityUtils.getLoginUser();
        return staffSchedulingMapper.selectOne(new LambdaQueryWrapper<StaffScheduling>()
                .like(StaffScheduling::getStaffId,loginUser.getUserId())
                .orderByDesc(StaffScheduling::getWorkEndTime)
                .last("LIMIT 1"));
    }
}
src/main/resources/mapper/device/DeviceLedgerMapper.xml
@@ -11,6 +11,8 @@
        dl.device_name,
        dl.device_model,
        dl.supplier_name,
        dl.device_brand,
        dl.storage_location,
        dl.unit,
        dl.number,
        dl.status,
src/main/resources/mapper/staff/StaffSchedulingMapper.xml
@@ -6,7 +6,7 @@
    <resultMap id="BaseResultMap" type="com.ruoyi.staff.pojo.StaffScheduling">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="staffId" column="staff_id" jdbcType="INTEGER"/>
            <result property="staffId" column="staff_id" jdbcType="VARCHAR"/>
            <result property="department" column="department" jdbcType="INTEGER"/>
            <result property="shiftType" column="shift_type" jdbcType="INTEGER"/>
            <result property="workDate" column="work_date" jdbcType="DATE"/>
@@ -31,12 +31,11 @@
    </sql>
    <select id="listPage" resultType="com.ruoyi.staff.dto.StaffSchedulingDto">
        SELECT
        t1.*,t2.staff_name as 'staff_name' ,t2.staff_no as 'staff_no'
        t1.*
        FROM staff_scheduling t1
        left join staff_join_leave_record t2 on t1.staff_id = t2.id
        where 1=1
        <if test="vo.staffName != null and vo.staffName != '' ">
            AND t2.staff_name LIKE CONCAT('%', #{vo.staffName}, '%')
            AND t1.staff_name LIKE CONCAT('%', #{vo.staffName}, '%')
        </if>
        <if test="vo.shiftType != null and vo.shiftType != '' ">
            AND t1.shift_type = #{vo.shiftType}
src/main/resources/mapper/system/SysUserMapper.xml
@@ -180,6 +180,12 @@
            #{id}
        </foreach>
    </select>
    <select id="selectUserByNickName" resultType="com.ruoyi.project.system.domain.SysUser"
            parameterType="java.lang.String">
        <include refid="selectUserVo"/>
        where u.nick_name = #{nickName} and u.del_flag = '0'
        limit 1
    </select>
    <insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
         insert into sys_user(