chen.lin
14 小时以前 c81fc5e2a4f4153be2bb8602ed14a0743e6ecd29
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
@@ -18,6 +18,7 @@
import com.vincent.rsf.server.system.service.FieldsItemService;
import com.vincent.rsf.server.system.service.impl.FieldsItemServiceImpl;
import com.vincent.rsf.server.system.utils.SerialRuleUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -39,6 +40,7 @@
 * @description
 * @create 2025/3/3 15:38
 */
@Slf4j
@Component
public class ScheduleJobs {
@@ -172,7 +174,9 @@
                List<FieldsItem> fieldsList = fieldsItemService.list(new LambdaQueryWrapper<FieldsItem>().eq(FieldsItem::getUuid, orderItem.getFieldsIndex()).last("LIMIT 1"));
                FieldsItem fieldsItem = fieldsList.isEmpty() ? null : fieldsList.get(0);
                if (Objects.nonNull(fieldsItem)) {
                    throw new CoolException("票号:" + fieldsItem.getValue() + "已在收货区,不可推送相当票号数据。请联系管理员!!");
                    // 票号已在收货区时跳过推送,避免定时任务反复抛错;视为已收货,由后续逻辑更新单据状态
                    log.warn("票号:{} 已在收货区,跳过推送", fieldsItem.getValue());
                    return;
                }
            }
        }