3 天以前 09d3c4a46e1b67415a716251acea7a1c592c8af7
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/task/MesProTaskMapper.java
@@ -17,7 +17,7 @@
/**
 * MES 生产任务 Mapper
 *
 * @author 芋道源码
 * @author 超级管理员
 */
@Mapper
public interface MesProTaskMapper extends BaseMapperX<MesProTaskDO> {
@@ -49,7 +49,7 @@
        MPJLambdaWrapperX<MesProTaskDO> query = new MPJLambdaWrapperX<>();
        query.selectAll(MesProTaskDO.class);
        // 待报工台账:进行中的任务(排除已完成/已取消),且仍有待报工量
        query.eq(MesProTaskDO::getStatus, MesProTaskStatusEnum.PREPARE.getStatus());
        query.in(MesProTaskDO::getStatus, MesProTaskStatusEnum.PREPARE.getStatus(),MesProTaskStatusEnum.PAUSED.getStatus());
        query.apply("(quantity - IFNULL(produced_quantity, 0)) > 0");
        query.likeIfPresent(MesProTaskDO::getCode, reqVO.getCode())
                .likeIfPresent(MesProTaskDO::getName, reqVO.getName())